Component | +--DhStyleBasepublic class DhStyleBase
Provides the superclass for classes that support styles, such as DhStyle objects and DhElement. Classes that extend DhStyleBase have certain typographic and other visual properties, such as colors, fonts, and so on.
Fields
Name | Description |
---|---|
BOLD | Used by the style attribute of the setFont method. |
ITALIC | Used by the style attribute of the setFont method. |
OK_TO_CACHE_STYLES | Setting this flag to false (default is true) forces all CSS styles to be drawn from the client peer instead of a cached value. |
STRIKEOUT | Used by the style attribute of the setFont method. |
UNDERLINE | Used by the style attribute of the setFont method. |
Constructors
Name | Description |
---|---|
DhStyleBase() | Topic under construction. |
DhStyleBase(int unit) | Topic under construction. |
Methods
Name | Description |
---|---|
ensurePaddings() | Topic under construction. |
getBackColor() | Retrieves the background color property. |
getBackgroundColor() | Retrieves the background color property. |
getBackgroundColorString() | Retrieves the background color property as a string. |
getBorderInfo() | Retrieves the DhBorderInfo class with informatioon about the current border state. |
getBounds() | Retrieves the position and size of the element. |
getClipRect() | Retrieves the current clipping rectangle. |
getClipString() | Retrieves the current clip setting string. |
getColor() | Retrieves the text foreground color property. |
getCursor() | Retrieves the cursor style for this element. |
getCursorString() | Retrieves the cursor style for this element. |
getFont() | Topic under construction. |
getFontName() | Retrieves the font name for this element. |
getFontSize() | Retrieves the size of the font for this element. |
getFontStyle() | Topic under construction. |
getForeColor() | Retrieves the foreground color property. |
getHeightUnit() | Retrieves the height unit. |
getLeftUnit() | Retrieves the left position unit. |
getLocation() | Retrieves the position (or location) of the element. |
getMarginWidthInfo() | Retrieves a DhMarginWidthInfo class describing the current margin settings for this element. |
getPaddingWidthInfo() | Retrieves a DhPaddingWidthInfo class describing the current padding width settings for this element. |
getPositionInfo() | Topic under construction. |
getSize() | Retrieves the size of the element. |
getStyleInt(String strStyleKey) | Retrieves the style number. |
getStyleString(String strStyleKey) | Retrieves the style. |
getStyleText() | Retrieves the underlying CSS text string. |
getTextAlignment( ) | Retrieves the current text alignment setting. |
getTextVerticalAlign( ) | Retrieves the current text alignment setting. |
getTopUnit() | Retrieves the top position unit. |
getVisible() | Retrieves the visibility state of this element. |
getWidthUnit() | Retrieves the width unit. |
getZIndex() | Retrieves the z-index (layering) ordering of this element with respect to its container. |
hasDefaultBackColor() | Determines if the background color is set to the default. |
hasDefaultFont() | Topic under construction. |
hasDefaultForeColor() | Determines if the background color is the default (black). |
hasDefaultLocation() | Topic under construction. |
hasDefaultPositionInfo() | Topic under construction. |
hasDefaultSize() | Topic under construction. |
hasDefaultZIndex() | Topic under construction. |
setBackColor(Color color) | Sets the background color of the element. |
setBackgroundColor(int color) | Sets the background color of the element. |
setBackgroundColor(String color) | Sets the background color of the element. |
setBorderColor( int nBordermask, String strColor ) | Sets the border color to the specified value. |
setBorderColor( String strColor ) | Sets all border colors to the specified value. |
setBorderColor( int nBorderMask, int nColor ) | Sets the border color to the specified value defined in DhColors. |
setBorderColor( int nColor ) | Sets all border colors to the specified value defined in DhColor. |
setBorderInfo( DhBorderInfo biNew ) | Updates the border styles for this element. |
setBorderStyle( int nBorderMask, String strStyle ) | Sets the border style to a specified value. |
setBorderStyle( String strStyle ) | Sets all border styles to a specified value. |
setBorderStyle( int nBorderMask, int nBorderKey ) | Sets the style to a specified value constant. |
setBorderStyle( int nBorderKey ) | Sets the style to a specified value constant. |
setBorderWidth( int nBorderMask, String strWidth ) | Sets the border width to the value specified. |
setBorderWidth( int nBorderMask, int nWidth, int nUnitKey ) | Sets the border width to the value and unit specified. |
setBorderWidth( int nWidth, int nUnitKey ) | Sets all border widths to the value and unit specified. |
setBorderWidth( String strWidth ) | Sets the border width to the value specified. |
setBorderWidth( int nBorderWidthKey ) | Sets the border width to the value specified. |
setBounds(int x, int y, int width, int height) | Sets the position and size of the element. |
setBounds(Rectangle rect) | Sets the position and size of the element. |
setClip( Rectangle r ) | Sets the clipping rectangle. |
setClip( String strClip ) |
Sets the clipping rectangle string in the form:
rect( top, right, bottom, left ) where top, left, bottom or right can be "auto" or a length measurement. |
setColor(int color) | Sets the text color (and other foreground objects). |
setColor(String color) | Sets the color for foreground objects, such as text. |
setCursor( int nCursor ) | Sets the cursor style for this element. |
setCursor( String strCursor ) | Sets the cursor style for this element. |
setFont(String name, int size, int style) | Sets the font value for this element. |
setFont(String name, int size) | Sets the font value for this element. |
setFont(Font font) | Topic under construction. |
setForeColor(Color color) | Sets the color of foreground objects, such as text. |
setHeightUnit( int h, int unit ) | Sets the height of the element. |
setLeftUnit( int v, int unit ) | Sets the left position of the element. |
setLocation(int x, int y) | Sets the position of the element. |
setLocation( Point pt ) | Sets the position of the element. |
setMarginWidth( int nWidth, int nUnit ) | Sets the width of all the margins to the specified value. |
setMarginWidth( int nMarginMask, int nWidth, int nUnit ) | Sets the width of the margins to the specified value. |
setMarginWidthInfo( DhMarginWidthInfo mwi ) | Sets the margins widths according to those in a DhMarginWidthInfo class. |
setPaddingWidth( int nWidth, int nUnit ) | Sets the width of all paddings to the specified value. |
setPaddingWidth( int nPaddingMask, int nWidth, int nUnit ) | Sets the width of the padding to the specified value. |
setPaddingWidthInfo( DhPaddingWidthInfo mwi ) | Sets the padding widths according to those in a DhPaddingWidthInfo class. |
setPositionInfo(PositionInfo posi) | Topic under construction. |
setSize(int w, int h) | Sets the size of the element. |
setSize(Point pt) | Sets the size of the element. |
setStyle(String strStyleKey, String value) | Sets the style. |
setStyleInt(String strStyleKey, int value) | Sets the style. |
setTextAlignment( int nAlignment ) | Sets the text alignment style. |
setTextVerticalAlign( int nVerticalAlign ) | Sets the text vertical alignment style. |
setTopUnit( int t, int unit ) | Sets the top position of the element. |
setVisible( boolean visible ) | Sets the visiblility of the element. |
setWidthUnit( int w, int unit ) | Sets the width of the element. |
setZIndex( int i ) | Sets the z-index (layering) order of this element relative to the other elements in its container. |
Topic under construction.
Topic under construction.
Topic under construction.
Returns one of the DhColors constants.
Retrieves the background color property.
Returns one of the DhColors constants.
Retrieves the background color property.
Returns a string representing the current background color.
Retrieves the background color property as a string.
Returns the border information class.
Retrieves the DhBorderInfo class with informatioon about the current border state.
Returns the location of the element as a Rectangle object.
Retrieves the position and size of the element.
Returns a Rectangle object with the current clipping rectangle values. If the values are undefined or "auto", -1 is returned.
Retrieves the current clipping rectangle.
Returns the clip string.
Retrieves the current clip setting string.
Returns one of the DhColors constants.
Retrieves the text foreground color property.
Returns the current cursor type.
Retrieves the cursor style for this element. For predefined values, see DhCursorEnum.
Returns the current cursor type.
Retrieves the cursor style for this element. For details, see the CSS cursor reference in the CSS Attributes reference of the Internet Client SDK (http://www.microsoft.com/msdn/sdk/inetsdk/help/dhtml/references/css/cursor.htm).
Topic under construction.
Returns the name of the font family (for example, "arial").
Retrieves the font name for this element.
Returns the size of the font for this element.
Retrieves the size of the font for this element.
Topic under construction.
Returns one of the DhColors constants.
Retrieves the foreground color property.
Returns one of DhUnitEnum constants to express the units of measurement.
Retrieves the height unit.
Returns one of DhUnitEnum constants to express the units of measurement.
Retrieves the left position unit.
Returns the location of the element.
Retrieves the position (or location) of the element.
Returns a DhMarginWidthInfo class.
Retrieves a DhMarginWidthInfo class describing the current margin settings for this element.
Returns a DhPaddingWidthInfo class.
Retrieves a DhPaddingWidthInfo class describing the current padding width settings for this element.
Topic under construction.
Returns the size of the element as a Point object.
Retrieves the size of the element.
Retrieves the style number. Calling this method directly is not part of the normal usage of this package. You should use more specific style methods (for example, DhStyleBase.getFontName).
Returns the style string.
Retrieves the style. Calling this method directly is not part of the normal usage of this package. You should use more specific style methods (for example, DhStyleBase.getFontName).
Returns the underlying CSS text string for this object.
Retrieves the underlying CSS text string. (This is a very advanced feature of the library and is not part of normal usage scenarios.)
Returns the current alignment as LEFT (default), RIGHT, CENTER, or JUSTIFY from DhAlignEnum.
Retrieves the current text alignment setting.
Returns the current alignment. This can be one of the following values found in DhAlignEnum:
Retrieves the current text alignment setting.
Returns one of DhUnitEnum constants to express the units of measurement.
Retrieves the top position unit.
Returns true if element is visible; otherwise, returns false.
Retrieves the visibility state of this element.
Returns one of DhUnitEnum constants to express the units of measurement.
Retrieves the width unit.
Returns the z-index value set by setZIndex.
Retrieves the z-index (layering) ordering of this element with respect to its container.
Returns true if the background color is the default (white); otherwise, returns false.
Determines if the background color is set to the default.
Topic under construction.
Returns true if successful; otherwise, returns false.
Determines if the background color is the default (black).
Topic under construction.
Topic under construction.
Topic under construction.
Topic under construction.
Sets the background color of the element. If never set, the background color used is that of the container.
Sets the background color of the element. If never set, the background color used is that of the container.
Sets the background color of the element. If never set, the background color used is that of the container.
Sets the border color to the specified value. It can be a hexadecimal color (for example, "#F0F0FF") or a defined color word (for example, "white", "black", "blue", and so on.)
Sets all border colors to the specified value. The color can be a hexadecimal color (for example, "#F0F0FF") or a defined color word (for example, "white", "black", "blue", and so on.)
Sets the border color to the specified value defined in DhColors.
Sets all border colors to the specified value defined in DhColor.
Updates the border styles for this element.
Sets the border style to a specified value.
Sets all border styles to a specified value.
Sets the style to a specified value constant.
Sets the style to a specified value constant.
Sets the border width to the value specified. Border width is in the following form:
<border-width> ::= thick | medium | thin | none | <width-value> <width-value> ::= <integer><unit> <unit> ::= px | pc | pt | em | in | mm | cm | ex
Sets the border width to the value and unit specified.
Sets all border widths to the value and unit specified.
Sets the border width to the value specified.
Sets the border width to the value specified.
Sets the position and size of the element.
Sets the position and size of the element.
Sets the clipping rectangle. Regions outside the clipping rectangle will not be drawn.
Sets the clipping rectangle string in the form:
rect( top, right, bottom, left )
where top, left, bottom or right can be "auto" or a length measurement.
Sets the text color (and other foreground objects).
Sets the color for foreground objects, such as text.
Sets the cursor style for this element. For predefined values, see DhCursorEnum.
Sets the cursor style for this element. For details, see the CSS cursor reference in the CSS Attributes reference of the Internet Client SDK (http://www.microsoft.com/msdn/sdk/inetsdk/help/dhtml/references/css/cursor.htm).
Sets the font value for this element.
Sets the font value for this element.
Topic under construction.
Sets the color of foreground objects, such as text.
Sets the height of the element.
Sets the left position of the element.
Sets the position of the element.
Sets the position of the element.
Sets the width of all the margins to the specified value.
Sets the width of the margins to the specified value.
Sets the margins widths according to those in a DhMarginWidthInfo class.
Sets the width of all paddings to the specified value.
Sets the width of the padding to the specified value.
Sets the padding widths according to those in a DhPaddingWidthInfo class.
Topic under construction.
Sets the size of the element.
Sets the size of the element.
IllegalArgumentException thrown if either width or height is less than 0.
Sets the style.
Calling this method directly is not part of the normal usage of this package. You should use the more specific style methods (for example, DhStyleBase.setFont).
Sets the style.
Calling this method directly is not part of the normal usage of this package. You should use the more specific style methods (for example, DhStyleBase.setFont).
Sets the text alignment style.
IllegalArgumentException Thrown if nAlignment is not one of the above values.
Sets the text vertical alignment style.
IllegalArgumentException Thrown if nAlignment is not one of the above values.
Sets the top position of the element.
Sets the visiblility of the element.
Sets the width of the element.
Sets the z-index (layering) order of this element relative to the other elements in its container. The lower the number, the further back this element is displayed. The element with the highest number z-index in any given container is displayed over all other elements.