com.l2fprod.gui.plaf.skin
Class DefaultButton

java.lang.Object
  extended by com.l2fprod.gui.plaf.skin.DefaultButton
All Implemented Interfaces:
java.io.Serializable, javax.swing.border.Border, javax.swing.Icon, javax.swing.plaf.UIResource

public class DefaultButton
extends java.lang.Object
implements javax.swing.Icon, javax.swing.border.Border, javax.swing.plaf.UIResource, java.io.Serializable

Stretch/Tile Button.

Version:
$Revision: 1.4 $, $Date: 2005/11/19 09:16:31 $
Author:
$Author: l2fprod $
See Also:
Serialized Form

Field Summary
 java.awt.Image bottom
          Description of the Field
protected  int bottom_fill
           
protected  int bottomHeight
           
 java.awt.Image bottomleft
          Description of the Field
 java.awt.Image bottomright
          Description of the Field
 java.awt.Image center
          Description of the Field
protected  int center_fill
           
 java.awt.Image gap
           
 java.awt.Image gap_end
           
 java.awt.Image gap_start
           
protected  int imageHeight
           
protected  int imageWidth
           
protected  java.awt.Insets insets
           
 java.awt.Image left
          Description of the Field
protected  int left_fill
           
protected  int leftWidth
           
 java.awt.Image right
          Description of the Field
protected  int right_fill
           
protected  int rightWidth
           
protected  boolean tile
           
 java.awt.Image top
          Description of the Field
protected  int top_fill
           
protected  int topHeight
           
 java.awt.Image topleft
          Description of the Field
 java.awt.Image topright
          Description of the Field
 
Constructor Summary
DefaultButton()
          Constructor for the DefaultButton object
DefaultButton(java.awt.Image top, java.awt.Image bottom, java.awt.Image left, java.awt.Image right, java.awt.Image topLeft, java.awt.Image topRight, java.awt.Image bottomLeft, java.awt.Image bottomRight)
          Constructor for the DefaultButton object
DefaultButton(java.awt.Image bitmap, java.awt.Image gap, java.awt.Image gap_start, java.awt.Image gap_end, int imageWidth, int imageHeight, int topHeight, int rightWidth, int bottomHeight, int leftWidth)
           
DefaultButton(java.awt.Image bitmap, int imageWidth, int imageHeight, int topHeight, int rightWidth, int bottomHeight, int leftWidth)
          Constructor for the DefaultButton object
DefaultButton(java.awt.Image bitmap, int imageWidth, int imageHeight, int topHeight, int rightWidth, int bottomHeight, int leftWidth, boolean tile)
          Constructor for the DefaultButton object
 
Method Summary
 java.awt.Insets getBorderInsets(java.awt.Component c)
          Gets the BorderInsets attribute of the DefaultButton object
 DefaultButton getDisabled()
          Gets the Disabled attribute of the DefaultButton object
 int getHeight()
          Gets the Height attribute of the DefaultButton object
 int getIconHeight()
          Gets the IconHeight attribute of the DefaultButton object
 int getIconWidth()
          Gets the IconWidth attribute of the DefaultButton object
 java.awt.Insets getInsets()
          Gets the Insets attribute of the DefaultButton object
 java.awt.Dimension getMinimumSize()
          Gets the MinimumSize attribute of the DefaultButton object
 java.awt.Dimension getPreferredSize()
          Gets the PreferredSize attribute of the DefaultButton object
 DefaultButton getTopToBottom()
          Gets the TopToBottom attribute of the DefaultButton object
 int getWidth()
          Gets the Width attribute of the DefaultButton object
 boolean isBorderOpaque()
          Gets the BorderOpaque attribute of the DefaultButton object
 void paint(java.awt.Graphics g, java.awt.Component b)
          Description of the Method
 void paint(java.awt.Graphics g, int x, int y, java.awt.Component b)
          Description of the Method
 void paint(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Component b)
          Description of the Method
 void paintBorder(java.awt.Component b, java.awt.Graphics g, int x, int y, int width, int height)
          Description of the Method
 void paintGap(java.awt.Graphics g, int x, int y, int width, java.awt.Component b)
           
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Description of the Method
 void paintWindow(java.awt.Graphics g, int width, int height, int windowX, int windowY, int windowWidth, int windowHeight, java.awt.Component b)
           
 DefaultButton rotateClockWise()
           
 DefaultButton rotateCounterClockWise()
          Description of the Method
 void setCenterFill(int mode)
          Sets the CenterFill attribute of the DefaultButton object
 java.lang.String toString()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

topleft

public transient java.awt.Image topleft
Description of the Field


topright

public transient java.awt.Image topright
Description of the Field


bottomleft

public transient java.awt.Image bottomleft
Description of the Field


bottomright

public transient java.awt.Image bottomright
Description of the Field


top

public transient java.awt.Image top
Description of the Field


right

public transient java.awt.Image right
Description of the Field


bottom

public transient java.awt.Image bottom
Description of the Field


left

public transient java.awt.Image left
Description of the Field


center

public transient java.awt.Image center
Description of the Field


gap

public transient java.awt.Image gap

gap_start

public transient java.awt.Image gap_start

gap_end

public transient java.awt.Image gap_end

topHeight

protected int topHeight

bottomHeight

protected int bottomHeight

leftWidth

protected int leftWidth

rightWidth

protected int rightWidth

imageWidth

protected int imageWidth

imageHeight

protected int imageHeight

top_fill

protected int top_fill

right_fill

protected int right_fill

bottom_fill

protected int bottom_fill

left_fill

protected int left_fill

center_fill

protected int center_fill

tile

protected boolean tile

insets

protected java.awt.Insets insets
Constructor Detail

DefaultButton

public DefaultButton()
Constructor for the DefaultButton object


DefaultButton

public DefaultButton(java.awt.Image bitmap,
                     int imageWidth,
                     int imageHeight,
                     int topHeight,
                     int rightWidth,
                     int bottomHeight,
                     int leftWidth)
Constructor for the DefaultButton object

Parameters:
bitmap - Description of Parameter
imageWidth - Description of Parameter
imageHeight - Description of Parameter
topHeight - Description of Parameter
rightWidth - Description of Parameter
bottomHeight - Description of Parameter
leftWidth - Description of Parameter

DefaultButton

public DefaultButton(java.awt.Image bitmap,
                     java.awt.Image gap,
                     java.awt.Image gap_start,
                     java.awt.Image gap_end,
                     int imageWidth,
                     int imageHeight,
                     int topHeight,
                     int rightWidth,
                     int bottomHeight,
                     int leftWidth)

DefaultButton

public DefaultButton(java.awt.Image top,
                     java.awt.Image bottom,
                     java.awt.Image left,
                     java.awt.Image right,
                     java.awt.Image topLeft,
                     java.awt.Image topRight,
                     java.awt.Image bottomLeft,
                     java.awt.Image bottomRight)
Constructor for the DefaultButton object

Parameters:
top - Description of Parameter
bottom - Description of Parameter
left - Description of Parameter
right - Description of Parameter
topLeft - Description of Parameter
topRight - Description of Parameter
bottomLeft - Description of Parameter
bottomRight - Description of Parameter

DefaultButton

public DefaultButton(java.awt.Image bitmap,
                     int imageWidth,
                     int imageHeight,
                     int topHeight,
                     int rightWidth,
                     int bottomHeight,
                     int leftWidth,
                     boolean tile)
Constructor for the DefaultButton object

Parameters:
bitmap - Description of Parameter
imageWidth - Description of Parameter
imageHeight - Description of Parameter
topHeight - Description of Parameter
rightWidth - Description of Parameter
bottomHeight - Description of Parameter
leftWidth - Description of Parameter
tile - Description of Parameter
Method Detail

paint

public void paint(java.awt.Graphics g,
                  int x,
                  int y,
                  int width,
                  int height,
                  java.awt.Component b)
Description of the Method

Parameters:
g - Description of Parameter
x - Description of Parameter
y - Description of Parameter
width - Description of Parameter
height - Description of Parameter
b - Description of Parameter

setCenterFill

public void setCenterFill(int mode)
Sets the CenterFill attribute of the DefaultButton object

Parameters:
mode - The new CenterFill value

getDisabled

public DefaultButton getDisabled()
Gets the Disabled attribute of the DefaultButton object

Returns:
The Disabled value

getTopToBottom

public DefaultButton getTopToBottom()
Gets the TopToBottom attribute of the DefaultButton object

Returns:
The TopToBottom value

rotateCounterClockWise

public DefaultButton rotateCounterClockWise()
Description of the Method

Returns:
Description of the Returned Value

rotateClockWise

public DefaultButton rotateClockWise()

getMinimumSize

public java.awt.Dimension getMinimumSize()
Gets the MinimumSize attribute of the DefaultButton object

Returns:
The MinimumSize value

getPreferredSize

public java.awt.Dimension getPreferredSize()
Gets the PreferredSize attribute of the DefaultButton object

Returns:
The PreferredSize value

getWidth

public int getWidth()
Gets the Width attribute of the DefaultButton object

Returns:
The Width value

getIconWidth

public int getIconWidth()
Gets the IconWidth attribute of the DefaultButton object

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
The IconWidth value

getHeight

public int getHeight()
Gets the Height attribute of the DefaultButton object

Returns:
The Height value

getIconHeight

public int getIconHeight()
Gets the IconHeight attribute of the DefaultButton object

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
The IconHeight value

getInsets

public java.awt.Insets getInsets()
Gets the Insets attribute of the DefaultButton object

Returns:
The Insets value

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c)
Gets the BorderInsets attribute of the DefaultButton object

Specified by:
getBorderInsets in interface javax.swing.border.Border
Parameters:
c - Description of Parameter
Returns:
The BorderInsets value

isBorderOpaque

public boolean isBorderOpaque()
Gets the BorderOpaque attribute of the DefaultButton object

Specified by:
isBorderOpaque in interface javax.swing.border.Border
Returns:
The BorderOpaque value

toString

public java.lang.String toString()
Description of the Method

Overrides:
toString in class java.lang.Object
Returns:
Description of the Returned Value

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Description of the Method

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - Description of Parameter
g - Description of Parameter
x - Description of Parameter
y - Description of Parameter

paint

public void paint(java.awt.Graphics g,
                  java.awt.Component b)
Description of the Method

Parameters:
g - Description of Parameter
b - Description of Parameter

paint

public void paint(java.awt.Graphics g,
                  int x,
                  int y,
                  java.awt.Component b)
Description of the Method

Parameters:
g - Description of Parameter
x - Description of Parameter
y - Description of Parameter
b - Description of Parameter

paintBorder

public void paintBorder(java.awt.Component b,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Description of the Method

Specified by:
paintBorder in interface javax.swing.border.Border
Parameters:
b - Description of Parameter
g - Description of Parameter
x - Description of Parameter
y - Description of Parameter
width - Description of Parameter
height - Description of Parameter

paintGap

public void paintGap(java.awt.Graphics g,
                     int x,
                     int y,
                     int width,
                     java.awt.Component b)

paintWindow

public void paintWindow(java.awt.Graphics g,
                        int width,
                        int height,
                        int windowX,
                        int windowY,
                        int windowWidth,
                        int windowHeight,
                        java.awt.Component b)