public class InitialView extends AbstractView
<bean id="initialView"
class="org.springframework.richclient.application.support.DefaultViewDescriptor">
<property name="viewClass">
<value>org.springframework.richclient.samples.simple.ui.InitialView</value>
</property>
<property name="viewProperties">
<map>
<entry key="firstMessage">
<value>This is the first message!</value>
</entry>
<entry key="descriptionTextPath">
<value>org/springframework/richclient/samples/simple/ui/initialViewText.html</value>
</entry>
</map>
</property>
</bean>
Note that the configuration specifies the properties to be set on this class indirectly. The property set on the
DefaultViewDescriptor is called viewProperties and it takes a map of key/value pairs. Each key
is the name of a property to be set on the actual view class (this class) and the value is the value to set for that
property. So, two properties have been configured, firstMessage and descriptionTextPath.
The firstMessage value specifies the key of a message to be displayed and the
descriptionTextPath specifies the path to a file containing the text to place in the HTML panel that
makes up the main body of this view.applicationConfigCAPTION_PROPERTY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY| Constructor and Description |
|---|
InitialView() |
| Modifier and Type | Method and Description |
|---|---|
protected JComponent |
createControl()
Create the actual UI control for this view.
|
org.springframework.core.io.Resource |
getDescriptionTextPath() |
String |
getFirstMessage() |
void |
setDescriptionTextPath(org.springframework.core.io.Resource descriptionTextPath)
Set the resource that references the file containing the description text to place in the description areas of
this view.
|
void |
setFirstMessage(String firstMessage)
Set the key to the message to be displayed first in the view
|
addPropertyChangeListener, addPropertyChangeListener, canClose, close, componentClosed, componentFocusGained, componentFocusLost, componentOpened, createViewDescriptor, dispose, getCaption, getContext, getDescription, getDescriptor, getDescriptor, getDisplayName, getIcon, getId, getImage, getStatusBar, getWindowCommandManager, getWindowControl, registerLocalCommandExecutors, removePropertyChangeListener, removePropertyChangeListener, setContext, setDescriptor, setDescriptor, setInputcreateControlIfNecessary, getApplicationConfig, getControl, isControlCreated, isSingleton, setSingletonclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetControlpublic String getFirstMessage()
public void setFirstMessage(String firstMessage)
firstMessage - the firstMessage to setpublic org.springframework.core.io.Resource getDescriptionTextPath()
public void setDescriptionTextPath(org.springframework.core.io.Resource descriptionTextPath)
descriptionTextPath - the descriptionTextPath to setprotected JComponent createControl()
createControl in class AbstractViewCopyright © 2014. All Rights Reserved.