| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
bibliothek.gui.dock.focus.AbstractDockableSelection
public abstract class AbstractDockableSelection
This DockableSelection is also a JPanel. It implements the
 methods needed to interact with DockableSelectionListener. It uses 
 the input map to register actions for when an arrow 
 key or a controlling key is pressed. This selection also observes the set
 of available Dockables and their title-text/icon. Subclasses get
 automatically informed about changes.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel | 
|---|
| JPanel.AccessibleJPanel | 
| Nested classes/interfaces inherited from class javax.swing.JComponent | 
|---|
| JComponent.AccessibleJComponent | 
| Nested classes/interfaces inherited from class java.awt.Container | 
|---|
| Container.AccessibleAWTContainer | 
| Nested classes/interfaces inherited from class java.awt.Component | 
|---|
| Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy | 
| Field Summary | |
|---|---|
| protected  Action | CANCELAction called when the escape or return key was pressed. | 
| protected  Action | DOWNAction called when the down arrow key was pressed. | 
| protected  Action | LEFTAction called when the left arrow key was pressed. | 
| protected  Action | RIGHTAction called when the right arrow key was pressed. | 
| protected  Action | SELECTAction called when the space or enter key was pressed. | 
| protected  Action | UPAction called when the up arrow key was pressed. | 
| Fields inherited from class javax.swing.JComponent | 
|---|
| accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW | 
| Fields inherited from class java.awt.Component | 
|---|
| BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT | 
| Fields inherited from interface java.awt.image.ImageObserver | 
|---|
| ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH | 
| Constructor Summary | |
|---|---|
| AbstractDockableSelection()Creates a new selection | |
| Method Summary | |
|---|---|
|  void | addDockableSelectionListener(DockableSelectionListener listener)Adds a listener that gets informed when the state of this selection changes. | 
| protected  void | cancel()Cancles this selection | 
|  void | close()Called when the current selection is no longer needed either because a selection was done or was canceled. | 
| protected abstract  void | down()Called when a down arrow key was pressed. | 
|  Component | getComponent()Gets the component which represents the selection. | 
|  DockController | getController()Gets the currently used controller. | 
|  boolean | hasChoices(DockController controller)Checks whether controllerhas at least two differentDockables which would be shown on thisDockableSelection. | 
| protected abstract  void | iconChanged(int index,
            Dockable dockable)Called when the icon of dockablechanged. | 
| protected abstract  void | insert(int index,
       Dockable dockable)Called when a new dockable can be selected. | 
| protected abstract  void | left()Called when a left arrow key was pressed. | 
|  void | open(DockController controller)Called when a new selection is about to happen. | 
| protected abstract  void | remove(int index,
       Dockable dockable)Called when a dockable is no longer selectable. | 
|  void | removeDockableSelectionListener(DockableSelectionListener listener)Removes a listener that gets informed when the state of this selection changes. | 
| protected abstract  void | right()Called when a right arrow key was pressed. | 
| protected  void | select()Selects the currently selected dockable. | 
| protected abstract  void | select(Dockable dockable)Called when this selection is forced to select a specific dockable. | 
| protected  boolean | selectable(Dockable dockable)Decides whether dockablefits the requirements for
 an element that can be selected. | 
| protected  void | setSelection(Dockable dockable)Informs this selection which dockable is currently selected. | 
| protected abstract  void | titleChanged(int index,
             Dockable dockable)Called when the title text of dockablechanged. | 
| protected abstract  void | up()Called when an up arrow key was pressed. | 
| Methods inherited from class javax.swing.JPanel | 
|---|
| getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected final Action UP
protected final Action DOWN
protected final Action LEFT
protected final Action RIGHT
protected final Action CANCEL
protected final Action SELECT
| Constructor Detail | 
|---|
public AbstractDockableSelection()
| Method Detail | 
|---|
public void addDockableSelectionListener(DockableSelectionListener listener)
DockableSelection
addDockableSelectionListener in interface DockableSelectionlistener - the new listenerpublic void removeDockableSelectionListener(DockableSelectionListener listener)
DockableSelection
removeDockableSelectionListener in interface DockableSelectionlistener - the new listenerpublic boolean hasChoices(DockController controller)
DockableSelectioncontroller has at least two different
 Dockables which would be shown on this DockableSelection.
hasChoices in interface DockableSelectioncontroller - the controller which might not have any children at all
true if opening this DockableSelection gives
 the user a choice, false if this selection would not show
 anythingpublic Component getComponent()
DockableSelection
getComponent in interface DockableSelectionpublic void open(DockController controller)
DockableSelection
open in interface DockableSelectioncontroller - the controller for which the selection will happenpublic void close()
DockableSelection
close in interface DockableSelectionpublic DockController getController()
protected boolean selectable(Dockable dockable)
dockable fits the requirements for
 an element that can be selected.
dockable - the element to check
true if dockable should be shown
 on this selectionprotected abstract void up()
protected abstract void down()
protected abstract void left()
protected abstract void right()
protected abstract void insert(int index,
                               Dockable dockable)
index - the location of the dockable in the list of all known dockables.dockable - the new element
protected abstract void remove(int index,
                               Dockable dockable)
index - the index of the removed elementdockable - the removed element
protected abstract void titleChanged(int index,
                                     Dockable dockable)
dockable changed.
index - the location of dockabledockable - the element whose title changed
protected abstract void iconChanged(int index,
                                    Dockable dockable)
dockable changed.
index - the location of dockabledockable - the element whose icon changedprotected abstract void select(Dockable dockable)
dockable - the element to select, can be nullprotected void setSelection(Dockable dockable)
dockable - the currently selected dockableprotected void cancel()
protected void select()
setSelection(Dockable)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||