| com.sun.rave.designtime.DesignInfo
All known Subclasses: org.netbeans.modules.visualweb.faces.dt.converter.NumberConverterDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_1.component.html.HtmlCommandLinkDesignInfo, org.netbeans.modules.visualweb.xhtml.XhtmlDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_2.component.UISelectItemsDesignInfo, org.netbeans.modules.visualweb.faces.dt.HtmlDesignInfoBase, org.netbeans.modules.visualweb.faces.dt.component.EncodingComponentDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_2.component.html.HtmlOutputFormatDesignInfo, com.sun.rave.designtime.impl.BasicDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_1.component.UISelectItemDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_2.component.html.HtmlDataTableDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_1.component.html.HtmlMessagesDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_2.component.html.HtmlMessagesDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_1.component.html.HtmlOutputLinkDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_2.component.html.HtmlCommandLinkDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_1.component.UISelectItemsDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_1.component.html.HtmlOutputFormatDesignInfo, org.netbeans.modules.visualweb.web.ui.dt.AbstractDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_2.component.html.HtmlGraphicImageDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_2.component.UISelectItemDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_1.component.html.HtmlGraphicImageDesignInfo, org.netbeans.modules.visualweb.dataconnectivity.designtime.CachedRowSetXImplDesignInfo, org.netbeans.modules.visualweb.dataprovider.designtime.AbstractDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_2.component.html.HtmlOutputLinkDesignInfo, org.netbeans.modules.visualweb.faces.dt_1_1.component.html.HtmlDataTableDesignInfo,
DesignInfo | public interface DesignInfo extends DesignBeanListener(Code) | | The DesignInfo interface is another type of BeanInfo interface to provide more live design-
time functionality for a JavaBean. BeanInfo represents static meta-data about a JavaBean, while
DesignInfo provides dynamic design-time behavior.
To provide a DesignInfo for a JavaBean, a component author must provide an implementation
of the DesignInfo interface available at design-time that matches the name of the JavaBean
class with "DesignInfo" appended to it.
For example, a component author may supply a JavaBean class named 'com.company.Donkey', and
may also supply a corresponding 'com.company.DonkeyBeanInfo' (implements BeanInfo) as well as
'com.company.DonkeyDesignInfo' (implements DesignInfo). Note that these cannot be the same
class, as there is no gaurantee that the supplied BeanInfo class will be the same instance that
is used in the designer - typically, a BeanInfo class is 'deep-copied' into another instance
inside of an IDE.
IMPLEMENTED BY THE COMPONENT AUTHOR - This interface is designed to be implemented by
the component (bean) author. BasicDesignInfo is supplied for convenience for subclassing.
author: Joe Nuxoll version: 1.0 See Also: com.sun.rave.designtime.impl.BasicDesignInfo |
Method Summary | |
public boolean | acceptChild(DesignBean parentBean, DesignBean childBean, Class childClass) Returns true if this child component (passed as 'childBean' and/or
'childClass') can be added as a child to the specified parent component (passed as
'parentBean'). | public boolean | acceptLink(DesignBean targetBean, DesignBean sourceBean, Class sourceClass) This method is called when an object from a design surface or palette is being dragged 'over'
a JavaBean type handled by this DesignInfo. | public boolean | acceptParent(DesignBean parentBean, DesignBean childBean, Class childClass) Returns true if this child component (passed as 'childBean' and/or
'childClass') can be added as a child to the specified parent component (passed as
'parentBean'). | public Result | beanCreatedSetup(DesignBean designBean) Provides an opportunity for a DesignInfo to setup the initial state of a newly created
bean. | public Result | beanDeletedCleanup(DesignBean designBean) Provides an opportunity for a DesignInfo to cleanup just before a bean gets deleted.
Anything can be done here, including property settings, event hooks, and even the
creation/deletion of other ancillary beans within the context. | public Result | beanPastedSetup(DesignBean designBean) Provides an opportunity for a DesignInfo to fix-up the state of a pasted bean. | public Class | getBeanClass() | public DisplayAction[] | getContextItems(DesignBean designBean) Returns the list (or hierarchy) of items to be included in a right-click context menu for
this bean at design-time. | public Result | linkBeans(DesignBean targetBean, DesignBean sourceBean) This method is called when an object from a design surface or palette is being dropped or
has been dropped 'on' a JavaBean type handled by this DesignInfo (to establish a link). |
acceptChild | public boolean acceptChild(DesignBean parentBean, DesignBean childBean, Class childClass)(Code) | | Returns true if this child component (passed as 'childBean' and/or
'childClass') can be added as a child to the specified parent component (passed as
'parentBean'). This allows a component author to dynamically inspect the component hierarchy
to determine if a particular component may be inserted.
This method is called on the DesignInfo representing the parentBean component any time a
new component is being created or dragged around in the visual designer.
Note that the 'childBean' argument may be null if this operation is happening as a result
of a fresh component drop from the palette. In that case, the child component instance will
not be created until the actual drop happens, thus these checks must be done with only the
child component's Class.
Parameters: parentBean - The DesignBean representing the potential parent component to receive thechild Parameters: childBean - The DesignBean representing the potential child component that is beingcreated or reparented. This argument may be null if this represents an initial dragfrom the palette, where the child bean has not been instantiated yet. Parameters: childClass - The Class object representing the potential child component that is beingcreated or reparented. true if this child bean is suitable for this parent bean, orfalse if not |
acceptLink | public boolean acceptLink(DesignBean targetBean, DesignBean sourceBean, Class sourceClass)(Code) | | This method is called when an object from a design surface or palette is being dragged 'over'
a JavaBean type handled by this DesignInfo. If the 'sourceBean' or 'sourceClass' is of
interest to the 'targetBean' instance or vice-versa (they can be "linked"), this method
should return true . The user will then be presented with visual cues that this
is an appropriate place to 'drop' the item and establish a link. If the user decides to drop
the item on this targetBean, the 'linkBeans' method will be called. Note that the
'sourceBean' argument may be null if this drag operation is originating from the palette,
because an instance of the bean will not have been created yet.
Parameters: targetBean - The DesignBean instance that the user is 'hovering' the mouse over Parameters: sourceBean - The DesignBean instance that the user may potentially 'drop' to link - maybe null if this drag operation originated from the palette, because the instance willnot have been created yet Parameters: sourceClass - The class type of the object that the user may potentially 'drop' to link true if the 'targetBean' cares to have the 'sourceBean' or an instanceof type 'sourceClass' linked to it, false if not See Also: linkBeans(DesignBean, DesignBean) |
acceptParent | public boolean acceptParent(DesignBean parentBean, DesignBean childBean, Class childClass)(Code) | | Returns true if this child component (passed as 'childBean' and/or
'childClass') can be added as a child to the specified parent component (passed as
'parentBean'). This allows a component author to dynamically inspect the component hierarchy
to determine if a particular component may be inserted.
This method is called on the DesignInfo representing the childBean component any time a
new component is being created, or dragged around in the visual designer.
Note that the 'childBean' argument may be null if this operation is happening as a result
of a fresh component drop from the palette. In that case, the child component instance will
not be created until the actual drop happens, thus these checks must be done with only the
child component's Class.
Parameters: parentBean - The DesignBean representing the potential parent component to receive thechild Parameters: childBean - The DesignBean representing the potential child component that is beingcreated or reparented. This argument may be null if this represents an initial dragfrom the palette, where the child bean has not been instantiated yet. Parameters: childClass - The Class object representing the potential child component that is beingcreated or reparented. true if this parent bean is suitable for this child bean, orfalse if not |
beanCreatedSetup | public Result beanCreatedSetup(DesignBean designBean)(Code) | | Provides an opportunity for a DesignInfo to setup the initial state of a newly created
bean. Anything can be done here, including property settings, event hooks, and even the
creation of other ancillary beans within the context. Note that this method is only called
once after the component has been first created from the palette.
Parameters: designBean - The bean that was just created A Result object, indicating success or failure and including messages for the user |
beanDeletedCleanup | public Result beanDeletedCleanup(DesignBean designBean)(Code) | | Provides an opportunity for a DesignInfo to cleanup just before a bean gets deleted.
Anything can be done here, including property settings, event hooks, and even the
creation/deletion of other ancillary beans within the context. Note, however, that this
DesignBean will be deleted immediately upon the return of this method. This is intended for
cleanup of ancillary items created in 'beanCreated'.
Parameters: designBean - The bean that is about to be deleted A Result object, indicating success or failure and including messages for the user |
beanPastedSetup | public Result beanPastedSetup(DesignBean designBean)(Code) | | Provides an opportunity for a DesignInfo to fix-up the state of a pasted bean. Anything can
be done here, including property settings, event hooks, and even the creation of other
ancillary beans within the context.
Parameters: designBean - The bean that was just pasted from the clipboard A Result object, indicating success or failure and including messages for the user |
getBeanClass | public Class getBeanClass()(Code) | | Returns the class type of the JavaBean that this DesignInfo was designed to work with
The JavaBean's class type object |
getContextItems | public DisplayAction[] getContextItems(DesignBean designBean)(Code) | | Returns the list (or hierarchy) of items to be included in a right-click context menu for
this bean at design-time.
Parameters: designBean - The DesignBean that a user has right-clicked on An array of DisplayAction objects representing a context menu to display to the user |
linkBeans | public Result linkBeans(DesignBean targetBean, DesignBean sourceBean)(Code) | | This method is called when an object from a design surface or palette is being dropped or
has been dropped 'on' a JavaBean type handled by this DesignInfo (to establish a link). This
method will not be called unless the corresponding 'acceptLink' method call returned
true for at least one of the beans involved. Typically, this results in new
property settings on potentially both of the DesignBean objects.
Parameters: targetBean - The target DesignBean instance that the user has 'dropped' an object ontoto establish a link Parameters: sourceBean - The DesignBean instance that has been 'dropped' A Result object, indicating success or failure and including messages for the user See Also: acceptLink(DesignBean, DesignBean, Class) |
|
|