Decision Center API

ilog.webui.dhtml.components
Class IlxWLink

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

public class IlxWLink
extends ilog.webui.dhtml.components.IlxWLabelWrapper

Hyperlink component.

This component is rendered either as an <a href> HTML element or as an interactive <span> HTML element, depending on the target browser. It is made up of a label component which you can retrieve through getLabel.

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.components.IlxWLabelWrapper
cssDescriptor, cssModel, label
 
Fields inherited from class ilog.webui.dhtml.IlxWContainer
listenerList
 
Constructor Summary
IlxWLink()
          Creates an empty link component.
IlxWLink(String text)
          Creates a link component displaying the given text.
 
Method Summary
 void addActionListener(ActionListener l)
          Adds the specified action listener to receive action events from this links.
protected  IlxWAction createDefaultAction()
          Creates the action which will be returned by default by getAction.
protected  void fireActionPerformed()
          Notifies all listeners that have registered interest for notification on this event type.
 IlxWAction getAction()
          Gets the action which will be called when the user clicks on the link.
 IlxWLabel getLabel()
          Gets the child label component.
 void notifyDependencies(IlxWPort port)
           
protected  void printComponent(IlxWPort port)
          Prints the HTML code that will display the graphical representation of this component.
protected  void printHtmlTagAttributes(IlxWPort port)
           
 void removeActionListener(ActionListener l)
          Removes the specified action listener so that it no longer receives action events from this textfield.
 void setAction(IlxWAction action)
          Sets the action which will be called when the user clicks on the link.
 
Methods inherited from class ilog.webui.dhtml.components.IlxWLabelWrapper
getCSSModel, getIconPath, getIcoPath, getText, setIconPath, setText
 
Methods inherited from class ilog.webui.dhtml.IlxWComponent
addPropertyChangeListener, addPropertyChangeListener, detach, doPrint, firePropertyChange, firePropertyChange, getName, getRealHtmlTagName, getStyle, invalidate, isInvalidated, 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

IlxWLink

public IlxWLink()
Creates an empty link component.


IlxWLink

public IlxWLink(String text)
Creates a link component displaying the given text.

Method Detail

getLabel

public IlxWLabel getLabel()
Gets the child label component.

Overrides:
getLabel in class ilog.webui.dhtml.components.IlxWLabelWrapper
Returns:
The child label component.

setAction

public void setAction(IlxWAction action)
Sets the action which will be called when the user clicks on the link.

Parameters:
action - The action to perform.
See Also:
getAction()

getAction

public IlxWAction getAction()
Gets the action which will be called when the user clicks on the link.

By default, this action is a Java action (IlxWJavaAction) of which the perform method calls fireActionPerformed() on the link component.

Returns:
The action to perform when the user clicks on the link.
See Also:
setAction(ilog.webui.dhtml.components.IlxWAction)

createDefaultAction

protected IlxWAction createDefaultAction()
Creates the action which will be returned by default by getAction.

See Also:
getAction(), setAction(ilog.webui.dhtml.components.IlxWAction)

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.

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

printHtmlTagAttributes

protected void printHtmlTagAttributes(IlxWPort port)
                               throws IOException
Throws:
IOException

addActionListener

public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this links.

Action listeners are fired by the default action.

Parameters:
l - The action listener.
See Also:
createDefaultAction(), setAction(ilog.webui.dhtml.components.IlxWAction)

removeActionListener

public void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this textfield.

Parameters:
l - The action listener.

fireActionPerformed

protected void fireActionPerformed()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method. The listener list is processed in last to first order.


notifyDependencies

public void notifyDependencies(IlxWPort port)
Specified by:
notifyDependencies in interface ilog.webui.dhtml.IlxWDependencyProvider
Overrides:
notifyDependencies in class IlxWComponent

Decision Center API

© Copyright IBM Corp. 1987, 2013