com.f1j.paint
Interface FontFormat

All Known Subinterfaces:
FontFormat, FontFormat

public interface FontFormat
extends FormatBase

The Font Format interface.


Inner Class Summary
static class FontFormat.EProperty
          Font format property enumeration
static class FontFormat.EUnderline
          Underline enumeration
 
Field Summary
static FontFormat.EProperty eBold
          The bold font attribute.
static FontFormat.EProperty eColor
          The font color attribute.
static FontFormat.EProperty eItalic
          The italic font attribute.
static FontFormat.EProperty eName
          The font name attribute.
static FontFormat.EProperty eOutline
          The outline font attribute.
static FontFormat.EProperty eShadow
          The shadow font attribute.
static FontFormat.EProperty eSize
          The font size attribute.
static FontFormat.EProperty eStrikethrough
          The strikeout font attribute.
static FontFormat.EProperty eUnderline
          The underline font attribute.
static FontFormat.EUnderline eUnderlineNone
          No Underline
static FontFormat.EUnderline eUnderlineSingle
          Single Underline
 
Method Summary
 int getColor()
          Returns the color used to display the font.
 java.lang.String getName()
          Returns the name of the font.
 double getSizePoints()
          Returns the size of the font in points.
 int getSizeTwips()
          Returns the size of the font in twips.
 FontFormat.EUnderline getUnderline()
          Gets the underlinet.
 boolean isBold()
          Returns whether the font is bold.
 boolean isColorAuto()
          Returns whether color is auto.
 boolean isItalic()
          Returns whether the font is italic.
 boolean isOutline()
          Returns whether the font is outline.
 boolean isShadow()
          Returns whether the font is shadow.
 boolean isStrikethrough()
          Returns whether the font is strikeout.
 void setBold(boolean bold)
          Sets the bold attribute of the font.
 void setColor(int color)
          Sets the color used to display the font.
 void setColorAuto()
          Sets whether color ia auto.
 void setItalic(boolean italic)
          Sets the italic attribute of the font.
 void setName(java.lang.String name)
          Sets the font name.
 void setOutline(boolean outline)
          Sets the outline attribute of the font.
 void setShadow(boolean shadow)
          Sets the shadow attribute of the font.
 void setSizePoints(double size)
          Sets the font size in points.
 void setSizeTwips(int size)
          Sets the font size in twips.
 void setStrikethrough(boolean strikethrough)
          Sets the strikeout attribute of the font.
 void setUnderline(FontFormat.EUnderline underline)
          Sets the underline.
 
Methods inherited from interface com.f1j.util.FormatBase
isUndefined, isUndefined, isUsed, setUndefined, undefineAll, useAll
 

Field Detail

eBold

public static final FontFormat.EProperty eBold
The bold font attribute.

eColor

public static final FontFormat.EProperty eColor
The font color attribute.

eItalic

public static final FontFormat.EProperty eItalic
The italic font attribute.

eName

public static final FontFormat.EProperty eName
The font name attribute.

eOutline

public static final FontFormat.EProperty eOutline
The outline font attribute.

eShadow

public static final FontFormat.EProperty eShadow
The shadow font attribute.

eSize

public static final FontFormat.EProperty eSize
The font size attribute.

eStrikethrough

public static final FontFormat.EProperty eStrikethrough
The strikeout font attribute.

eUnderline

public static final FontFormat.EProperty eUnderline
The underline font attribute.

eUnderlineNone

public static final FontFormat.EUnderline eUnderlineNone
No Underline

eUnderlineSingle

public static final FontFormat.EUnderline eUnderlineSingle
Single Underline
Method Detail

getColor

public int getColor()
Returns the color used to display the font.
Returns:
an integer representing the color as an RGB value.
See Also:
setColor(int)

getName

public java.lang.String getName()
Returns the name of the font.
Returns:
a string designating the font name.
See Also:
setName(java.lang.String)

getSizePoints

public double getSizePoints()
Returns the size of the font in points.
Returns:
a double describing the font size in points.
See Also:
setSizePoints(double), getSizeTwips()

getSizeTwips

public int getSizeTwips()
Returns the size of the font in twips.
Returns:
an integer describing the font size.
See Also:
getSizePoints(), setSizeTwips(int)

getUnderline

public FontFormat.EUnderline getUnderline()
Gets the underlinet.
Returns:
the EUnderline value

isBold

public boolean isBold()
Returns whether the font is bold.
Returns:
boolean. true = font is bold.
See Also:
setBold(boolean)

isColorAuto

public boolean isColorAuto()
Returns whether color is auto.
Returns:
whether color is auto

isItalic

public boolean isItalic()
Returns whether the font is italic.
Returns:
boolean. true = font is italic.
See Also:
setItalic(boolean)

isOutline

public boolean isOutline()
Returns whether the font is outline.
Returns:
boolean. true = font is outline.
See Also:
setOutline(boolean)

isShadow

public boolean isShadow()
Returns whether the font is shadow.
Returns:
boolean. true = font is shadow.
See Also:
setShadow(boolean)

isStrikethrough

public boolean isStrikethrough()
Returns whether the font is strikeout.
Returns:
boolean. true = font is strikeout.
See Also:
setStrikethrough(boolean)

setBold

public void setBold(boolean bold)
Sets the bold attribute of the font.
Parameters:
bold - boolean. true = set font to bold.
See Also:
isBold()

setColor

public void setColor(int color)
Sets the color used to display the font.
Parameters:
color - an integer describing the font color as a four-byte integer in the format 0x00RRGGBB.
See Also:
getColor()

setColorAuto

public void setColorAuto()
Sets whether color ia auto.

setItalic

public void setItalic(boolean italic)
Sets the italic attribute of the font.
Parameters:
italic - boolean. true = set font to italic.
See Also:
isItalic()

setName

public void setName(java.lang.String name)
Sets the font name.
Parameters:
name - a string that designates the font name.
See Also:
getName()

setOutline

public void setOutline(boolean outline)
Sets the outline attribute of the font.
Parameters:
outline - boolean. true = set font to outline.
See Also:
isOutline()

setShadow

public void setShadow(boolean shadow)
Sets the shadow attribute of the font.
Parameters:
shadow - boolean. true = set font to shadow.
See Also:
isShadow()

setSizePoints

public void setSizePoints(double size)
                   throws InvalidArgumentException,
                          F1Exception
Sets the font size in points.
Parameters:
size - an integer indicating the font size.
Throws:
InvalidArgumentException - if argument is invalid.
See Also:
getSizePoints(), setSizeTwips(int)

setSizeTwips

public void setSizeTwips(int size)
                  throws InvalidArgumentException,
                         F1Exception
Sets the font size in twips.
Parameters:
size - an integer indicating the font size.
Throws:
InvalidArgumentException - if argument is invalid.
See Also:
setSizePoints(double), getSizeTwips()

setStrikethrough

public void setStrikethrough(boolean strikethrough)
Sets the strikeout attribute of the font.
Parameters:
strikethrough - boolean. true = set font to strikeout.
See Also:
isStrikethrough()

setUnderline

public void setUnderline(FontFormat.EUnderline underline)
Sets the underline.
Parameters:
underline - The EUnderline value.