Decision Center API

ilog.webui.dhtml.components
Class IlxWIcon

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

public class IlxWIcon
extends IlxWComponent

An icon component.

An icon components is rendered as an <img> HTML element.

The icon to display is designated by a path, corresponding to the value of the "path" CSS style of the component. This path references a GIF resource file, which will be retrieved either as a resource in the current servlet context, or if it does not exist, as a Java resource in the current class loader stack.

See Also:
ServletContext.getResourceAsStream(java.lang.String), Class.getResourceAsStream(java.lang.String), 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
IlxWIcon()
          Constructs a new IlxWIcon, with an empty path ("").
IlxWIcon(String path)
          Constructs an new IlxWIcon with the given path.
 
Method Summary
 String getPath()
          Gets the path of the icon.
protected  void printComponent(IlxWPort port)
          Prints the HTML code that will display the graphical representation of this component.
 void setPath(String path)
          Set the path of the icon.
 
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

IlxWIcon

public IlxWIcon()
Constructs a new IlxWIcon, with an empty path ("").


IlxWIcon

public IlxWIcon(String path)
Constructs an new IlxWIcon with the given path.

Method Detail

setPath

public void setPath(String path)
Set the path of the icon.
This method is a shortcut to:
getStyle().set("path", path)

Parameters:
path - a resource path. If null the path is considered as "" (empty path).

getPath

public String getPath()
Gets the path of the icon.
This method is a shortcut to:
getStyle().get("path")

Returns:
The path to the icon.

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