ControlDataPaletteViewDriver Class

com.bea.ide.control
ControlDataPaletteViewDriver Class

public class ControlDataPaletteViewDriver

    extends DefaultDataPaletteDriver

Implements a IDataPaletteView driver for control containers.


Hierarchy
Object
  DefaultDataPaletteDriver
    ControlDataPaletteViewDriver
All Implemented Interfaces

IDataPaletteViewDriver

Nested Class Summary

public static classControlDataPaletteViewDriver.ControlMethodGenerator
           Utility class to generate methods available for control instances.
public static classControlDataPaletteViewDriver.JavaMethodAction
           Currently a dummy class so we can populate the data palette with control methods.
protected static classControlDataPaletteViewDriver.MethodComparator
           Compare by method name.
 
Nested classes from  com.bea.ide.ui.palette.DefaultDataPaletteDriver
DefaultDataPaletteDriver.ControlMenuAction
 

Field Summary

protected Class
_callbackActionClass
Class
protected static Icon
_callbackIcon
Icon for a callback.
protected ControlContainerDocument
_doc
ControlContainerDocument
protected IElementChangeListener
_elementModifiedListener
Listener for linked documents that have no parse tree yet.
protected Class
_methodActionClass
Class
protected static Icon
_methodIcon
Icon for a method.
public static final String
PROP_ControlMethod
String
public static final String
PROP_ControlVariable
String
   
Fields from  com.bea.ide.ui.palette.DefaultDataPaletteDriver
_controlIcon, _res, PROP_ControlInterface, PROP_ControlLocator
 

Constructor Summary

ControlDataPaletteViewDriver(ControlContainerDocument doc)

Construct a new driver for a given document.
 

Method Summary

protected void
addCallbacks(IActionContainer group, JavaClass member, ControlVariable variable)
Add callbacks in the class to the datapalette.
protected void
addContainer(IActionContainer parent, ControlVariable member)
Populate a new container with the available methods of the control
protected void
addMethods(IActionContainer group, JavaClass member, ControlVariable variable)
Add methods in the class to the datapalette.
public boolean
canDelete(IAction action)
Determines whether the specified action can be deleted from the data palette.
public void
delete(IAction action)
Deletes the specified action and document elements associated with it.
protected Icon
getControlIcon(IControlLocator cl)
Give overrides the change to set up the control icon if none is found...
public List
getPropertyInfo(IAction action)
Return property information for display in the property view.
public boolean
populate(IActionContainer palette)
Adds actions to the given container.
public void
setCallbackAction(Class callbackActionClass)
This sets the Action to take when dragging a callback from the datapalette.
public void
setMethodAction(Class methodActionClass)
This sets the Action to take when dragging a method from the datapalette.
 
Methods from  com.bea.ide.ui.palette.DefaultDataPaletteDriver
createControlPopup, createMenuItem, createMenuItem, getContext, getControlListPopupMenu, getControlMenuActions, getPopupMenu, populateControlContainer, populateControlContainer, setContext
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.ide.ui.palette.IDataPaletteViewDriver
canDelete, delete, getPopupMenu, getPropertyInfo, populate, setContext
 

Field Detail

_callbackActionClass

protected Class _callbackActionClass


_callbackIcon

protected static Icon _callbackIcon
Icon for a callback.


_doc

protected ControlContainerDocument _doc


_elementModifiedListener

protected IElementChangeListener _elementModifiedListener
Listener for linked documents that have no parse tree yet.


_methodActionClass

protected Class _methodActionClass


_methodIcon

protected static Icon _methodIcon
Icon for a method.


PROP_ControlMethod

public static final String PROP_ControlMethod


PROP_ControlVariable

public static final String PROP_ControlVariable

 

Constructor Detail

ControlDataPaletteViewDriver

public ControlDataPaletteViewDriver(ControlContainerDocument doc)
Construct a new driver for a given document.
 

Method Detail

addCallbacks(IActionContainer, JavaClass, ControlVariable) Method

protected void addCallbacks(IActionContainer group, 
                            JavaClass member, 
                            ControlVariable variable)
Add callbacks in the class to the datapalette.


addContainer(IActionContainer, ControlVariable) Method

protected void addContainer(IActionContainer parent, 
                            ControlVariable member)
Populate a new container with the available methods of the control


addMethods(IActionContainer, JavaClass, ControlVariable) Method

protected void addMethods(IActionContainer group, 
                          JavaClass member, 
                          ControlVariable variable)
Add methods in the class to the datapalette.


canDelete(IAction) Method

public boolean canDelete(IAction action)
Description copied from DefaultDataPaletteDriver.canDelete(IAction)
Determines whether the specified action can be deleted from the data palette. Typically called as a result of user interaction through the data palette view.

Overrides
DefaultDataPaletteDriver.canDelete(IAction)

Parameters

action
the object that is being deleted.

delete(IAction) Method

public void delete(IAction action)
Description copied from DefaultDataPaletteDriver.delete(IAction)
Deletes the specified action and document elements associated with it.

Overrides
DefaultDataPaletteDriver.delete(IAction)

Parameters

action
the object that is being deleted.

getControlIcon(IControlLocator) Method

protected Icon getControlIcon(IControlLocator cl)
Give overrides the change to set up the control icon if none is found...

Parameters

cl
control locator for which the icon should be found

Returns

control icon if any

getPropertyInfo(IAction) Method

public List getPropertyInfo(IAction action)
Return property information for display in the property view.

Overrides
DefaultDataPaletteDriver.getPropertyInfo(IAction)

Returns

List of IPropertyNode. May not be null, may be empty.

populate(IActionContainer) Method

public boolean populate(IActionContainer palette)
Description copied from IDataPaletteViewDriver.populate(IActionContainer)
Adds actions to the given container.

Parameters

palette
The IActioncontainer that needs to be populated

Returns

true if items were added to the menu, false if there were no items added

setCallbackAction(Class) Method

public void setCallbackAction(Class callbackActionClass)
This sets the Action to take when dragging a callback from the datapalette.

Parameters

callbackActionClass
the Class of the action (which must derive from DefaultAction) to take when a callback is dropped from the datapalette.

setMethodAction(Class) Method

public void setMethodAction(Class methodActionClass)
This sets the Action to take when dragging a method from the datapalette.

Parameters

methodActionClass
the Class of the action (which must derive from DefaultAction) to take when a method is dropped from the datapalette.