com.sygem.swing.joutlooknavbar
Class State

java.lang.Object
  extended bycom.sygem.swing.joutlooknavbar.State

public class State
extends java.lang.Object

This class represents the way a NavBarItem is displayed.

Title: JOutlookNavBar
Description: A Swing component simulating Outlook's Nav Bar
Copyright: Copyright (c) 2004
Company: SyGem Software

Version:
1.0

Method Summary
 javax.swing.border.Border getBorder()
          Returns the Border that this State will use to surround it's NavBarItem.
 java.awt.Color getColor()
          Returns the color that this State will use to draw the NavBarItem's title
 java.awt.Font getFont()
          Returns the Font that this State will use to draw the NavBarItem's title.
 int getHorizontalAlignment()
          Gets the current horizontal alignment value for the State
 int getHorizontalTextPosition()
          Gets the current horizontal text position value for the State
 int getVerticalAlignment()
          Gets the current vertical alignment value for the State
 int getVerticalTextPosition()
          Gets the current vertical text position value for the State
 void setBorder(javax.swing.border.Border border)
          Set the border for this State.
 void setColor(java.awt.Color color)
          Sets the color that this State will use to draw the NavBarItem's title
 void setFont(java.awt.Font font)
          Sets the font that this State will use to draw the NavBarItem's title
 void setHorizontalAlignment(int horizontalAlignment)
          Sets the horizontal text alignment for this State.
 void setHorizontalTextPosition(int horizontalTextPosition)
          Sets the horizontal text position for this State.
 void setVerticalAlignment(int verticalAlignment)
          Sets the vertical text alignment for this State.
 void setVerticalTextPosition(int verticalTextPosition)
          Sets the vertical text position for this State.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBorder

public javax.swing.border.Border getBorder()
Returns the Border that this State will use to surround it's NavBarItem.

Returns:
The border used by this State

getColor

public java.awt.Color getColor()
Returns the color that this State will use to draw the NavBarItem's title

Returns:
The text color from this State

getFont

public java.awt.Font getFont()
Returns the Font that this State will use to draw the NavBarItem's title.

Returns:
The font used by this State

getHorizontalAlignment

public int getHorizontalAlignment()
Gets the current horizontal alignment value for the State

Returns:
The horizontal alignment value

getHorizontalTextPosition

public int getHorizontalTextPosition()
Gets the current horizontal text position value for the State

Returns:
The horizontal text position value

getVerticalAlignment

public int getVerticalAlignment()
Gets the current vertical alignment value for the State

Returns:
The vertical alignment value

getVerticalTextPosition

public int getVerticalTextPosition()
Gets the current vertical text position value for the State

Returns:
The vertical text position value

setBorder

public void setBorder(javax.swing.border.Border border)
Set the border for this State. The item will be resized to accomodate the new border if necessary, as will the borders of the other 2 states of the item.

Parameters:
border - The new border for this State

setColor

public void setColor(java.awt.Color color)
Sets the color that this State will use to draw the NavBarItem's title

Parameters:
color - The new color for this State

setFont

public void setFont(java.awt.Font font)
Sets the font that this State will use to draw the NavBarItem's title

Parameters:
font - The new font for this State

setHorizontalAlignment

public void setHorizontalAlignment(int horizontalAlignment)

Sets the horizontal text alignment for this State.

NOTE: These changes will be overriden if the changes are made before the item is added to a category.

Parameters:
horizontalAlignment - One of the following constants defined in SwingConstants: LEFT, CENTER (the default), RIGHT, LEADING or TRAILING.

setHorizontalTextPosition

public void setHorizontalTextPosition(int horizontalTextPosition)

Sets the horizontal text position for this State.

NOTE: These changes will be overriden if the changes are made before the item is added to a category.

Parameters:
horizontalTextPosition - One of the following constants defined in SwingConstants: LEFT, CENTER (default), RIGHT, LEADING, or TRAILING.

setVerticalAlignment

public void setVerticalAlignment(int verticalAlignment)

Sets the vertical text alignment for this State.

NOTE: These changes will be overriden if the changes are made before the item is added to a category.

Parameters:
verticalAlignment - One of the following constants defined in SwingConstants: TOP, CENTER (the default), or BOTTOM.

setVerticalTextPosition

public void setVerticalTextPosition(int verticalTextPosition)

Sets the vertical text position for this State.

NOTE: These changes will be overriden if the changes are made before the item is added to a category.

Parameters:
verticalTextPosition - One of the following constants defined in SwingConstants: TOP, CENTER, or BOTTOM (the default).


Copyright © 2004 SyGem Software. All Rights Reserved.