|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DockTitle
A component which is shown aside a Dockable
. A DockTitle
displays some information about its Dockable
, for
example a title-text.
Every DockTitle is owned by exactly one Dockable. The owner can't
be changed.
Every title is either in the state binded
or unbinded
.
As long as a title is unbinded, it has not to do anything. As soon as it is
binded, it has to ensure that it shows the correct properties. A title
can assume that it is only binded when its Dockable
knows
the DockController
.
Nested Class Summary | |
---|---|
static class |
DockTitle.Orientation
How to layout a DockTitle |
Method Summary | |
---|---|
void |
addMouseInputListener(javax.swing.event.MouseInputListener listener)
Adds a listener to all Components of this title
which are visible and which may be "grabbed" by the mouse. |
void |
bind()
Called before the title is displayed. |
void |
changed(DockTitleEvent event)
Called if a property (of this title, of the owner or anything else) has changed. |
java.awt.Component |
getComponent()
Gets a Component which represents the DockTitle . |
Dockable |
getDockable()
Gets the owner of this title. |
DockTitle.Orientation |
getOrientation()
Gets the orientation of this title. |
DockTitleVersion |
getOrigin()
Gets the version which was used to create this title. |
java.awt.Point |
getPopupLocation(java.awt.Point click)
Tells whether a popup menu should be opened when the user clicks at click with the mouse. |
boolean |
isActive()
Tells whether this title is selected (active) or not. |
void |
removeMouseInputListener(javax.swing.event.MouseInputListener listener)
Removes a listener. |
void |
setOrientation(DockTitle.Orientation orientation)
Sets the orientation of this title. |
void |
unbind()
The reverse of bind() . |
Method Detail |
---|
java.awt.Component getComponent()
DockTitle
.
The Component is displayed aside the owner of this title.
This method must always return the same Component.
void addMouseInputListener(javax.swing.event.MouseInputListener listener)
Components
of this title
which are visible and which may be "grabbed" by the mouse.
listener
- the new listenervoid removeMouseInputListener(javax.swing.event.MouseInputListener listener)
listener
- the listener to removejava.awt.Point getPopupLocation(java.awt.Point click)
click
with the mouse. If yes, then the top left edge
of the popup should be returned, otherwise null
should be
returned.
click
- the location where the user clicked with the mouse
null
if no
popup-menu should be openedDockable getDockable()
void setOrientation(DockTitle.Orientation orientation)
orientation
- the orientationDockTitle.Orientation getOrientation()
setOrientation(bibliothek.gui.dock.title.DockTitle.Orientation)
void changed(DockTitleEvent event)
event
- information about the current stateboolean isActive()
changed
.
void bind()
DockActions
(see the method
DockController.listOffers(Dockable)
), then this method
should bind
them too.Dockable
.Dockable.bind(DockTitle)
. The DockController
will call the bind-method, as soon as the Dockable knows the controller.
void unbind()
bind()
. The title should remove any connections
to other objects and unbind
its
DockActions.Dockable
.Dockable.unbind(DockTitle)
. The DockController
will call the unbind-method before the Dockable looses the controller.
DockTitleVersion getOrigin()
null
. However, some features will only work correctly
if this value is not null
.
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |