com.jniwrapper.win32.jexcel.format
Class Font

java.lang.Object
  extended by com.jniwrapper.win32.jexcel.format.Font

public class Font
extends java.lang.Object

This class provides functionality for text font customization.


Nested Class Summary
static class Font.Alignment
          This class is an enumeration of font effects.
static class Font.UnderlineStyle
          This class is an enumeration of font underline styles.
 
Constructor Summary
Font()
          Create a default font.
Font(java.awt.Font font)
          Create a Font class instance from Font object.
Font(com.jniwrapper.win32.excel.Font font)
           
Font(java.lang.String name, double size)
          Creates a font with the specified name and size.
 
Method Summary
 Font.Alignment getAlignment()
          Returns an applied font effect.
 java.awt.Color getColor()
          Returns the font color.
 java.lang.String getName()
          Returns the font name.
 double getSize()
          Returns the font size.
 Font.UnderlineStyle getUnderlineStyle()
          Returns the font underline style.
 boolean isBold()
          Returns true if the font is bold.
 boolean isItalic()
          Returns true if the font is italic.
 boolean isStrikethrough()
          Returns true if the font is striked through.
 void setAlignment(Font.Alignment alignment)
          Sets up a font effect.
 void setBold(boolean bold)
          Specifies if the font is bold or not.
 void setColor(java.awt.Color color)
          Specifies a font color.
 void setItalic(boolean italic)
          Specifies if the font is italic or not.
 void setName(java.lang.String name)
          Specifies a font name.
 void setSize(double size)
          Specifies a font size.
 void setStrikethrough(boolean strikethrough)
          Specifies if the font is striked through or not.
 void setUnderlineStyle(Font.UnderlineStyle underlineStyle)
          Specifies a font underline style.
 void toExcelFont(com.jniwrapper.win32.excel.Font font)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Font

public Font()
Create a default font.


Font

public Font(java.awt.Font font)
Create a Font class instance from Font object.

Parameters:
font - is a Font object.

Font

public Font(java.lang.String name,
            double size)
Creates a font with the specified name and size.

Parameters:
name - is a font name.
size - is a font size.

Font

public Font(com.jniwrapper.win32.excel.Font font)
Method Detail

toExcelFont

public void toExcelFont(com.jniwrapper.win32.excel.Font font)

getName

public java.lang.String getName()
Returns the font name.

Returns:
the font name.

setName

public void setName(java.lang.String name)
Specifies a font name.

Parameters:
name - is a font name.

getSize

public double getSize()
Returns the font size.

Returns:
the font size.

setSize

public void setSize(double size)
Specifies a font size.

Parameters:
size - is a font size.

getColor

public java.awt.Color getColor()
Returns the font color.

Returns:
the font color.

setColor

public void setColor(java.awt.Color color)
Specifies a font color.

Parameters:
color - is a font color.

isBold

public boolean isBold()
Returns true if the font is bold.

Returns:
true if the font is bold.

setBold

public void setBold(boolean bold)
Specifies if the font is bold or not.

Parameters:
bold - specifies if the font is bold or not.

isItalic

public boolean isItalic()
Returns true if the font is italic.

Returns:
true if the font is italic.

setItalic

public void setItalic(boolean italic)
Specifies if the font is italic or not.

Parameters:
italic - specifies if the font is italic or not.

isStrikethrough

public boolean isStrikethrough()
Returns true if the font is striked through.

Returns:
true if the font is striked through.

setStrikethrough

public void setStrikethrough(boolean strikethrough)
Specifies if the font is striked through or not.

Parameters:
strikethrough - specifies if the font is striked through or not.

getUnderlineStyle

public Font.UnderlineStyle getUnderlineStyle()
Returns the font underline style.

Returns:
the font underline style.
See Also:
Font.UnderlineStyle

setUnderlineStyle

public void setUnderlineStyle(Font.UnderlineStyle underlineStyle)
Specifies a font underline style.

Parameters:
underlineStyle - is an instance of Font.UnderlineStyle class.
See Also:
Font.UnderlineStyle

getAlignment

public Font.Alignment getAlignment()
Returns an applied font effect.

Returns:
an applied font effect.
See Also:
Font.Alignment

setAlignment

public void setAlignment(Font.Alignment alignment)
Sets up a font effect.

Parameters:
alignment - is an instance of Font.Alignment class.
See Also:
Font.Alignment