com.arsdigita.ui.sitemap
Class DisplayActions
java.lang.Object
com.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.SimpleContainer
com.arsdigita.bebop.BoxPanel
com.arsdigita.ui.sitemap.DisplayActions
- All Implemented Interfaces:
- ActionListener, BebopConstants, ChangeListener, Cloneable, Component, Container, EventListener, Lockable
- public class DisplayActions
- extends BoxPanel
- implements ActionListener, ChangeListener
The DisplayActions class does the following: It listens for
change events in the
Tree selection model, and when it detects one, it draws two box panels;
one above the other. The Top box panel is for SiteNode info and cfg, and the
bottom is for package instance cfg.
import com.arsdigita.ui.util.GlobalizationUtil ;
Every time a selection event is heard, this class:
- 1) Gets the ID of the node
- 2) creates a site node from the ID
- 3) Extracts the Name of the node
- 4) Builds a title for the top box panel with a call to this.makeTitle()
- 5) Determines if there is a package instance mounted on the node.
import com.arsdigita.ui.util.GlobalizationUtil ;
If there is, the title for the bottom is set with a call to makelowertitle.
- 6) sets visible the appropriate action links for the node, like this:
- a) If Node has no instance, and is a leaf node, Offer "AddSubnode",
"SetPermissions", and "RemoveNode" action options in the Top panel.
"MountPackageInstance" is offered in the lower panel.
- b) If node has no instance, but it has children, then offer "AddSubnode",
and "SetPermissions" in the Top panel, and "MountPackageInstance"
in the Lower Panel.
- c) If Node has an instance, offer "SetPermissions" and "AddSubnode"
in top panel, and "unmountInstance" in lower panel;
- Author:
- Jim Parsons
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Fields inherited from interface com.arsdigita.bebop.util.BebopConstants |
BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA |
Methods inherited from class com.arsdigita.bebop.SimpleContainer |
add, add, children, contains, generateChildrenXML, generateParent, get, getNamespace, getTag, indexOf, isEmpty, setNamespace, setTag, size |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, register, respond, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
Methods inherited from interface com.arsdigita.bebop.Component |
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
versionId
public static final String versionId
- See Also:
- Constant Field Values
DisplayActions
public DisplayActions(SingleSelectionModel m)
- Constructor for DisplayActions
actionPerformed
public void actionPerformed(ActionEvent e)
- Description copied from interface:
ActionListener
- Invoked when an action has been performed.
- Specified by:
actionPerformed
in interface ActionListener
computeDefaultState
public DisplayActions.NodeState computeDefaultState(PageState p)
- The computeDefaultState method.
This method:
1) gets key of selected tree node
2) generates SiteNode from the key
3) Determines if the node has any children
4) Determines if an instance is mounted on the node
stateChanged
public void stateChanged(ChangeEvent e)
- stateChanged listens for Tree select events.
- Specified by:
stateChanged
in interface ChangeListener
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC