DataPaletteTagDriver Class
- public abstract class DataPaletteTagDriver
extends Object
implements IDataPaletteViewDriver
Base driver for dynamically populating the JSP Designer's Data Palette
view with palette actions on a tag specific basis.
Related Topics
IGenerator
-
Hierarchy
-
Object
DataPaletteTagDriver
-
All Implemented Interfaces
-
IDataPaletteViewDriver
-
DataPaletteTagDriver(
IDOMDocument doc, ITagLibraryFeature.ITagInfoEx tagInfo)
- Class constructor specifying target DOM document and information
about tag that is to be populated in the Data Palette.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_context
protected IDataPaletteViewDriver.IDataPaletteViewContext
_context
- Data palette context.
_doc
protected IDOMDocument
_doc
- Document associated with driver.
_element
protected IDOMSourceElement
_element
- DOM element that data palette population will occur for.
_tagInfo
protected ITagLibraryFeature.ITagInfoEx
_tagInfo
- Extra information associated with this tag.
DataPaletteTagDriver
public DataPaletteTagDriver(IDOMDocument
doc,
ITagLibraryFeature.ITagInfoEx
tagInfo)
- Class constructor specifying target DOM document and information
about tag that is to be populated in the Data Palette.
canDelete(IAction) Method
public boolean canDelete(IAction
element)
Determines whether the specified action can be deleted from the
data palette. The default implementation always returns false.
Derived tag palette drivers should override to allow different
behavior. If true is returned then it is considered safe to
call the DataPaletteTagDriver.delete(IAction)
method.
Parameters
-
element
- Action element to be deleted.
Returns
- Default behavior returns false.
delete(IAction) Method
public void delete(IAction
element)
Deletes the specified action and document elements associated with
it. Default behavior is to do nothing which is consistent with the
default behavior for DataPaletteTagDriver.canDelete(IAction)
which returns false.
Derived classes should override to implement desired behavior.
Parameters
-
element
- Action element to be deleted.
getContext() Method
protected IDataPaletteViewDriver.IDataPaletteViewContext
getContext()
Returns the Data Palette context associated with this drver.
Returns
- Data palette context.
getElement() Method
public IDOMSourceElement
getElement()
Returns the DOM element that palette population will occur for.
This element is set by a call to DataPaletteTagDriver.setElement(IDOMSourceElement)
.
Returns
- DOM element for which palette population will occur.
getPopupMenu(IAction) Method
public JPopupMenu
getPopupMenu(IAction
el)
Requests the menu to display for this action on a right click
event. Default behavior is to return null. Derived classes
should override this method to implement desired behavior.
Parameters
-
el
- Action for which popup menu is being requested.
Returns
- Default behavior is to return null.
getPropertyInfo(IAction) Method
public List
getPropertyInfo(IAction
element)
Returns a list of IPropertyNodes. This list is the top level of the
property heirarchy displayed in the property view. The property view
expects that all top level nodes represent property groups and will
not display values for these nodes. After the top-level, nodes
implementing IProperty will display a value.
If this element has no displayable properties, an empty List should
be returned. Use of Collections.EMPTY_LIST is recommended.
Returns
- List of IPropertyNode. May not be null, may be empty.
Default behavior returns Collections.EMPTY_LIST.
getTagInfoEx() Method
public ITagLibraryFeature.ITagInfoEx
getTagInfoEx()
Returns the tag information object for this driver.
Returns
- Tag information object associated with this tag.
populate(IActionContainer, IDOMSourceElement) Method
protected abstract boolean populate(IActionContainer
container,
IDOMSourceElement
element)
Adds actions to the given container. Called by the data palette when
an action container needs to be populated for a given DOM element.
Derived palette tag drivers must implement this method.
Parameters
-
container
- The IActionContainer that needs to be populated.
-
element
- The DOM element for the tag that is being
populated.
Returns
- true if items were added to the menu, false if there
were no items added.
populate(IActionContainer) Method
public boolean populate(IActionContainer
container)
Adds actions to the given container.
Delegates to DataPaletteTagDriver.populate(IActionContainer, IDOMSourceElement)
passing _element for the second parameter.
Parameters
-
container
- The IActioncontainer that needs to be populated.
Returns
- true if items were added to the menu, false if there
were no items added.
setContext(IDataPaletteViewDriver.IDataPaletteViewContext) Method
public void setContext(IDataPaletteViewDriver.IDataPaletteViewContext
context)
Sets the view context for this driver. Can be used to request
information or actions from the view.
Parameters
-
context
- Context to be associated with driver.
setElement(IDOMSourceElement) Method
public void setElement(IDOMSourceElement
element)
Sets the DOM element that data palette population will occur for.
Parameters
-
element
- DOM element for which palette should be
populated.