com.arsdigita.bebop
Class ActionLink
java.lang.Object
com.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BaseLink
com.arsdigita.bebop.ControlLink
com.arsdigita.bebop.ActionLink
- All Implemented Interfaces:
- Cloneable, Component, Lockable
- public class ActionLink
- extends ControlLink
A link that runs its action listeners when it is clicked. The target of the
link is the Page
in which the action link is contained.
Typically, an action link is used in the following way:
ActionLink l = new ActionLink("Send email to everybody");
l.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Link was clicked.");
... figure out who everybody is and send them email ...
}
});
See BaseLink
for a description of all Bebop Link classes
and suggestions for using them.
- Version:
- $Id: //core-platform/dev/src/com/arsdigita/bebop/ActionLink.java#7 $
- Author:
- David Lutterkort
Methods inherited from class com.arsdigita.bebop.BaseLink |
addPrintListener, clone, firePrintEvent, generateExtraXMLAttributes, generateXML, getChild, getNoJavascriptTarget, getTarget, removePrintListener, setChild, setConfirmation, setNoJavascriptTarget, setOnClick, setTarget, setTypeAttr, setupNoJavascriptURL |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
children, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, register, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
versionId
public static final String versionId
- See Also:
- Constant Field Values
TYPE_ACTION
protected final String TYPE_ACTION
- The value for the XML type attribute for an
ActionLink
.
- See Also:
- Constant Field Values
ActionLink
public ActionLink(Component child)
- Constructs a new ActionLink. The link encapsulates
the child component (usually either a label or an image).
- Parameters:
child
- the component to be turned into a link
ActionLink
public ActionLink(String label)
- Constructs a new ActionLink with the given string label.
- Parameters:
label
- the string label for the link
setControlEvent
public void setControlEvent(PageState s)
- Sets the page state's control event. Should be overridden by child
classes. By default, the link does not receive any control events.
- Overrides:
setControlEvent
in class ControlLink
- Parameters:
s
- the current page state
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC