| java.lang.Object org.netbeans.modules.visualweb.insync.live.LiveUnit
Inner Class :public static class ClipImage | |
Method Summary | |
public void | addDesignContextListener(DesignContextListener listener) | public String | addResource(URL resource, boolean copy) | public boolean | canCreateBean(String type, DesignBean parent, Position pos) | public boolean | canCreateFacet(String facet, String type, DesignBean parent) | public boolean | canMoveBean(DesignBean lbean, DesignBean newParent, Position pos) | public Map | convertCssStyleToMap(String cssStyle) | public String | convertMapToCssStyle(Map cssStyleMap) | public Transferable | copyBeans(DesignBean[] beans) | public DesignBean | createBean(String type, DesignBean parent, Position pos) | protected SourceDesignBean | createBeanOrFacet(String type, DesignBean parent, String facet, Position pos) Creates a DesignBean given type, parent and facet spec. | public boolean | createContextMethod(ContextMethod method) Creates a new public method in the source code for this DesignContext. | protected SourceDesignBean | createDesignBean(SourceDesignBean.ClipImage image, DesignBean parent, Position pos) Creates a DesignBean given a clipboard image, parent and facet spec. | protected SourceDesignBean[] | createDesignBeans(ClipImage image, DesignBean parent, Position pos) Creates an array of DesignBeans given a clipboard image, parent and facet spec. | public DesignBean | createFacet(String facet, String type, DesignBean parent) | public boolean | deleteBean(DesignBean lbean) | public void | destroy() | public void | dumpTo(PrintWriter w) | protected void | fireBeanChanged(DesignBean bean) Fire a bean changed event to all of our listeners. | protected void | fireBeanCreated(DesignBean bean) Fire a bean created event to all of our listeners. | protected void | fireBeanDeleted(DesignBean bean) Fire a bean deleted event to all of our listeners. | protected void | fireBeanInstanceNameChanged(DesignBean bean, String oldName) Fire a bean instance name changed event to all of our listeners. | protected void | fireBeanMoved(DesignBean bean, DesignBean oldParent, Position pos) Fire a bean moved event to all of our listeners. | public void | fireContextActivated() Fire a context activated event to all of our listeners. | void | fireContextChanged() Fire a context changed event to all of our listeners. | public void | fireContextDeactivated() Fire a context deactivated event to all of our listeners. | protected void | fireEventChanged(DesignEvent event) Fire a property changed event to all of our listeners. | protected void | firePropertyChanged(DesignProperty prop, Object oldValue) Fire a property changed event to all of our listeners. | public static void | flushCaches() Flush our design info cache, as well as the Introspector one. | protected void | flushContextData() Flush our user data map to our underlying project item. | public static void | flushFromCaches(Class clz) | public DesignBean | getBeanByName(String name) | public DesignBean | getBeanEquivalentTo(DesignBean lookFor) | public DesignBean | getBeanForInstance(Object instance) | public DesignBean[] | getBeans() | public ArrayList | getBeansList() Return a list of the DesignBeans. | public DesignBean[] | getBeansOfType(Class type) | public BeansUnit | getBeansUnit() | public String | getBindingExpr(DesignBean toBean, String subExpr) | public String | getBindingExpr(DesignBean toBean) | public Object | getContextData(String key) | public long | getContextGeneration() Return the generation id for the current context.
Each contextChanged will create a new generation of
beans. | public ContextMethod | getContextMethod(String methodName, Class[] parameterTypes) Returns a
ContextMethod object describing the public method with the specified name
and parameter types. | public ContextMethod[] | getContextMethods() Returns a set of
ContextMethod objects describing the public methods declared on this
DesignContext (source file). | public Image | getCssPreviewImage(String cssStyle, String[] cssStyleClasses, com.sun.rave.designtime.markup.MarkupDesignBean bean, int width, int height) | public static Customizer2 | getCustomizer(String classname) | public String | getDescription() | public DesignBean | getDesignBean(Bean bean) Get the DesignBean that is managing a given java source bean. | public DesignContextListener[] | getDesignContextListeners() | public DesignInfo | getDesignInfo(Class beanClass, ClassLoader classLoder) Get the DesignInfo for a bean, returning the same instance for the same class, with
the exception that if a flushCaches() or flushFromCache() occurs. | public String | getDisplayName() | public ParserAnnotation[] | getErrors() | public FacesContext | getFacesContext() | public String | getHelpKey() | public Image | getLargeIcon() | public FacesModel | getModel() | public DesignProject | getProject() | public String | getReferenceName() | public DesignBean | getRootContainer() | public Image | getSmallIcon() | public BeansUnit | getSourceUnit() | public State | getState() | protected BeansDesignBean | instantiateDesignBean(BeanInfo beanInfo, DesignInfo liveBeanInfo, SourceDesignBean parent, Object instance, Bean bean) | public static boolean | isCssPositionable(DesignBean bean) Return true iff the given component is positionable via CSS (e.g. | public static boolean | isTrayBean(DesignBean bean) Return true iff the given component should be shown in the tray.
Parameters: bean - The bean to be checked true iff the bean declares that it is a "tray" component!!CQ TODO: need a better name. | public boolean | isValidBindingTarget(DesignBean toBean) | public static boolean | isVisualBean(DesignBean bean) Return true iff the given component is visual. | public boolean | isWriteLocked() | public boolean | moveBean(DesignBean lbean, DesignBean newParent, Position pos) | protected SourceDesignBean | newDesignBean(Class beanClass, BeanInfo beanInfo, DesignInfo liveBeanInfo, DesignBean parent, String facet, Position pos, String instanceName) | protected SourceDesignBean | newDesignBean(String type, DesignBean parent, String facet, Position pos, String instanceName) | public DesignBean[] | pasteBeans(Transferable persistData, DesignBean parent, Position pos) | protected void | populateDesignBean(SourceDesignBean.ClipImage image) | public void | readLock() | public void | readUnlock() | public static void | registerCustomizer(String classname, Customizer2 lc) | protected void | removeBean(DesignBean lbean) | public boolean | removeContextMethod(ContextMethod method) Removes an existing method from the source code for this DesignContext. | public void | removeDesignContextListener(DesignContextListener listener) | public boolean | reorderBeanChidren(DesignBean parentBean, int[] perm) | public void | resetFacesContextCurrentInstance() | public Object | resolveBindingExpr(String expr) | public ResolveResult | resolveBindingExprToBean(String expr) | public URL | resolveResource(String resource) | void | resurrect() | public void | setContextData(String key, Object data) | public void | setFacesContextCurrentInstance() | public boolean | sync() | public String | toString() | public ContextMethod | updateContextMethod(ContextMethod method) Updates an existing public method in the source code for this DesignContext. | public void | writeLock(UndoEvent event) | public boolean | writeUnlock(UndoEvent event) |
file | protected FileObject file(Code) | | |
hasResurectedSinceInstantiated | protected boolean hasResurectedSinceInstantiated(Code) | | |
itemAffected | protected boolean itemAffected(Code) | | |
nullDesignInfoMarker | final protected static Object nullDesignInfoMarker(Code) | | Marker object used to indicate that an entry in designInfos is null, since we cannot store
null into a map.
|
userData | HashMap userData(Code) | | User data managed and persisted by this context.
|
LiveUnit | public LiveUnit(FacesModel model, BeansUnit sourceUnit, FileObject file)(Code) | | Construct an BeansUnit from an existing source file
Parameters: model - Parameters: sourceUnit - Parameters: file - |
convertMapToCssStyle | public String convertMapToCssStyle(Map cssStyleMap)(Code) | | |
createBeanOrFacet | protected SourceDesignBean createBeanOrFacet(String type, DesignBean parent, String facet, Position pos)(Code) | | Creates a DesignBean given type, parent and facet spec. Gathers needed info and calls
newDesignBean within a write lock to do the work.
Parameters: type - Parameters: parent - Parameters: facet - Parameters: pos - |
createContextMethod | public boolean createContextMethod(ContextMethod method) throws IllegalArgumentException(Code) | | Creates a new public method in the source code for this DesignContext. The passed
ContextMethod must specify at least the designContext and methodName, and
must not describe a method that already exists in the DesignContext source.
To update an existing method, use the updateContextMethod() method. These
methods are separated to help prevent accidental method overwriting. The following table
details how the specified ContextMethod is used for this method:
designContext | REQUIRED. Must match the DesignContext that is
being called. This is essentially a safety precaution to help prevent accidental
method overwriting.
|
---|
methodName | REQUIRED. Defines the method name.
|
---|
parameterTypes | Defines the parameter types. If null or an empty
array is specified, the created method will have no arguments.
|
---|
parameterNames | Defines the parameter names. If null or an empty
array is specified (or an array shorter than the parameterTypes array), default
argument names will be used.
|
---|
returnType | Defines the return type. If null is specified, the
created method will have a void return type.
|
---|
throwsTypes | Defines the throws clause types. If null is specified,
the created method will have no throws clause.
|
---|
bodySource | Defines the method body Java source code. If null is
specified, the method will have an empty body. If the value is non-null, this must
represent valid (compilable) Java source code.
|
---|
commentText | Defines the comment text above the newly created method. If
null is specified, no comment text will be included.
|
---|
Parameters: method - A ContextMethod object representing the desired public method. true if the method was created successfully, or false ifit was not. throws: IllegalArgumentException - If there was a syntax error in any of the ContextMethodsettings, or if the ContextMethod represents a method that already exists on thisDesignContext (updateContextMethod() must be used in this case to avoidaccidental method overwriting) |
createDesignBeans | protected SourceDesignBean[] createDesignBeans(ClipImage image, DesignBean parent, Position pos)(Code) | | Creates an array of DesignBeans given a clipboard image, parent and facet spec.
Parameters: image - Parameters: parent - Parameters: pos - |
destroy | public void destroy()(Code) | | |
fireBeanChanged | protected void fireBeanChanged(DesignBean bean)(Code) | | Fire a bean changed event to all of our listeners.
Parameters: bean - The recently changed bean. |
fireBeanCreated | protected void fireBeanCreated(DesignBean bean)(Code) | | Fire a bean created event to all of our listeners.
Parameters: bean - The newly created bean. |
fireBeanDeleted | protected void fireBeanDeleted(DesignBean bean)(Code) | | Fire a bean deleted event to all of our listeners.
Parameters: bean - The recently deleted bean. |
fireBeanInstanceNameChanged | protected void fireBeanInstanceNameChanged(DesignBean bean, String oldName)(Code) | | Fire a bean instance name changed event to all of our listeners.
Parameters: bean - The recently renamed bean. Parameters: oldName - The prior name of the bean. |
fireBeanMoved | protected void fireBeanMoved(DesignBean bean, DesignBean oldParent, Position pos)(Code) | | Fire a bean moved event to all of our listeners.
Parameters: bean - The recently moved bean. Parameters: oldParent - The bean's old parent. Parameters: pos - The new position of the bean. |
fireContextActivated | public void fireContextActivated()(Code) | | Fire a context activated event to all of our listeners.
This is public so that FacesModel can call this
|
fireContextChanged | void fireContextChanged()(Code) | | Fire a context changed event to all of our listeners.
|
fireContextDeactivated | public void fireContextDeactivated()(Code) | | Fire a context deactivated event to all of our listeners.
This is public so that FacesModel can call this
|
fireEventChanged | protected void fireEventChanged(DesignEvent event)(Code) | | Fire a property changed event to all of our listeners.
Parameters: event - The recently changed event. |
firePropertyChanged | protected void firePropertyChanged(DesignProperty prop, Object oldValue)(Code) | | Fire a property changed event to all of our listeners.
Parameters: prop - The recently changed property. |
flushCaches | public static void flushCaches()(Code) | | Flush our design info cache, as well as the Introspector one.
Care must be taken when this is done, as their are dependencies on
the getDesignInfo() call to always return the same instance.
There is a slight disconnect here, that if the Introspector cache is
flushed, we may not be :(
|
flushContextData | protected void flushContextData()(Code) | | Flush our user data map to our underlying project item.
|
getBeansList | public ArrayList getBeansList()(Code) | | Return a list of the DesignBeans. NOTE: This returns the original list
used internally - do NOT muck with it! It is intended for internal
functions needing to iterate over the array contents quickly.
|
getContextGeneration | public long getContextGeneration()(Code) | | Return the generation id for the current context.
Each contextChanged will create a new generation of
beans. ContextListeners can use this generation id
to coordinate changes; for example, two cooperating
views can tell each other about the contextChanged()
messages they receive to ensure that both have handled
this contextChange before doing some particular action. This
means that a listener may receive a contextChanged message
multiple times, and by looking at the generation (and remembering
which generation they most recently processed) they can avoid
processing the same update more than once.
The most recent generation we've notified ContextListenersof via contextChanged(DesignContext). |
getContextMethod | public ContextMethod getContextMethod(String methodName, Class[] parameterTypes)(Code) | | Returns a
ContextMethod object describing the public method with the specified name
and parameter types. Returns null if no public method exists on this
DesignContext with the specified name and parameter types.
Parameters: methodName - The method name of the desired context method Parameters: parameterTypes - The parameter types of the desired context method A ContextMethod object describing the requested method, or null if nomethod exists with the specified name and parameter types |
getContextMethods | public ContextMethod[] getContextMethods()(Code) | | Returns a set of
ContextMethod objects describing the public methods declared on this
DesignContext (source file).
An array of ContextMethod objects, describing the public methods declared onthis DesignContext (source file) |
getDesignBean | public DesignBean getDesignBean(Bean bean)(Code) | | Get the DesignBean that is managing a given java source bean.
Note: this method is specific to BeansDesignBean
the DesignBean that is managing a given java source bean. |
getDesignInfo | public DesignInfo getDesignInfo(Class beanClass, ClassLoader classLoder)(Code) | | Get the DesignInfo for a bean, returning the same instance for the same class, with
the exception that if a flushCaches() or flushFromCache() occurs.
The code here is very similar to java.beans.Introspector
|
getFacesContext | public FacesContext getFacesContext()(Code) | | |
getState | public State getState()(Code) | | |
isCssPositionable | public static boolean isCssPositionable(DesignBean bean)(Code) | | Return true iff the given component is positionable via CSS (e.g. using CSS2 CSS positioning
via a style attribute). If a component does not specify a positioning attribute, then it is
considered positionable iff it is a visual component (see isVisualBean());
See Also: isVisualBean Parameters: bean - The bean to be checked true iff the bean is "positionable" |
isTrayBean | public static boolean isTrayBean(DesignBean bean)(Code) | | Return true iff the given component should be shown in the tray.
Parameters: bean - The bean to be checked true iff the bean declares that it is a "tray" component!!CQ TODO: need a better name. What the heck is a tray? |
isValidBindingTarget | public boolean isValidBindingTarget(DesignBean toBean)(Code) | | |
isVisualBean | public static boolean isVisualBean(DesignBean bean)(Code) | | Return true iff the given component is visual. A nonvisual bean that is a UIComponent will
be still be rendered as part of the page (think of the stylesheet component for example),
but it will appear in the tray and can not be manipulated as a visual component in the
designer.
Parameters: bean - The bean to be checked true iff the bean is "visual" |
isWriteLocked | public boolean isWriteLocked()(Code) | | |
newDesignBean | protected SourceDesignBean newDesignBean(Class beanClass, BeanInfo beanInfo, DesignInfo liveBeanInfo, DesignBean parent, String facet, Position pos, String instanceName)(Code) | | Perform the actual construction of the DesignBean implementation, including parent wiring for
both the DesignBean hierarchy as well as the instance hierarchy
Parameters: beanClass - Parameters: beanInfo - Parameters: liveBeanInfo - Parameters: parent - Parameters: facet - Parameters: pos - |
populateDesignBean | protected void populateDesignBean(SourceDesignBean.ClipImage image)(Code) | | Populate the properties of a DesignBean given a clipboard image
Parameters: image - |
readLock | public void readLock()(Code) | | |
readUnlock | public void readUnlock()(Code) | | |
registerCustomizer | public static void registerCustomizer(String classname, Customizer2 lc)(Code) | | Parameters: classname - Parameters: lc - |
removeBean | protected void removeBean(DesignBean lbean)(Code) | | Called during deletion to remove the bean from its parent & remove all the bean's persistence
source
Parameters: lbean - The bean to remove from all containers. |
removeContextMethod | public boolean removeContextMethod(ContextMethod method)(Code) | | Removes an existing method from the source code for this DesignContext. The passed
ContextMethod will be used to locate the desired method to remove using the designContext,
methodName, and parameterTypes. No other portions of the ContextMethod are used. The
following table details how the specified ContextMethod is used for this method:
designContext | REQUIRED. Must match the DesignContext that is
being called. This is essentially a safety precaution to help prevent accidental
method removal.
|
---|
methodName | REQUIRED. Specifies the desired method name.
|
---|
parameterTypes | REQUIRED. Specifies the desired method's
parameter types (if it has any). If null or an empty array is
specified, the desired method is assumed to have zero arguments.
|
---|
parameterNames | Ignored.
|
---|
returnType | Ignored.
|
---|
throwsTypes | Ignored.
|
---|
bodySource | Ignored.
|
---|
commentText | Ignored.
|
---|
Parameters: method - A ContextMethod object defining the method to be removed true if the method was successfully removed exception: IllegalArgumentException - if the specified ContextMethod does not exist or is notpublic on this DesignContext |
reorderBeanChidren | public boolean reorderBeanChidren(DesignBean parentBean, int[] perm)(Code) | | |
resetFacesContextCurrentInstance | public void resetFacesContextCurrentInstance()(Code) | | |
resurrect | void resurrect()(Code) | | Rebuild the entire live bean tree from underlying source beans
|
setFacesContextCurrentInstance | public void setFacesContextCurrentInstance()(Code) | | |
sync | public boolean sync()(Code) | | |
updateContextMethod | public ContextMethod updateContextMethod(ContextMethod method) throws IllegalArgumentException(Code) | | Updates an existing public method in the source code for this DesignContext. The passed
ContextMethod will be used to locate the desired public method to update using the
designContext, methodName, and parameterTypes. This method may only be used to update the
parameterNames, returnType, throwsTypes, bodySource, or commentText. Any other changes
actually constitute the creation of a new method, as they alter the method signature. To
create a new method, the createContextMethod() method should be used. These
operations are separated to help prevent accidental method overwriting. The following table
details how the specified ContextMethod is used for this method:
designContext | REQUIRED. Must match the DesignContext that is
being called. This is essentially a safety precaution to help prevent accidental
method overwriting.
|
---|
methodName | REQUIRED. Specifies the desired method name.
|
---|
parameterTypes | REQUIRED. Specifies the desired method's
parameter types (if it has any). If null or an empty array is
specified, the desired method is assumed to have zero arguments.
|
---|
parameterNames | Defines the parameter names. If null or an empty
array is specified (or an array shorter than the parameterTypes array), default
argument names will be used.
|
---|
returnType | Defines the method's return type. If null is specified,
the method is assumed to have a void return type.
|
---|
throwsTypes | Defines the throws clause types. If null is specified,
the resulting method will have no throws clause.
|
---|
bodySource | Defines the method body Java source code. If null is
specified, the resulting method body will be empty. If the value is non-null, this
must represent valid (compilable) Java source code. Note that a method with a
non-void return type must return a value.
|
---|
commentText | Defines the comment text above the newly created method. If
null is specified, no comment text will be included.
|
---|
Parameters: method - The desired ContextMethod representing the method to be updated The resulting ContextMethod object (including any updates from the process) throws: IllegalArgumentException - If there was a syntax error in any of the ContextMethodsettings, or if the ContextMethod does not exist in this DesignContext. |
|
|