|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.flap.button.ButtonContent
public class ButtonContent
Tells what kind of information should be displayed on the buttons of a FlapDockStation
. What is actually
displayed also depends on the DockTitle
that is used, but all the default titles support all the settings
this class offers.
Field Summary | |
---|---|
static ButtonContentCondition |
FALSE
A ButtonContentCondition that is always false |
static ButtonContent |
ICON_ACTIONS
Only the icon and the actions are painted. |
static ButtonContent |
ICON_AND_TEXT_ACTIONS
Icon, title text and actions are painted. |
static ButtonContent |
ICON_AND_TEXT_ONLY
Only the icon and the title text are painted. |
static ButtonContent |
ICON_ONLY
Only the icon is painted. |
static ButtonContent |
ICON_THEN_TEXT_ACTIONS
The icon, or if not present the title text, and the actions are painted. |
static ButtonContent |
ICON_THEN_TEXT_ONLY
The icon, or if not present the title text, is painted. |
static ButtonContentCondition |
IF_DOCKABLE
A ButtonContentCondition that returns true if the element is not a DockStation . |
static ButtonContentCondition |
IF_STATION
A ButtonContentCondition that returns true if the element is a DockStation . |
static ButtonContentCondition |
NOT_IF_ICON
A ButtonContentCondition that returns true if a Dockable does not
have an icon. |
static ButtonContentCondition |
NOT_IF_TEXT
A ButtonContentCondition that returns true if a Dockable does not
have a title text. |
static ButtonContent |
TEXT_ACTIONS
Only the title text and the actions are painted. |
static ButtonContent |
TEXT_ONLY
Only the title text is painted. |
static ButtonContent |
TEXT_THEN_ICON_ACTIONS
The title text, or if not present the icon, and the actions are painted. |
static ButtonContent |
TEXT_THEN_ICON_ONLY
The title text, or if not present the icon, is painted. |
static ButtonContentCondition |
THEME
A ButtonContentCondition that always returns the value a DockTheme would choose |
static ButtonContent |
THEME_DEPENDENT
the look and feel completely depends on the current DockTheme . |
static ButtonContentCondition |
TRUE
A ButtonContentCondition that is always true |
Constructor Summary | |
---|---|
ButtonContent(ButtonContentCondition knob,
ButtonContentCondition icon,
ButtonContentCondition text,
ButtonContentCondition children,
ButtonContentCondition actions,
ButtonContentCondition filterActions)
Creates a new set of properties. |
Method Summary | |
---|---|
void |
addListener(Dockable dockable,
ButtonContentListener listener)
Informs this ButtonContent that any change regarding dockable should
be reported to listener . |
boolean |
filterActions(Dockable dockable,
boolean theme)
Tells whether actions should filtered before showing on the button of a FlapDockStation . |
ButtonContentCondition |
getActions()
Gets the condition that decides the property for showActions(Dockable, boolean) |
ButtonContentCondition |
getChildren()
Gets the condition that decides the property for showChildren(Dockable, boolean) |
ButtonContentCondition |
getFilterActions()
Gets the condition that decides the property for filterActions(Dockable, boolean) |
ButtonContentCondition |
getIcon()
Gets the condition that decides the property for showIcon(Dockable, boolean) |
ButtonContentCondition |
getKnob()
Gets the condition that decides the property for showKnob(Dockable, boolean) |
ButtonContentCondition |
getText()
Gets the condition that decides the property for showText(Dockable, boolean) |
void |
handleChange(Dockable dockable)
|
protected ButtonContentListener[] |
listeners(Dockable dockable)
Gets all the listeners that are currently monitoring dockable . |
void |
removeListener(Dockable dockable,
ButtonContentListener listener)
Informs this ButtonContent that listener no longer has to be observed. |
boolean |
showActions(Dockable dockable,
boolean theme)
Tells whether actions should be shown on the button of a FlapDockStation
or not. |
boolean |
showChildren(Dockable dockable,
boolean theme)
Tells whether actions to focus a child of a DockStation should be shown |
boolean |
showIcon(Dockable dockable,
boolean theme)
Tells whether an icon should be shown. |
boolean |
showKnob(Dockable dockable,
boolean theme)
Tells whether a knob should be shown |
boolean |
showText(Dockable dockable,
boolean theme)
Tells whether text should be shown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ButtonContentCondition TRUE
ButtonContentCondition
that is always true
public static final ButtonContentCondition FALSE
ButtonContentCondition
that is always false
public static final ButtonContentCondition THEME
ButtonContentCondition
that always returns the value a DockTheme
would choose
public static final ButtonContentCondition NOT_IF_ICON
ButtonContentCondition
that returns true
if a Dockable
does not
have an icon.
public static final ButtonContentCondition NOT_IF_TEXT
ButtonContentCondition
that returns true
if a Dockable
does not
have a title text.
public static final ButtonContentCondition IF_STATION
ButtonContentCondition
that returns true
if the element is a DockStation
.
public static final ButtonContentCondition IF_DOCKABLE
ButtonContentCondition
that returns true
if the element is not a DockStation
.
public static final ButtonContent THEME_DEPENDENT
DockTheme
.
public static final ButtonContent ICON_ONLY
ButtonContent
would have the exact same effect.
public static final ButtonContent TEXT_ONLY
ButtonContent
would have the exact same effect.
public static final ButtonContent ICON_AND_TEXT_ONLY
ButtonContent
would have the exact same effect.
public static final ButtonContent ICON_THEN_TEXT_ONLY
ButtonContent
would have the exact same effect.
public static final ButtonContent TEXT_THEN_ICON_ONLY
ButtonContent
would have the exact same effect.
public static final ButtonContent ICON_ACTIONS
ButtonContent
would have the exact same effect.
public static final ButtonContent TEXT_ACTIONS
ButtonContent
would have the exact same effect.
public static final ButtonContent ICON_AND_TEXT_ACTIONS
ButtonContent
would have the exact same effect.
public static final ButtonContent ICON_THEN_TEXT_ACTIONS
ButtonContent
would have the exact same effect.
public static final ButtonContent TEXT_THEN_ICON_ACTIONS
ButtonContent
would have the exact same effect.
Constructor Detail |
---|
public ButtonContent(ButtonContentCondition knob, ButtonContentCondition icon, ButtonContentCondition text, ButtonContentCondition children, ButtonContentCondition actions, ButtonContentCondition filterActions)
null
, in which case they default
to THEME
knob
- whether to paint a "knob" where the user can grab the title and move around. A knob really is only
required if neither icon nor text is paintedicon
- whether to paint the icon of a Dockable
text
- whether to paint the title text of a Dockable
children
- whether to add a button for each child of a DockStation
. The button allows user to
open the station and focus one of its children with on click. If the represented Dockable
is not a
station, then only one button is painted.actions
- whether to show the normal DockAction
s of a Dockable
filterActions
- whether only important DockAction
s, as defined by ButtonContentFilter
, should be shownMethod Detail |
---|
public void addListener(Dockable dockable, ButtonContentListener listener)
ButtonContent
that any change regarding dockable
should
be reported to listener
.
dockable
- the element to observelistener
- the listener that monitors dockable
public void removeListener(Dockable dockable, ButtonContentListener listener)
ButtonContent
that listener
no longer has to be observed.
dockable
- the element that was observedlistener
- the listener that is no longer requiredprotected ButtonContentListener[] listeners(Dockable dockable)
dockable
.
dockable
- the element which may be monitored
null
public void handleChange(Dockable dockable)
public boolean showKnob(Dockable dockable, boolean theme)
dockable
- the element for which the property is requestedtheme
- what the theme would do
true
if the knob should be visiblepublic ButtonContentCondition getKnob()
showKnob(Dockable, boolean)
null
public boolean showActions(Dockable dockable, boolean theme)
FlapDockStation
or not.
dockable
- the element for which the property is requestedtheme
- what the theme would do
true
if the actions should be shownpublic ButtonContentCondition getActions()
showActions(Dockable, boolean)
null
public boolean filterActions(Dockable dockable, boolean theme)
FlapDockStation
.
If showActions(Dockable, boolean)
returns false
for dockable
, then
this method is ignored.
dockable
- the element for which the property is requestedtheme
- what the theme would do
true
if the actions should be filtered by the current ButtonContentFilter
public ButtonContentCondition getFilterActions()
filterActions(Dockable, boolean)
null
public boolean showIcon(Dockable dockable, boolean theme)
dockable
- the element for which the property is requestedtheme
- what the theme would do
true
if icons should be shownpublic ButtonContentCondition getIcon()
showIcon(Dockable, boolean)
null
public boolean showText(Dockable dockable, boolean theme)
dockable
- the element for which the property is requestedtheme
- what the theme would do
true
if text should be shownpublic ButtonContentCondition getText()
showText(Dockable, boolean)
null
public boolean showChildren(Dockable dockable, boolean theme)
DockStation
should be shown
dockable
- the element for which the property is requestedtheme
- what the theme would do
true
if the buttons should be shownpublic ButtonContentCondition getChildren()
showChildren(Dockable, boolean)
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |