|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DockableDisplayer
A panel which shows one Dockable
and one DockTitle
. The location
of the DockTitle
is at one of the four borders (left,
right, top, bottom). The title may be null
, in this case only
the Dockable is shown.
Clients using a displayer should try to set the controller
and the station
property.
DisplayerCollection
,
DisplayerFactory
Nested Class Summary | |
---|---|
static class |
DockableDisplayer.Location
The four possible locations of the title |
Method Summary | |
---|---|
void |
addDockableDisplayerListener(DockableDisplayerListener listener)
Adds listener to this displayer. |
Component |
getComponent()
Gets the Component which represents this displayer. |
DockController |
getController()
Gets the controller for which this displayer is used. |
Dockable |
getDockable()
Gets the Dockable which is shown on this displayer. |
Insets |
getDockableInsets()
Gets an estimate of the insets around the Dockable of this
displayer compared to the whole size of this displayer. |
DockElementRepresentative |
getMoveableElement()
Gets a representation of the Dockable that can
be used for grabbing and moving around the displayer. |
DockStation |
getStation()
Gets the station on which this displayer might be shown. |
DockTitle |
getTitle()
Gets the title which is shown on this displayer. |
Point |
getTitleCenter()
Gets the center point of the title or any Component that
behaves as if it would be the title. |
DockableDisplayer.Location |
getTitleLocation()
Gets the location of the title in respect to the Dockable. |
DisplayerCombinerTarget |
prepareCombination(CombinerSource source,
Enforcement force)
This method tells how this displayer would like to combine itself with a Dockable that is dropped
over it. |
void |
removeDockableDisplayerListener(DockableDisplayerListener listener)
Removes listener from this displayer. |
void |
setController(DockController controller)
Sets the controller for which this displayer is used. |
void |
setDockable(Dockable dockable)
Sets the Dockable which should be shown on this displayer. |
void |
setStation(DockStation station)
Sets the station on which this displayer is shown. |
void |
setTitle(DockTitle title)
Sets the title of this displayer. |
void |
setTitleLocation(DockableDisplayer.Location location)
Sets the location of the title in respect to the Dockable. |
boolean |
titleContains(int x,
int y)
Tells whether the point x/y is inside the title of this
displayer or not. |
Methods inherited from interface bibliothek.gui.dock.component.DockComponentRoot |
---|
getComponentConfiguration, setComponentConfiguration |
Method Detail |
---|
void setController(DockController controller)
controller
- the controller, can be null
DockController getController()
null
void addDockableDisplayerListener(DockableDisplayerListener listener)
listener
to this displayer.
listener
- the new listener, not null
void removeDockableDisplayerListener(DockableDisplayerListener listener)
listener
from this displayer.
listener
- the listener to removevoid setStation(DockStation station)
station
- the station or null
DockStation getStation()
null
Dockable getDockable()
null
void setDockable(Dockable dockable)
null
means that no Dockable should be visible at all.
dockable
- the child, can be null
DockableDisplayer.Location getTitleLocation()
void setTitleLocation(DockableDisplayer.Location location)
location
- the location, a value of null
is transformed
into the default-valueDockElementRepresentative getMoveableElement()
representation
of the Dockable
that can
be used for grabbing and moving around the displayer. The result of this method should be
the first match of this list:
DockTitle
DockElementRepresentative
Dockable
itselfnull
DockableDisplayerListener
s.
null
DockTitle getTitle()
null
Point getTitleCenter()
title
or any Component
that
behaves as if it would be the title. Some DockStation
s may use this information
to make sure, that the user can always grab and move around the Dockable
.
null
void setTitle(DockTitle title)
null
,
no title is visible. The displayer will change the
orientation
of the title.
title
- the title or null
boolean titleContains(int x, int y)
x/y
is inside the title of this
displayer or not.
x
- the x-coordinate, relatively to this componenty
- the y-coordinate, relatively to this component
true
if the title contains the pointInsets getDockableInsets()
Dockable
of this
displayer compared to the whole size of this displayer.
Component getComponent()
DisplayerCombinerTarget prepareCombination(CombinerSource source, Enforcement force)
Dockable
that is dropped
over it. This method is usually called by a Combiner
or by a DockStation
, but other modules
may call this method as well.
source
- information about the dockable that is dropped, the location of the mouse, etc...force
- tells how much the caller would like the result not to be null
, if the
force
property is high, then the result should more likely not be null
.
Note that a result of null
is always a valid result, even if the caller does not like it.
null
if this displayer does not
have any specific information
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |