Decision Center API

ilog.webui.dhtml.components
Class IlxWTextElement

java.lang.Object
  extended by ilog.webui.dhtml.IlxWContainer
      extended by ilog.webui.dhtml.IlxWComponent
          extended by ilog.webui.dhtml.components.IlxWTextElement
All Implemented Interfaces:
ilog.webui.dhtml.IlxWConstants, ilog.webui.dhtml.IlxWCSSModelProvider, ilog.webui.dhtml.IlxWDependencyProvider, ilog.webui.dhtml.IlxWJSObject, Serializable

public class IlxWTextElement
extends IlxWComponent

A text element. The text element component renders an HTML element containing the text associated with this component.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class ilog.webui.dhtml.IlxWComponent
IlxWComponent.DynamicStyleMap
 
Field Summary
 
Fields inherited from class ilog.webui.dhtml.IlxWContainer
listenerList
 
Constructor Summary
IlxWTextElement()
          Constructs an empty text element.
IlxWTextElement(String text)
          Constructs a text element with the given text.
 
Method Summary
 String getText()
          Gets the text of this component.
protected  void printComponent(IlxWPort port)
          Prints the HTML code that will display the graphical representation of this component.
 void setText(String text)
          Sets the text of this component.
 
Methods inherited from class ilog.webui.dhtml.IlxWComponent
addPropertyChangeListener, addPropertyChangeListener, detach, doPrint, firePropertyChange, firePropertyChange, getName, getRealHtmlTagName, getStyle, invalidate, isInvalidated, notifyDependencies, print, removePropertyChangeListener, removePropertyChangeListener, setName, validate
 
Methods inherited from class ilog.webui.dhtml.IlxWContainer
add, add, getAttribute, getAttributeNames, getComponent, getComponentCount, getComponentNamed, getComponents, getManager, getParent, getUserAgentRules, indexOf, isAncestorOf, remove, remove, removeAll, removeAttribute, setAttribute, setAuthorRules, setFinalizer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlxWTextElement

public IlxWTextElement()
Constructs an empty text element.


IlxWTextElement

public IlxWTextElement(String text)
Constructs a text element with the given text.

Parameters:
text - any string.
Method Detail

setText

public void setText(String text)
Sets the text of this component. This method is a shortcut to:
getStyle().set("text", text)

Parameters:
text - a string. If null, removes the text style from the dynamic style object.

getText

public String getText()
Gets the text of this component. This method is a shortcut to:
getStyle().get("text")

Returns:
A string. "" is returned if the text style is not set.

printComponent

protected void printComponent(IlxWPort port)
                       throws IOException
Description copied from class: IlxWComponent
Prints the HTML code that will display the graphical representation of this component. This method is called by the IlxWComponent.print(ilog.webui.dhtml.IlxWPort) method.

Specified by:
printComponent in class IlxWComponent
Throws:
IOException
Parameters:
port - The port on which the component will be printed.
See Also:
IlxWComponent.print(ilog.webui.dhtml.IlxWPort)

Decision Center API

© Copyright IBM Corp. 1987, 2013