All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.valkyriercp.sample.simple.ui.initialViewText.html Maven / Gradle / Ivy



This is the initial view for the application. It was configured in the richclient-application-context.xml file with the lifecycleAdvisor.startingPageId property. The source for this view is in InitialView.java.

This is a very simple view containing this text area and the label below. The rest of the window layout (menus, toolbar, status bar, etc.) was created by the platform from configuration information in the application context and the commands-context.xml.

The text being displayed in this scroll pane and the text in the label at the bottom of the view were configured in the application context as shown below. The label text was specified using a message key, with a key of firstMessage.text that was resolved by the messageSource from the messages.properties file. All this configuration setup comes for free from the Spring platform.

<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>firstMessage.text</value>
      </entry>
      <entry key="descriptionTextPath">
         <value>org/springframework/richclient/samples/simple/ui/initialViewText.html</value>
       </entry>
    </map>
  </property>
</bean>

So far, this view is all pretty much straight Swing, nothing to interesting. To see a more complex view using more of the platform features, in the menus above, select Window -> Show View -> Contacts

This menu item was created automatically by the platform based on all the views defined in the context. Take a look at the class org.springframework.richclient.command.support.ShowViewMenu to see how it's done.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy