de.enough.polish.ui.borders
Class SimpleBorder

java.lang.Object
  extended by de.enough.polish.ui.Border
      extended by de.enough.polish.ui.borders.SimpleBorder
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PulsatingSimpleBorder

public class SimpleBorder
extends Border

Paints a plain border in one color.

Copyright Enough Software 2004 - 2009

Author:
Robert Virkus, robert@enough.de

Field Summary
protected  int color
           
protected  boolean isArgb
           
 
Fields inherited from class de.enough.polish.ui.Border
borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop
 
Constructor Summary
SimpleBorder(int color, int borderWidth)
          Creates a new simple border.
SimpleBorder(int color, int leftWidth, int rightWidth, int topWidth, int bottomWidth)
          Creates a new simple border.
 
Method Summary
 void paint(int x, int y, int width, int height, Graphics g)
          Paints this border.
 void setStyle(Style style)
          Allows borders to be animated using CSS attribute animations.
 
Methods inherited from class de.enough.polish.ui.Border
animate, animate, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, hideNotify, showNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

protected int color

isArgb

protected final boolean isArgb
Constructor Detail

SimpleBorder

public SimpleBorder(int color,
                    int borderWidth)
Creates a new simple border.

Parameters:
color - the color of this border in RGB, e.g. 0xFFDD12
borderWidth - the width of this border

SimpleBorder

public SimpleBorder(int color,
                    int leftWidth,
                    int rightWidth,
                    int topWidth,
                    int bottomWidth)
Creates a new simple border.

Parameters:
color - the color of this border in RGB, e.g. 0xFFDD12
leftWidth - the width of this border on the left side
rightWidth - the width of this border on the right side
topWidth - the width of this border at the top
bottomWidth - the width of this border at the bottom
Method Detail

paint

public void paint(int x,
                  int y,
                  int width,
                  int height,
                  Graphics g)
Description copied from class: Border
Paints this border.

Specified by:
paint in class Border
Parameters:
x - the horizontal start point
y - the vertical start point
width - the width of the border
height - the height of the border
g - the Graphics on which the border should be painted.

setStyle

public void setStyle(Style style)
Allows borders to be animated using CSS attribute animations.

Overrides:
setStyle in class Border
Parameters:
style - the style containing typically only one element