DhStyleBase | +--DhElementpublic class DhElement
Represents the super class for all user interface (UI) elements in this package. An instance of this class should be thought of as the Java representation of a given UI element in an HTML document. DhElement objects are never created directly. Instead, you instantiate a derivation of this class and then add the instance to the document (or a container destined for, or already on, the document). Alternatively, you can call the DhDocument.findElement method to locate and bind to an existing element, then cast the return value to the proper derivation.
Also see DhStyle, DhText, DhDocument, DhSection, and DhPanel.
Fields
Name | Description |
---|---|
OK_TO_CACHE_ATTRIBUTES | Setting this flag to false (default is true) forces all HTML tag attributes to be drawn from the client peer instead of a cached value. |
OK_TO_EMIT_CODECLASS | Setting this flag to false (default is true) stops the default behavior of emitting the __CODECLASS attribute used exclusively by this package. |
Methods
Name | Description |
---|---|
addOnClick ( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnDoubleClick ( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnKeyDown ( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnKeyPress ( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnKeyUp ( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnMouseDown( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnMouseEnter( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnMouseLeave ( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnMouseMove( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnMouseUp ( DhEventHandler h ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
addOnSetParent(DhEventHandler h) | Sets up the callback that is invoked when the parent is set on this element. |
cloneSettings( DhElement eSrc ) | Topic under construction. |
dataSource() | Retrieves the data source for this element. |
generateHTML() | Retrieves a string that contains the representative HTML text for this element and all its child elements. |
getAlign( ) | Returns the alignment of the element. |
getDataField() | Retrieves the data field this element is to display. |
getDataSource() | Returns the current data source as a DhDataSource object. |
getDocument() | Retrieves the document object associated with this element. |
getElementCount() | Topic under construction. |
getElements() | Topic under construction. |
getEvents() | Retrieves the event event for this element. |
getHTMLGenerator() | Retrieves the current HTML generator for this element. |
getID() | Returns the ID attribute of the HTML element underlying this class. |
getLocation() | Topic under construction. |
getModule() | Retrieves the module object associated with element. |
getParent() | Retrieves the parent element which contains this element. |
getPeer() | Retrieves the underlying HTML peer element for this class. |
getSize() | Topic under construction. |
getStyle() | Retrieves the DhStyle style object associated with this element. |
getTagName() | Retrieves the string that contains the tag name that corresponds to this element given its current state (for example, "SPAN"). |
getTagNameID() | Returns the DhStringIDs string identifier that will be generated when the generateHTML method is called. |
getToolTip() | Retrieves the string that represents the tooltip that appears when the user's mouse pointer is hovering over this element. |
hasPeer() | Return the underlying HTML peer element for this class. |
onStateChange( int stateChange ) | Implements a callback method for the stateChange event. |
removeAttribute(String strAttr) |
removeOnClickfinal public void removeOnClick ( DhEventHandler h ); |
removeOnClick ( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnDoubleClick ( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnKeyDown ( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnKeyPress ( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnKeyUp ( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnMouseDown( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnMouseEnter( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnMouseLeave ( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnMouseMove( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnMouseUp ( DhEventHandler h ) |
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement. |
removeOnSetParent(DhEventHandler h) | Sets the alignment of the element. |
setAlign( int nAlign ) | |
setAttribute(String strAttr, String value) | |
setAttribute(String strAttr, String value) | |
setAttributeInt(String strAttr, int value) | Sets the data field for this object to display. |
setDataField( String strDataField ) | Sets the data source for this element. |
setDataSource( DhDataSource ds ) | Sets the data source for this element. |
setDataSource( DhElement dsParent ) | Sets the document that is associated with this element. |
setDocument( DhDocument document ) | Sets the height of the element using one of the DhUnit constants to express the units of measurement. |
setHeightUnit( int h, int unit ) | Sets the HTML generator to use for this element. |
setHTMLGenerator( DhHTMLGenerator htmlGen ) | Sets the size of the element. |
setSize(int w, int h) | Set the style object associated with this element. |
setStyle(DhStyle style) | Sets the tooltip that appears when the user's mouse pointer is hovering over this element. |
setToolTip(String string) | Sets the width of the element using one of the DhUnit constants to express the units of measurement. |
setWidthUnit( int w, int unit ) |
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets up the callback that is invoked when the parent is set on this element.
Topic under construction.
Returns s null for DhElement.
Retrieves the data source for this element.
Returns the HTML string that represents this element and all its children.
Retrieves a string that contains the representative HTML text for this element and all its child elements.
Returns the desired alignment, or returns -1 if alignment is uninitialized.
Returns the alignment of the element. Specified as one of the DhAlignEnum constants.
Returns the current field name.
Retrieves the data field this element is to display.
Returns the associated DhDataSourceObject, or returns null if there is not one attached.
Returns the current data source as a DhDataSource object. If there is no attached data source or another error occurs, null is returned.
Returns the DhDocument that this element has associated with it.
Retrieves the document object associated with this element.
Topic under construction.
Topic under construction.
Returns the event event for this element.
Retrieves the event event for this element. Despite the fact that this method is public in this class, most derivations hide it.
Retrieves the current HTML generator for this element.
Returns the string used for the ID attribute of the element.
Returns the ID attribute of the HTML element underlying this class. This ID is one persisted with the generateHTML method.
Note Calling this method is not typically part of the usage of this package. The package automatically generates an ID for all DhElements even if this method isn't directly called.
Topic under construction.
Returns the DhModule that this element has associated with it.
Retrieves the module object associated with element.
Returns the parent element that this element has associated with it.
Retrieves the parent element which contains this element.
Returns the element peer underlying the HTML peer for this class.
Retrieves the underlying HTML peer element for this class. This method may return null if the element or its parent was never added to a document. Java code that is running in a trusted environment can freely cast the resulting reference to a specific element peer type (for example, wfc.html.om.IHTMLElement). This method always returns null if the code is running in a Web server environment.
Note that calling this method represents a very advanced usage scenario. Typically, you would never use this method.
Topic under construction.
Returns the DhStyle style object associated with this element.
Retrieves the DhStyle style object associated with this element.
Retrieves the string that contains the tag name that corresponds to this element given its current state (for example, "SPAN").
Note that this value can change during the life of the instance. In many cases, it depends on specific attribute settings known only to the derivation of this class.
This method is not very useful except in special cases.
Returns s (int) the DhStringIDs string identifier for the tag name of this element. (The base class returns -1, an invalid ID.)
Returns the DhStringIDs string identifier that will be generated when the generateHTML method is called.
Returns the tooltip string.
Retrieves the string that represents the tooltip that appears when the user's mouse pointer is hovering over this element.
Returns the element peer underlying the HTML peer for this class, assuming it is available.
Return the underlying HTML peer element for this class. This method may return null even if the element or its parent was added to a document, but there hasn't been occasion to bind to its peer. Java code that is running in a trusted environment can freely cast the resulting reference to a specific element peer type (for example, wfc.html.om.IHTMLElement). This method always returns null if the code is running in a Web server environment.
Calling getPeer() retrieve the peer element even if the element hasn't had a chance to bind to the document yet.
Note that calling this method represents a very advanced usage scenario. Typically, you would never use this method.
Implements a callback method for the stateChange event. Derivations of this class that keep peers cached around must override this method and destroy that reference.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Removes the DhEventHandler event handler method callback.
Note that not all elements support all events exposed in DhElement.
Sets the alignment of the element. Specified as one of the DhAlignEnum constants.
Sets the data field for this object to display. This value must match the name of a returned column in the database queried by the current data source.
Sets the data source for this element.
Sets the data source for this element.
Sets the document that is associated with this element.
Care should be used when setting this value. Unexpected results in behavior can occur if done outside the confines of this package.
Sets the height of the element using one of the DhUnit constants to express the units of measurement.
Sets the HTML generator to use for this element. This allows you to override the library's default method of generating HTML syntax to represent an element.
Sets the size of the element.
Set the style object associated with this element.
Sets the tooltip that appears when the user's mouse pointer is hovering over this element.
Sets the width of the element using one of the DhUnit constants to express the units of measurement.