|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.util.font.GenericFontModifier
public class GenericFontModifier
A FontModifier
that can change a font in more than just one way.
Nested Class Summary | |
---|---|
static class |
GenericFontModifier.Modify
Tells how to transform some aspect of a font. |
Constructor Summary | |
---|---|
GenericFontModifier()
Creates a new modifier |
Method Summary | |
---|---|
GenericFontModifier.Modify |
getBold()
Tells how this modifier modifies the bold aspect of a font. |
GenericFontModifier.Modify |
getItalic()
Tells how this modifier modifies the italic aspect of a font. |
int |
getSize()
Gets the size of the new font |
boolean |
isSizeDelta()
Tells whether the size of the fonts generated by this modifier depend on the original size of the used font or not. |
Font |
modify(Font font)
Creates or gets a font for font . |
void |
setBold(GenericFontModifier.Modify bold)
Sets how to modify the bold aspect of a font. |
void |
setItalic(GenericFontModifier.Modify italic)
Sets how to modify the italic aspect of a font. |
void |
setSize(int size)
Sets the size of the new font. |
void |
setSizeDelta(boolean sizeDelta)
Sets whether the value of size should be added
to the original size or replace the original size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericFontModifier()
Method Detail |
---|
public void setSize(int size)
delta size
is set to true
then this value is added to the original size
of the font, otherwise this value replaces the original size.
size
- the new size or the delta sizepublic int getSize()
setSize(int)
public void setSizeDelta(boolean sizeDelta)
size
should be added
to the original size or replace the original size.
sizeDelta
- true
if the two sizes should be summed up,
false
if the size specified in this modifier replaces
the original sizepublic boolean isSizeDelta()
true
if the sizes are summed up, false
if notsetSizeDelta(boolean)
public void setItalic(GenericFontModifier.Modify italic)
italic
- the new modificationpublic GenericFontModifier.Modify getItalic()
public void setBold(GenericFontModifier.Modify bold)
bold
- the new modificationpublic GenericFontModifier.Modify getBold()
public Font modify(Font font)
FontModifier
font
.
modify
in interface FontModifier
font
- the original unmodified font
font
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |