eu.webtoolkit.jwt
Class WBorder

java.lang.Object
  extended by eu.webtoolkit.jwt.WBorder

public class WBorder
extends java.lang.Object

A value class that defines the CSS border style of a widget.


Nested Class Summary
static class WBorder.Style
          Enumeration for border style.
static class WBorder.Width
          Enumeration for border width.
 
Constructor Summary
WBorder()
          Creates a border indicating no border.
WBorder(WBorder.Style style)
          Creates a border with given style, thickness and color.
WBorder(WBorder.Style style, WBorder.Width width)
          Creates a border with given style, thickness and color.
WBorder(WBorder.Style style, WBorder.Width width, WColor color)
          Creates a border with given style, thickness and color.
WBorder(WBorder.Style style, WLength width)
          Creates a border with an absolute width.
WBorder(WBorder.Style style, WLength width, WColor color)
          Creates a border with an absolute width.
 
Method Summary
 WBorder clone()
          Clone method.
 boolean equals(WBorder other)
          Indicates whether some other object is "equal to" this one.
 WColor getColor()
          Returns the border color.
 java.lang.String getCssText()
          Returns the CSS text for this border style.
 WLength getExplicitWidth()
          Returns the border width when set explicitly.
 WBorder.Style getStyle()
          Returns the border style.
 WBorder.Width getWidth()
          Returns the border width.
 void setColor(WColor color)
          Sets the border color.
 void setStyle(WBorder.Style style)
          Sets the border style.
 void setWidth(WBorder.Width width)
          Sets the border width.
 void setWidth(WBorder.Width width, WLength explicitWidth)
          Sets the border width.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBorder

public WBorder()
Creates a border indicating no border.


WBorder

public WBorder(WBorder.Style style,
               WBorder.Width width,
               WColor color)
Creates a border with given style, thickness and color.


WBorder

public WBorder(WBorder.Style style)
Creates a border with given style, thickness and color.

Calls this(style, WBorder.Width.Medium, new WColor())


WBorder

public WBorder(WBorder.Style style,
               WBorder.Width width)
Creates a border with given style, thickness and color.

Calls this(style, width, new WColor())


WBorder

public WBorder(WBorder.Style style,
               WLength width,
               WColor color)
Creates a border with an absolute width.


WBorder

public WBorder(WBorder.Style style,
               WLength width)
Creates a border with an absolute width.

Calls this(style, width, new WColor())

Method Detail

equals

public boolean equals(WBorder other)
Indicates whether some other object is "equal to" this one.


setWidth

public void setWidth(WBorder.Width width,
                     WLength explicitWidth)
Sets the border width.

If width == Explicit, then the width specified in explicitWidth is used.


setWidth

public final void setWidth(WBorder.Width width)
Sets the border width.

Calls setWidth(width, WLength.Auto)


setColor

public void setColor(WColor color)
Sets the border color.


setStyle

public void setStyle(WBorder.Style style)
Sets the border style.


getWidth

public WBorder.Width getWidth()
Returns the border width.

See Also:
setWidth(WBorder.Width width, WLength explicitWidth)

getExplicitWidth

public WLength getExplicitWidth()
Returns the border width when set explicitly.

See Also:
setWidth(WBorder.Width width, WLength explicitWidth)

getColor

public WColor getColor()
Returns the border color.

See Also:
setColor(WColor color)

getStyle

public WBorder.Style getStyle()
Returns the border style.

See Also:
setStyle(WBorder.Style style)

getCssText

public java.lang.String getCssText()
Returns the CSS text for this border style.


clone

public WBorder clone()
Clone method.

Clones this border.

Overrides:
clone in class java.lang.Object