|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.chart.util.TextLook
Immutable class that represents the look of a text label. It consists of the properties font and foreground paint.
This class also provides some static defaults that are used during the construction phase of certain parts.
Constructor Summary | |
TextLook(java.awt.Font font,
java.awt.Paint foreground)
Constructs a new instance of a TextLook with the given font and foreground. |
|
TextLook(java.awt.Font font,
Pen pen)
Constructs a new instance of a TextLook with the given font and foreground. |
Method Summary | |
TextLook |
font(java.awt.Font font)
Constructs a new instance of a TextLook with the given font as font. |
TextLook |
foreground(java.awt.Paint paint)
Constructs a new instance of a TextLook with the given paint as foreground. |
static TextLook |
getDefaultLarge()
Returns the default of a large sized TextLook . |
static TextLook |
getDefaultMedium()
Returns the default of a medium sized TextLook . |
static TextLook |
getDefaultNormal()
Returns the default of a normal sized TextLook . |
static TextLook |
getDefaultSmall()
Returns the default of a small TextLook . |
java.awt.Font |
getFont()
Returns the font of this TextLook . |
java.awt.Paint |
getForeground()
Returns the foreground paint of this TextLook . |
Pen |
getPen()
Returns the pen that is used to paint this text. |
TextLook |
pen(Pen pen)
Constructs a new instance of a TextLook with the given pen. |
static void |
setDefaultLarge(TextLook textLook)
Returns the default of a large sized TextLook . |
static void |
setDefaultMedium(TextLook textLook)
Sets the default of a medium sized TextLook . |
static void |
setDefaultNormal(TextLook textLook)
Sets the default of a normal sized TextLook . |
static void |
setDefaultSmall(TextLook textLook)
Sets the default of a small TextLook . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextLook(java.awt.Font font, java.awt.Paint foreground)
TextLook
with the given font and foreground.
font
- The font to be used, not null
.foreground
- The foreground paint, not null
.public TextLook(java.awt.Font font, Pen pen)
TextLook
with the given font and foreground.
font
- The font to be used, not null
.Method Detail |
public static TextLook getDefaultSmall()
TextLook
.
TextLook
, never null
.public static void setDefaultSmall(TextLook textLook)
TextLook
.
textLook
- The new small TextLook
.public static TextLook getDefaultNormal()
TextLook
.
TextLook
, never null
.public static void setDefaultNormal(TextLook textLook)
TextLook
.
textLook
- The new normal sized TextLook
.public static TextLook getDefaultMedium()
TextLook
.
TextLook
, never null
.public static void setDefaultMedium(TextLook textLook)
TextLook
.
textLook
- The new medium sized TextLook
, never null
.public static TextLook getDefaultLarge()
TextLook
.
TextLook
, never null
.public static void setDefaultLarge(TextLook textLook)
TextLook
.
TextLook
, never null
.public java.awt.Font getFont()
TextLook
.
TextLook
, never null
.public java.awt.Paint getForeground()
TextLook
.
TextLook
.public Pen getPen()
public TextLook font(java.awt.Font font)
TextLook
with the given font as font.
font
- The new font, not null
.
TextLook
.public TextLook foreground(java.awt.Paint paint)
TextLook
with the given paint as foreground.
paint
- The new foreground paint.
TextLook
.public TextLook pen(Pen pen)
TextLook
with the given pen.
pen
- The new pen used to paint the text.
TextLook
.
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |