|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.factory.AbstractControlFactory
org.springframework.richclient.application.support.AbstractView
org.springframework.richclient.script.ScriptedView
public class ScriptedView
A View implementation that uses ScriptEngine to build its control.
| Field Summary |
|---|
| Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
|---|
logger |
| Fields inherited from interface org.springframework.richclient.core.DescribedElement |
|---|
CAPTION_PROPERTY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY |
| Constructor Summary | |
|---|---|
ScriptedView()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected JComponent |
createControl()
Subclasses must override this method to create a new instance of the control that this factory produces. |
protected javax.script.ScriptEngine |
createScriptEngine()
Creates the ScriptEngine, by using the engineName if provided. |
protected void |
populateBindings(javax.script.Bindings bindings,
JComponent container)
Populates the bindings that will be passed to the script. |
void |
setContainerBindingName(String containerBindingName)
Sets the container binding name. |
void |
setEngineName(String name)
Sets the name of the engine to be created. |
void |
setScript(Resource script)
|
void |
setScriptBindings(Map<String,Object> bindings)
Set the bindings to be passed to the script. |
void |
setViewBindingName(String viewBindingName)
Sets the view binding name. |
| Methods inherited from class org.springframework.richclient.application.support.AbstractView |
|---|
addPropertyChangeListener, addPropertyChangeListener, canClose, close, componentClosed, componentFocusGained, componentFocusLost, componentOpened, dispose, getCaption, getContext, getDescription, getDescriptor, getDisplayName, getIcon, getId, getImage, getStatusBar, getWindowCommandManager, getWindowControl, registerLocalCommandExecutors, removePropertyChangeListener, removePropertyChangeListener, setContext, setDescriptor, setInput |
| Methods inherited from class org.springframework.richclient.factory.AbstractControlFactory |
|---|
createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton |
| Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
|---|
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.richclient.factory.ControlFactory |
|---|
getControl |
| Constructor Detail |
|---|
public ScriptedView()
| Method Detail |
|---|
protected JComponent createControl()
AbstractControlFactory
createControl in class AbstractViewprotected javax.script.ScriptEngine createScriptEngine()
ScriptEngine, by using the engineName if provided. If no engine name is set,
the extension of the file name of the script is used.
ScriptEngineScriptEngineManager.getEngineByName(String),
ScriptEngineManager.getEngineByExtension(String)
protected void populateBindings(javax.script.Bindings bindings,
JComponent container)
If the containerBindingName is set, the container instance will be included in the bindings.
If the viewBindingName is set, the view instance will be included in the bindings.
All the variables in the scriptBindings will also be included in the bindings.
bindings - the bindingscontainer - the compontent that will be passed into the scriptsetContainerBindingName(String),
setViewBindingName(String),
setScriptBindings(Map)public void setScript(Resource script)
public void setEngineName(String name)
name - the nameScriptEngineManager.getEngineByName(String)public void setScriptBindings(Map<String,Object> bindings)
bindings - the bindingspublic void setViewBindingName(String viewBindingName)
viewBindingName - the namefor more detailspublic void setContainerBindingName(String containerBindingName)
containerBindingName - the namefor more details
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||