Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot
Class PivotStyle

java.lang.Object
  extended by com.citra.pivot.PivotStyle

public class PivotStyle
extends Object

PivotStyle represents a visual modification that can be applied to a component. The style defines commonly used operations, such as setting the background/foreground color or the font of a component.


Field Summary
protected  Color background
          the background color
protected  Font font
          the font
protected  int fontStyle
          the font's style
protected  Color foreground
          the foreground color
protected  Color selectionBackground
          the selection background color
protected  Color selectionForeground
          the selection foreground color
 
Constructor Summary
PivotStyle()
          Constructs a PivotStyle.
PivotStyle(Color background, Color foreground)
          Constructs a PivotStyle with a given background and foreground color.
 
Method Summary
 Color getBackground()
          Retrieves the background color.
 Font getFont()
          Retrieves the font.
 int getFontStyle()
          Retrieves the font's style.
 Color getForeground()
          Retrieves the foreground color.
 Color getSelectionBackground()
          Retrieves the selection background color.
 Color getSelectionForeground()
          Retrieves the selection foreground color.
 void setBackground(Color background)
          Assigns the background color.
 void setFont(Font font)
          Assigns the font.
 void setFontStyle(int fontStyle)
          Assigns the font's style.
 void setForeground(Color foreground)
          Assigns the foreground color.
 void setSelectionBackground(Color selectionBackground)
          Assigns the selection background color.
 void setSelectionForeground(Color selectionForeground)
          Assigns the selection foreground color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

background

protected Color background
the background color


foreground

protected Color foreground
the foreground color


selectionBackground

protected Color selectionBackground
the selection background color


selectionForeground

protected Color selectionForeground
the selection foreground color


font

protected Font font
the font


fontStyle

protected int fontStyle
the font's style

Constructor Detail

PivotStyle

public PivotStyle()
Constructs a PivotStyle.


PivotStyle

public PivotStyle(Color background,
                  Color foreground)
Constructs a PivotStyle with a given background and foreground color.

Method Detail

getBackground

public Color getBackground()
Retrieves the background color.

Returns:
the background color

getFont

public Font getFont()
Retrieves the font.

Returns:
the font

getFontStyle

public int getFontStyle()
Retrieves the font's style.

Returns:
the font's style

getForeground

public Color getForeground()
Retrieves the foreground color.

Returns:
the foreground color

getSelectionBackground

public Color getSelectionBackground()
Retrieves the selection background color.

Returns:
the selection background color

getSelectionForeground

public Color getSelectionForeground()
Retrieves the selection foreground color.

Returns:
the selection foreground color

setBackground

public void setBackground(Color background)
Assigns the background color.

Parameters:
background - the background color to assign

setFont

public void setFont(Font font)
Assigns the font.

Parameters:
font - the font to assign

setFontStyle

public void setFontStyle(int fontStyle)
Assigns the font's style.

Parameters:
fontStyle - the font's style to assign

setForeground

public void setForeground(Color foreground)
Assigns the foreground color.

Parameters:
foreground - the foreground color to assign

setSelectionBackground

public void setSelectionBackground(Color selectionBackground)
Assigns the selection background color.

Parameters:
selectionBackground - the selection background color to assign

setSelectionForeground

public void setSelectionForeground(Color selectionForeground)
Assigns the selection foreground color.

Parameters:
selectionForeground - the selection foreground color to assign

Copyright © 2011 Citra Technologies. All Rights Reserved.