|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.common.FontMap
public class FontMap
A map containing FontModifiers. Each FontMap is associated
with exactly one CDockable. This map is used to set the font
of various elements like titles or tabs. Changes in the map will
immediately be forwarded and applied.
| Field Summary | |
|---|---|
static java.lang.String |
FONT_KEY_MINIMIZED_BUTTON
key for font used on the button for a minimized dokable |
static java.lang.String |
FONT_KEY_MINIMIZED_BUTTON_FOCUSED
key for font used on the focused button for a minimized dokable |
static java.lang.String |
FONT_KEY_TAB
key for font used on a tab |
static java.lang.String |
FONT_KEY_TAB_FOCUSED
key for font used on a focused tab |
static java.lang.String |
FONT_KEY_TAB_SELECTED
key for font used on a selected tab |
static java.lang.String |
FONT_KEY_TITLE
key for font used in titles |
static java.lang.String |
FONT_KEY_TITLE_FOCUSED
key for font used in titles if the title is focused |
| Constructor Summary | |
|---|---|
FontMap(CDockable dockable)
Creates a new map |
|
| Method Summary | |
|---|---|
void |
addListener(FontMapListener listener)
Adds a listener to this map. |
CDockable |
getDockable()
Gets the owner of this map. |
FontModifier |
getFont(java.lang.String key)
Gets the font which is associated with key. |
void |
removeFont(java.lang.String key)
Ensures that the original font is used for key |
void |
removeListener(FontMapListener listener)
Removes listener from this map. |
void |
setFont(java.lang.String key,
java.awt.Font font)
Sets the font which should be used for key. |
void |
setFont(java.lang.String key,
FontModifier font)
Sets the font for key. |
void |
setFont(java.lang.String key,
java.lang.String... modifications)
Tells to use a font that is derived from the original font of key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FONT_KEY_TITLE
public static final java.lang.String FONT_KEY_TITLE_FOCUSED
public static final java.lang.String FONT_KEY_MINIMIZED_BUTTON
public static final java.lang.String FONT_KEY_MINIMIZED_BUTTON_FOCUSED
public static final java.lang.String FONT_KEY_TAB
public static final java.lang.String FONT_KEY_TAB_SELECTED
public static final java.lang.String FONT_KEY_TAB_FOCUSED
| Constructor Detail |
|---|
public FontMap(CDockable dockable)
dockable - the owner of this map| Method Detail |
|---|
public CDockable getDockable()
public void addListener(FontMapListener listener)
listener - the new listenerpublic void removeListener(FontMapListener listener)
listener from this map.
listener - the listener to removepublic FontModifier getFont(java.lang.String key)
key.
key - the key of the font
null
public void setFont(java.lang.String key,
java.awt.Font font)
key.
key - the key of the fontfont - the new font, can be null
public void setFont(java.lang.String key,
java.lang.String... modifications)
key. There are different modifications possible, all
have to be supplied in the same form: key=value.setFont( x, "i=!", "b=+", s=14" ); would
create a modification that reverses the italic flag, sets any font
to bold and creates only fonts of size 14
numbernumbernumber
key - the key for the fontmodifications - a set of modificationspublic void removeFont(java.lang.String key)
key
key - the key which should no longer use a modified font
public void setFont(java.lang.String key,
FontModifier font)
key.
key - the key of the fontfont - the new value or null to set
the default value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||