From 65b737758e2641d500d4b0ab88f3293ed3c71c3a Mon Sep 17 00:00:00 2001
From: Julien Dramaix
+ * The 'background' property is a shorthand property for setting the
+ * individual background properties (i.e., 'background-color',
+ * 'background-image', 'background-repeat',
+ * 'background-attachment' and 'background-position') at the
+ * same place in the style sheet.
+ *
+ * The 'background' property first sets all the individual background
+ * properties to their initial values, then assigns explicit values given in
+ * the declaration.
+ *
+ * If a background image is specified, this property specifies whether it is
+ * fixed with regard to the viewport ('fixed') or scrolls along with
+ * the containing block ('scroll').
+ *
+ * This property can only take a {@link BackgroundAttachment} object as value.
+ *
+ * This property sets the background color of an element, either a color value
+ * or the keyword 'transparent', to make the underlying colors shine through.
+ *
+ * This property can only take a {@link RGBColor} object as value.
+ *
+ * This property sets the background image of an element. When setting a
+ * background image, authors should also specify a background color that will
+ * be used when the image is unavailable. When the image is available, it is
+ * rendered on top of the background color. (Thus, the color is visible in the
+ * transparent parts of the image).
+ *
+ * This property takes a {@link ImageValue} object as value.
+ *
+ * If a background image has been specified, this property specifies its
+ * initial position. Values have the following meanings:
+ *
+ * This property takes a {@link BackgroundPosition} object as value.
+ *
+ * If a background image is specified, this property specifies whether the
+ * image is repeated (tiled), and how. All tiling covers the content and
+ * padding areas of a box
+ *
+ * This property takes a {@link BackgroundRepeat} object as value.
+ *
+ * The border property is a shorthand property for setting the same
+ * width, color, and style for all four borders of a box. Unlike the shorthand
+ * margin and padding properties, the border property
+ * cannot set different values on the four borders. To do so, one or more of
+ * the other border properties must be used.
+ *
+ * The border-bottom property is a shorthand property for setting the
+ * width, style, and color of the bottom border of a box.
+ *
+ * The border-bottom-color property specifies the color of the bottom
+ * border of a box.
+ *
+ * This property takes a {@link RGBColor} object as value.
+ *
+ * The border-bottom-style property specifies the line style of a box's
+ * bottom border (solid, double, dashed, etc.).
+ *
+ * This property takes a {@link LineStyle} object as value.
+ *
+ * The border-bottom-width property specifies the width of the bottom
+ * border of a box.
+ *
+ * This property takes a {@link LineWidth} or a {@link Length} object as
+ * value.
+ *
+ * The border-collapse selects a table's border model.
+ *
+ * This property takes a {@link BorderCollapse} object as value.
+ *
+ * The border-color property specifies the color of the 4 borders of a
+ * box.
+ *
+ * This property takes a {@link RGBColor} object as value.
+ *
+ * The border-left property is a shorthand property for setting the
+ * width, style, and color of the left border of a box.
+ *
+ * The border-left-color property specifies the color of the left
+ * border of a box.
+ *
+ * This property takes a {@link RGBColor} object as value.
+ *
+ * The border-left-style property specifies the line style of a box's
+ * left border (solid, double, dashed, etc.).
+ *
+ * This property takes a {@link LineStyle} object as value.
+ *
+ * The border-left-width property specifies the width of the left
+ * border of a box.
+ *
+ * This property takes a {@link LineWidth} or a {@link Length} object as
+ * value.
+ *
+ * The border-right property is a shorthand property for setting the
+ * width, style, and color of the right border of a box.
+ *
+ * The border-right-color property specifies the color of the right
+ * border of a box.
+ *
+ * This property takes a {@link RGBColor} object as value.
+ *
+ * The border-right-style property specifies the line style of a box's
+ * right border (solid, double, dashed, etc.).
+ *
+ * This property takes a {@link LineStyle} object as value.
+ *
+ * The border-right-width property specifies the width of the right
+ * border of a box.
+ *
+ * This property takes a {@link LineWidth} or a {@link Length} object as
+ * value.
+ *
+ * The border-spacing property specifies the distance that separates
+ * adjacent cell borders in a table context. If one length is specified, it
+ * gives both the horizontal and vertical spacing. If two are specified, the
+ * first gives the horizontal spacing and the second the vertical spacing.
+ * Lengths may not be negative.
+ *
+ * This property takes a {@link BorderSpacing} object as value.
+ *
+ * The border-style property specifies the line style of the 4 borders
+ * of a box (solid, double, dashed, etc.).
+ *
+ * This property takes a {@link LineStyle} object as value.
+ *
+ * The border-top property is a shorthand property for setting the
+ * width, style, and color of the top border of a box.
+ *
+ * The border-top-color property specifies the color of the top border
+ * of a box.
+ *
+ * This property takes a {@link RGBColor} object as value.
+ *
+ * The border-top-style property specifies the line style of a box's
+ * top border (solid, double, dashed, etc.).
+ *
+ * This property takes a {@link LineStyle} object as value.
+ *
+ * The border-top-width property specifies the width of the top border
+ * of a box.
+ *
+ * This property takes a {@link LineWidth} or a {@link Length} object as
+ * value.
+ *
+ * The border-width property specifies the width of the 4 border of a
+ * box.
+ *
+ * This property takes a {@link LineWidth} or a {@link Length} object as
+ * value.
+ *
+ * This property specifies how far a box's bottom content edge is offset above
+ * the bottom of the box's containing block.
+ *
* For absolutely positioned elements, the bottom property sets the bottom
- * edge of an element to a unit above/below the bottom edge of its containing
+ * edge of an element to a unit above the bottom edge of its containing
* element.
+ *
+ * For relatively positioned elements,it sets the bottom edge of an element to
+ * a unit above its normal position.
+ *
+ * For static positioned elements, the bottom property has no effect.
+ *
+ * This property takes a {@link Length} object as value.
+ *
+ * The caption-side property specifies the position of the caption box
+ * with respect to the table box.
+ *
+ * This property takes a {@link CaptionSide} object as value.
+ *
+ * The clear property indicates which sides of an element's box(es) may
+ * not be adjacent to an earlier floating box. (It may be that the element
+ * itself has floating descendants; the clear property has no effect on
+ * those.)
+ *
+ * This property takes a {@link Clear} object as value.
+ *
+ * In the separated borders model, The empty-cells/i> property controls the
+ * rendering of borders around cells that have no visible content. Empty cells
+ * and cells with the 'visibility' property set to 'hidden' are considered to
+ * have no visible content. Visible content includes " " and other
+ * whitespace except ASCII CR ("\0D"), LF ("\0A"), tab ("\09"), and space
+ * ("\20").
+ *
+ * When this property has the value 'show', borders are drawn around empty
+ * cells (like normal cells).
+ *
+ * A value of 'hide' means that no borders are drawn around empty cells.
+ * Furthermore, if all the cells in a row have a value of 'hide' and have no
+ * visible content, the entire row behaves as if it had 'display: none'.
+ *
+ *
+ *
+ * This property takes a {@link EmptyCells} object as value.
+ *
+ * The float property specifies whether a box should float to the left,
+ * right, or not at all. It may be set for elements that generate boxes that
+ * are not absolutely positioned. The values of this property have the
+ * following meanings:
+ *
+ *
+ * This property takes a {@link Float} object as value.
+ *
+ * This property specifies how far a box's left content edge is offset to the
+ * right of the left edge of the box's containing block.
+ *
* For absolutely positioned elements, the left property sets the left edge of
* an element to a unit to the left/right of the left edge of its containing
* element.
- *
+ *
* For relatively positioned elements, the left property sets the left edge of
* an element to a unit to the left/right to its normal position.
- *
+ *
* For static positioned elements, the left property has no effect.
+ *
+ * This property takes a {@link Length} object as value.
+ *
+ * The position property determines which of the CSS2 positioning
+ * algorithms is used to calculate the position of a box.
+ *
+ * This property takes a {@link Position} object as value.
+ *
+ * This property specifies how far a box's right content edge is offset to the
+ * left of the right edge of the box's containing block.
+ *
* For absolutely positioned elements, the right property sets the right edge
* of an element to a unit to the left/right of the right edge of its
* containing element.
- *
+ *
* For relatively positioned elements, the right property sets the right edge
* of an element to a unit to the left/right to its normal position.
- *
+ *
* For static positioned elements, the right property has no effect.
+ *
+ * This property takes a {@link Length} object as value.
+ *
+ * This property specifies how far a box's top content edge is offset below
+ * the top edge of the box's containing block.
+ *
* For absolutely positioned elements, the top property sets the top edge of
* an element to a unit above/below the top edge of its containing element.
- *
+ *
* For relatively positioned elements, the top property sets the top edge of
* an element to a unit above/below its normal position.
- *
+ *
* For static positioned elements, the top property has no effect.
+ *
+ * This property takes a {@link Length} object as value.
+ *
+ * For a positioned box, the i>z-index property specifies:
+ * Example :
+ *
+ * $("#myId").css(CSS.BACKGROUND, RGBColor.TRANSPARENT,
+ * ImageValue.url("back.jpg"), BackgroundRepeat.NO_REPEAT,
+ * BackgroundAttachment.SCROLL, BackgroundPosition.CENTER);
+ *
+ *
+ */
public static BackgroundProperty BACKGROUND;
/**
- * background image is specified, this property specifies whether it is fixed
- * with regard to the viewport ('fixed') or scrolls along with the containing
- * block ('scroll').
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BACKGROUND_ATTACHMENT, BackgroundAttachment.FIXED);
+ *
*/
public static BackgroundAttachmentProperty BACKGROUND_ATTACHMENT;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BACKGROUND_COLOR, RGBColor.AQUA);
+ * $("#myId2").css(CSS.BACKGROUND_COLOR, RGBColor.rgb("#112233"));
+ * $("#myId3").css(CSS.BACKGROUND_COLOR, RGBColor.rgb((35, 45, 55));
+ *
+ *
+ */
public static BackgroundColorProperty BACKGROUND_COLOR;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BACKGROUND_IMAGE, ImageValue.url("image.jpg"));
+ * $("#myId2").css(CSS.BACKGROUND_IMAGE, ImageValue.NONE);
+ *
+ *
+ */
public static BackgroundImageProperty BACKGROUND_IMAGE;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BACKGROUND_POSITION, BackgroundPosition.CENTER_TOP);
+ * $("#myId2").css(CSS.BACKGROUND_POSITION, BackgroundPosition.position(25, 25, Unit.PCT));
+ *
+ *
+ */
public static BackgroundPositionProperty BACKGROUND_POSITION;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BACKGROUND_REPEAT, BackgroundRepeat.REPEAT_X);
+ *
+ */
public static BackgroundRepeatProperty BACKGROUND_REPEAT;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER, LineWidth.THICK, LineStyle.DASHED, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER, LineWidth.length(3, Unit.PX), LineStyle.SOLID, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderProperty BORDER;
-
+
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_BOTTOM, LineWidth.THICK, LineStyle.DASHED, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_BOTTOM, LineWidth.length(3, Unit.PX), LineStyle.SOLID, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderProperty BORDER_BOTTOM;
-
+
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_BOTTOM_COLOR, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_BOTTOM_COLOR, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderColorProperty BORDER_BOTTOM_COLOR;
-
+
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_BOTTOM_STYLE, LineStyle.DASHED);
+ *
+ */
public static BorderStyleProperty BORDER_BOTTOM_STYLE;
-
+
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_BOTTOM_WIDTH, LineWidth.THICK);
+ * $("#myId2").css(CSS.BORDER_BOTTOM_WIDTH, Length.px(2));
+ *
+ */
public static BorderWidthProperty BORDER_BOTTOM_WIDTH;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_COLLAPSE, BorderCollapse.COLLAPSE);
+
+ *
+ */
public static BorderCollapseProperty BORDER_COLLAPSE;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_COLOR, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_COLOR, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderColorProperty BORDER_COLOR;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_LEFT, LineWidth.THICK, LineStyle.DASHED, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_LEFT, LineWidth.length(3, Unit.PX), LineStyle.SOLID, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderProperty BORDER_LEFT;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_LEFT_COLOR, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_LEFT_COLOR, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderColorProperty BORDER_LEFT_COLOR;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_LEFT_STYLE, LineStyle.DASHED);
+ *
+ */
public static BorderStyleProperty BORDER_LEFT_STYLE;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_BOTTOM_WIDTH, LineWidth.THICK);
+ * $("#myId2").css(CSS.BORDER_BOTTOM_WIDTH, Length.px(2));
+ *
+ */
public static BorderWidthProperty BORDER_LEFT_WIDTH;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_RIGHT, LineWidth.THICK, LineStyle.DASHED, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_RIGHT, LineWidth.length(3, Unit.PX), LineStyle.SOLID, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderProperty BORDER_RIGHT;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_RIGHT_COLOR, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_RIGHT_COLOR, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderColorProperty BORDER_RIGHT_COLOR;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_RIGHT_STYLE, LineStyle.DASHED);
+ *
+ */
public static BorderStyleProperty BORDER_RIGHT_STYLE;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_RIGHT_WIDTH, LineWidth.THICK);
+ * $("#myId2").css(CSS.BORDER_RIGHT_WIDTH, Length.px(2));
+ *
+ */
public static BorderWidthProperty BORDER_RIGHT_WIDTH;
+ /**
+ * Exampls:
+ *
+ *
+ * // specify a horizontal and vertical spacing of 15px
+ * $("#myId").css(CSS.BORDER_SPACING, new BorderSpacing(Length.px(15)));
+ *
+ * // specify a horizontal spacing of 10px and a vertical spacing of 20em
+ * $("#myId2").css(CSS.BORDER_SPACING, new BorderSpacing(Length.px(10), Length.em(20)));
+ *
+ */
public static BorderSpacingProperty BORDER_SPACING;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_STYLE, LineStyle.DASHED);
+ *
+ */
public static BorderStyleProperty BORDER_STYLE;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_TOP, LineWidth.THICK, LineStyle.DASHED, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_TOP, LineWidth.length(3, Unit.PX), LineStyle.SOLID, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderProperty BORDER_TOP;
+ /**
+ * Examples:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_TOP_COLOR, RGBColor.BLACK);
+ * $("#myId2").css(CSS.BORDER_TOP_COLOR, RGBColor.rgb("#000000"));
+ *
+ */
public static BorderColorProperty BORDER_TOP_COLOR;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_TOP_STYLE, LineStyle.DASHED);
+ *
+ */
public static BorderStyleProperty BORDER_TOP_STYLE;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_TOP_WIDTH, LineWidth.THICK);
+ * $("#myId2").css(CSS.BORDER_TOP_WIDTH, Length.px(2));
+ *
+ */
public static BorderWidthProperty BORDER_TOP_WIDTH;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BORDER_WIDTH, LineWidth.THICK);
+ * $("#myId2").css(CSS.BORDER_WIDTH, Length.px(2));
+ *
+ */
public static BorderWidthProperty BORDER_WIDTH;
+
/**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.BOTTOM,Length.px(20));
+ *
*/
public static EdgePositionProperty BOTTOM;
+
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.CAPTION_SIDE, CaptionSide.BOTTOM);
+ *
+ */
public static CaptionSideProperty CAPTION_SIDE;
/**
- * The clear property specifies which sides of an element where other floating
- * elements are not allowed.
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.CLEAR, Clear.BOTH);
+ *
*/
public static ClearProperty CLEAR;
@@ -127,12 +656,55 @@ public class CSS {
*/
public static DisplayProperty DISPLAY;
+ /**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.EMPTY_CELLS, EmptyCells.HIDE);
+ *
+ */
public static EmptyCellsProperty EMPTY_CELLS;
/**
- * This property specifies whether a box should float to the left, right, or
- * not at all. It may be set for any element, but only applies to elements
- * that generate boxes that are not absolutely positioned.
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.FLOAT, Float.LEFT);
+ *
*/
public static FloatProperty FLOAT;
@@ -157,14 +729,32 @@ public class CSS {
public static final String INHERIT_VALUE = "inherit";
/**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.LEFT,Length.px(20));
+ *
*/
public static EdgePositionProperty LEFT;
@@ -245,19 +835,50 @@ public class CSS {
public static PaddingProperty PADDING_TOP;
/**
- * The position property is used to position an element.
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.POSITION, Position.ABSOLUTE);
+ *
*/
public static PositionProperty POSITION;
/**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.RIGHT,Length.px(20));
+ *
*/
public static EdgePositionProperty RIGHT;
@@ -273,13 +894,31 @@ public class CSS {
public static TextTransformProperty TEXT_TRANSFORM;
/**
+ * Example:
+ *
+ *
+ * $("#myId").css(CSS.TOP,Length.px(20));
+ *
*/
public static EdgePositionProperty TOP;
@@ -316,6 +955,26 @@ public class CSS {
public static WordSpacingProperty WORD_SPACING;
+ /**
+ *
+ *
+ *
+ *
+ * This property takes a {@link CssNumber} object as value. + *
+ * + *+ * $("#myId").css(CSS.ZINDEX, new CssNumber(1000)); + *+ */ public static ZIndexProperty ZINDEX; static { diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CaptionSideProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CaptionSideProperty.java index 03bbc55d..7584587a 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CaptionSideProperty.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CaptionSideProperty.java @@ -18,20 +18,29 @@ package com.google.gwt.query.client.css; import com.google.gwt.dom.client.Style.HasCssName; /** - * This property describes how inline content of a block is aligned. + * This property specifies the position of the caption box with respect to the + * table box. */ public class CaptionSideProperty extends AbstractCssProperty