|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The MarkupDesignContext is an extension to the DesignContext interface that adds markup-specific functionality. This adds methods for previewing CSS style changes at design-time. A MarkupDesignContext can be accessed by calling the DesignBean.getDesignContext() method and testing the returned DesignContext for 'instanceof' MarkupDesignContext. If the file being designed is a markup backing file (eg: *.jsp), the DesignContext will be an instanceof MarkupDesignContext.
IMPLEMENTED BY CREATOR - This interface is implemented by Creator for use by the component (bean) author.
DesignContext,
DesignBean.getDesignContext()| Method Summary | |
java.util.Map |
convertCssStyleToMap(java.lang.String cssStyle)
Converts a CSS inline style string into a Map of style elements |
java.lang.String |
convertMapToCssStyle(java.util.Map cssStyleMap)
Converts a Map of CSS styles into an inline CSS style string |
java.awt.Image |
getCssPreviewImage(java.lang.String cssStyle,
java.lang.String[] cssStyleClasses,
MarkupDesignBean designBean,
int width,
int height)
Generates and returns a preview image (sized width x height) of the specified MarkupDesignBean after applying the specified CSS styles and style classes to the rendered markup. |
| Methods inherited from interface com.sun.rave.designtime.DesignContext |
addDesignContextListener, addResource, canCreateBean, canMoveBean, copyBeans, createBean, deleteBean, getBeanByName, getBeanForInstance, getBeans, getBeansOfType, getContextData, getDesignContextListeners, getProject, getRootContainer, moveBean, pasteBeans, removeDesignContextListener, resolveResource, setContextData |
| Methods inherited from interface com.sun.rave.designtime.DisplayItem |
getDescription, getDisplayName, getHelpKey, getLargeIcon, getSmallIcon |
| Method Detail |
public java.util.Map convertCssStyleToMap(java.lang.String cssStyle)
cssStyle - The CSS inline style string to convert
public java.lang.String convertMapToCssStyle(java.util.Map cssStyleMap)
cssStyleMap - The Map of CSS styles to convert
public java.awt.Image getCssPreviewImage(java.lang.String cssStyle,
java.lang.String[] cssStyleClasses,
MarkupDesignBean designBean,
int width,
int height)
cssStyle - The CSS style string to apply to the rendered markup from the
MarkupDesignBeancssStyleClasses - The CSS style classes to apply to the rendered markup from the
MarkupDesignBeandesignBean - The MarkupDesignBean to render the image ofwidth - The desired width of the resulting image (in pixels)height - The desired height of the resulting image (in pixels)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||