|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WCssDecorationStyle
public class WCssDecorationStyle
A style class for a single widget or style sheet rule.
You can manipulate the decoration style of a single widget using
WWidget#getDecorationStyle() or you can
use a WCssDecorationStyle to add a rule to the inline style sheet
using
WCssStyleSheet#addRule().
| Nested Class Summary | |
|---|---|
static class |
WCssDecorationStyle.Repeat
How a background image must be repeated. |
static class |
WCssDecorationStyle.TextDecoration
Text decoration options. |
| Constructor Summary | |
|---|---|
WCssDecorationStyle()
Creates a default style. |
|
| Method Summary | |
|---|---|
WColor |
getBackgroundColor()
Returns the background color. |
java.lang.String |
getBackgroundImage()
Returns the background image URL. |
WCssDecorationStyle.Repeat |
getBackgroundImageRepeat()
Returns the background image repeat. |
WBorder |
getBorder()
Returns the border style. |
WBorder |
getBorder(Side side)
Returns the border style. |
Cursor |
getCursor()
Returns the cursor style. |
java.lang.String |
getCursorImage()
Returns the cursor image. |
WFont |
getFont()
Returns the font. |
WColor |
getForegroundColor()
Returns the text color. |
java.util.EnumSet<WCssDecorationStyle.TextDecoration> |
getTextDecoration()
Returns the text decoration options. |
void |
setBackgroundColor(WColor color)
Sets the background color. |
void |
setBackgroundImage(java.lang.String url)
Sets a background image. |
void |
setBackgroundImage(java.lang.String url,
WCssDecorationStyle.Repeat repeat)
Sets a background image. |
void |
setBackgroundImage(java.lang.String url,
WCssDecorationStyle.Repeat repeat,
java.util.EnumSet<Side> sides)
Sets a background image. |
void |
setBackgroundImage(java.lang.String url,
WCssDecorationStyle.Repeat repeat,
Side side,
Side... sides)
Sets a background image. |
void |
setBackgroundImage(WLink image)
Sets a background image. |
void |
setBackgroundImage(WLink image,
WCssDecorationStyle.Repeat repeat)
Sets a background image. |
void |
setBackgroundImage(WLink image,
WCssDecorationStyle.Repeat repeat,
java.util.EnumSet<Side> sides)
Sets a background image. |
void |
setBackgroundImage(WLink image,
WCssDecorationStyle.Repeat repeat,
Side side,
Side... sides)
Sets a background image. |
void |
setBorder(WBorder border)
Sets the border style. |
void |
setBorder(WBorder border,
java.util.EnumSet<Side> sides)
Sets the border style. |
void |
setBorder(WBorder border,
Side side,
Side... sides)
Sets the border style. |
void |
setCursor(Cursor c)
Sets the cursor style. |
void |
setCursor(java.lang.String cursorImage)
Sets a custom cursor image Url. |
void |
setCursor(java.lang.String cursorImage,
Cursor fallback)
Sets a custom cursor image Url. |
void |
setFont(WFont font)
Sets the text font. |
void |
setForegroundColor(WColor color)
Sets the text color. |
void |
setTextDecoration(java.util.EnumSet<WCssDecorationStyle.TextDecoration> options)
Sets text decoration options. |
void |
setTextDecoration(WCssDecorationStyle.TextDecoration option,
WCssDecorationStyle.TextDecoration... options)
Sets text decoration options. |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
getId, getObjectName, remove, setObjectName, tr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WCssDecorationStyle()
| Method Detail |
|---|
public void setCursor(Cursor c)
public Cursor getCursor()
setCursor(Cursor c)
public void setCursor(java.lang.String cursorImage,
Cursor fallback)
The Url should point to a .cur file (this shoul be a real .cur file, renaming an .ico is not enough for Internet Explorer).
public final void setCursor(java.lang.String cursorImage)
Calls setCursor(cursorImage, Cursor.ArrowCursor)
public java.lang.String getCursorImage()
setCursor(Cursor c)public void setBackgroundColor(WColor color)
public WColor getBackgroundColor()
setBackgroundColor(WColor color)
public void setBackgroundImage(WLink image,
WCssDecorationStyle.Repeat repeat,
java.util.EnumSet<Side> sides)
The link may be a URL or a resource.
The image may be placed in a particular location by specifying sides by
OR'ing Side values together, e.g. (Right | Top).
public final void setBackgroundImage(WLink image,
WCssDecorationStyle.Repeat repeat,
Side side,
Side... sides)
Calls
setBackgroundImage(image, repeat, EnumSet.of(side, sides))
public final void setBackgroundImage(WLink image)
Calls
setBackgroundImage(image, WCssDecorationStyle.Repeat.RepeatXY,
EnumSet.noneOf(Side.class))
public final void setBackgroundImage(WLink image,
WCssDecorationStyle.Repeat repeat)
Calls
setBackgroundImage(image, repeat, EnumSet.noneOf(Side.class))
public void setBackgroundImage(java.lang.String url,
WCssDecorationStyle.Repeat repeat,
java.util.EnumSet<Side> sides)
The image may be placed in a particular location by specifying sides by
OR'ing Side values together, e.g. (Right | Top).
public final void setBackgroundImage(java.lang.String url,
WCssDecorationStyle.Repeat repeat,
Side side,
Side... sides)
Calls
setBackgroundImage(url, repeat, EnumSet.of(side, sides))
public final void setBackgroundImage(java.lang.String url)
Calls
setBackgroundImage(url, WCssDecorationStyle.Repeat.RepeatXY,
EnumSet.noneOf(Side.class))
public final void setBackgroundImage(java.lang.String url,
WCssDecorationStyle.Repeat repeat)
Calls
setBackgroundImage(url, repeat, EnumSet.noneOf(Side.class))
public java.lang.String getBackgroundImage()
setBackgroundImage(WLink image,
WCssDecorationStyle.Repeat repeat, EnumSet sides)public WCssDecorationStyle.Repeat getBackgroundImageRepeat()
setBackgroundImage(WLink image,
WCssDecorationStyle.Repeat repeat, EnumSet sides)public void setForegroundColor(WColor color)
public WColor getForegroundColor()
setForegroundColor(WColor color)
public void setBorder(WBorder border,
java.util.EnumSet<Side> sides)
The given border will be set for the specified
sides.
A different border style may be specified for each of the four sides.
public final void setBorder(WBorder border,
Side side,
Side... sides)
Calls setBorder(border,
EnumSet.of(side, sides))
public final void setBorder(WBorder border)
Calls setBorder(border,
Side.All)
public WBorder getBorder(Side side)
Returns the border style set using
setBorder() for the given side.
Note: Prior to version 3.1.9 it was not possible to pass a
side and only one border could be configured.
public final WBorder getBorder()
Returns getBorder(Side.Top)
public void setFont(WFont font)
public WFont getFont()
setFont(WFont font)public void setTextDecoration(java.util.EnumSet<WCssDecorationStyle.TextDecoration> options)
You may logically or together any of the options of the TextDecoration enumeration.
The default is 0.
public final void setTextDecoration(WCssDecorationStyle.TextDecoration option,
WCssDecorationStyle.TextDecoration... options)
Calls setTextDecoration(EnumSet.of(option, options))
public java.util.EnumSet<WCssDecorationStyle.TextDecoration> getTextDecoration()
setTextDecoration(EnumSet options)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||