org.xwiki.gwt.dom.client
Class Style

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.dom.client.Style
          extended by org.xwiki.gwt.dom.client.Style

public class Style
extends com.google.gwt.dom.client.Style

Extends the Style to add constants for standard property names and values.

Version:
$Id: Style.java 20042 2009-05-16 12:12:50Z sdumitriu $

Nested Class Summary
static class Style.Display
          Standard values for DISPLAY.
static class Style.FontSize
          The font-size property sets the size of a font.
static class Style.FontStyle
          Standard values for FONT_STYLE.
static class Style.FontWeight
          Standard values for FONT_WEIGHT.
static class Style.Position
          Standard values for POSITION.
static class Style.TextAlign
          The text-align property aligns the text in an element.
static class Style.TextDecoration
          Standard values for TEXT_DECORATION.
static class Style.Visibility
          Standard values for VISIBILITY.
 
Nested classes/interfaces inherited from class com.google.gwt.dom.client.Style
com.google.gwt.dom.client.Style.BorderStyle, com.google.gwt.dom.client.Style.Cursor, com.google.gwt.dom.client.Style.HasCssName, com.google.gwt.dom.client.Style.ListStyleType, com.google.gwt.dom.client.Style.Overflow, com.google.gwt.dom.client.Style.Unit, com.google.gwt.dom.client.Style.VerticalAlign
 
Field Summary
static java.lang.String BACKGROUND_COLOR
          Sets the background color of an element.
static java.lang.String DISPLAY
          Sets how/if an element is displayed.
static Property FONT_FAMILY
          The font-family property is a prioritized list of font family names and/or generic family names for an element.
static Property FONT_SIZE
          The font-size property sets the size of a font.
static Property FONT_STYLE
          Sets the style of a font.
static Property FONT_WEIGHT
          Sets how thick or thin characters in text should be displayed.
static java.lang.String HEIGHT
          sets the height of an element.
static java.lang.String LEFT
          Sets how far the left edge of an element is to the right/left of the left edge of the parent element.
static java.lang.String POSITION
          Places an element in a static, relative, absolute or fixed position.
static java.lang.String STYLE_ATTRIBUTE
          The name of the style attribute.
static Property TEXT_ALIGN
          The text-align property aligns the text in an element.
static Property TEXT_DECORATION
          Decorates the text.
static java.lang.String TOP
          Sets how far the top edge of an element is above/below the top edge of the parent element.
static java.lang.String VISIBILITY
          The visibility property sets if an element should be visible or invisible.
static java.lang.String WIDTH
          Sets the width of an element.
static java.lang.String Z_INDEX
          Sets the stack order of an element.
 
Constructor Summary
protected Style()
          Default constructor.
 
Method Summary
static java.lang.String toCamelCase(java.lang.String propertyName)
          Some browsers expect the camel case form of a style property.
 
Methods inherited from class com.google.gwt.dom.client.Style
clearBackgroundColor, clearBackgroundImage, clearBorderColor, clearBorderStyle, clearBorderWidth, clearBottom, clearColor, clearCursor, clearDisplay, clearFontSize, clearFontStyle, clearFontWeight, clearHeight, clearLeft, clearListStyleType, clearMargin, clearMarginBottom, clearMarginLeft, clearMarginRight, clearMarginTop, clearOpacity, clearOverflow, clearPadding, clearPaddingBottom, clearPaddingLeft, clearPaddingRight, clearPaddingTop, clearPosition, clearProperty, clearRight, clearTextDecoration, clearTop, clearVisibility, clearWidth, clearZIndex, getBackgroundColor, getBackgroundImage, getBorderColor, getBorderStyle, getBorderWidth, getBottom, getColor, getCursor, getDisplay, getFontSize, getFontStyle, getFontWeight, getHeight, getLeft, getListStyleType, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOpacity, getOverflow, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPosition, getProperty, getRight, getTextDecoration, getTop, getVerticalAlign, getVisibility, getWidth, getZIndex, setBackgroundColor, setBackgroundImage, setBorderColor, setBorderStyle, setBorderWidth, setBottom, setColor, setCursor, setDisplay, setFontSize, setFontStyle, setFontWeight, setHeight, setLeft, setListStyleType, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setOpacity, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPosition, setProperty, setProperty, setPropertyPx, setRight, setTextDecoration, setTop, setVerticalAlign, setVerticalAlign, setVisibility, setWidth, setZIndex
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STYLE_ATTRIBUTE

public static final java.lang.String STYLE_ATTRIBUTE
The name of the style attribute.

See Also:
Constant Field Values

DISPLAY

public static final java.lang.String DISPLAY
Sets how/if an element is displayed.

See Also:
Constant Field Values

BACKGROUND_COLOR

public static final java.lang.String BACKGROUND_COLOR
Sets the background color of an element.

See Also:
Constant Field Values

Z_INDEX

public static final java.lang.String Z_INDEX
Sets the stack order of an element. An element with greater stack order is always in front of another element with lower stack order.
Elements can have negative stack orders.
Z-index only works on elements that have been positioned (eg position:absolute;)!

See Also:
Constant Field Values

FONT_WEIGHT

public static final Property FONT_WEIGHT
Sets how thick or thin characters in text should be displayed.


FONT_STYLE

public static final Property FONT_STYLE
Sets the style of a font.


TEXT_DECORATION

public static final Property TEXT_DECORATION
Decorates the text.


TEXT_ALIGN

public static final Property TEXT_ALIGN
The text-align property aligns the text in an element.


FONT_FAMILY

public static final Property FONT_FAMILY
The font-family property is a prioritized list of font family names and/or generic family names for an element. The browser will use the first value it recognizes.
There are two types of font-family values: Note: Separate each value with a comma, and always offer a generic-family name as the last alternative.
Note: If a family-name contains white-space, it should be quoted. Single quotes must be used when using the "style" attribute in HTML.


FONT_SIZE

public static final Property FONT_SIZE
The font-size property sets the size of a font.


WIDTH

public static final java.lang.String WIDTH
Sets the width of an element.

See Also:
Constant Field Values

HEIGHT

public static final java.lang.String HEIGHT
sets the height of an element.

See Also:
Constant Field Values

TOP

public static final java.lang.String TOP
Sets how far the top edge of an element is above/below the top edge of the parent element.

See Also:
Constant Field Values

LEFT

public static final java.lang.String LEFT
Sets how far the left edge of an element is to the right/left of the left edge of the parent element.

See Also:
Constant Field Values

POSITION

public static final java.lang.String POSITION
Places an element in a static, relative, absolute or fixed position.

See Also:
Constant Field Values

VISIBILITY

public static final java.lang.String VISIBILITY
The visibility property sets if an element should be visible or invisible. Even invisible elements takes up space on the page. Use the DISPLAY property to create invisible elements that do not take up space.

See Also:
Constant Field Values
Constructor Detail

Style

protected Style()
Default constructor. Needs to be protected because all instances are created from JavaScript.

Method Detail

toCamelCase

public static java.lang.String toCamelCase(java.lang.String propertyName)
Some browsers expect the camel case form of a style property. For instance, the camel case form of "font-weight" is "fontWeight".

Parameters:
propertyName - The name of style property.
Returns:
The camel case form of the given property name.


Copyright © 2004-2010 XWiki. All Rights Reserved.