Revision: 1577 http://svn.sourceforge.net/spring-rich-c/?rev=1577&view=rev Author: kdonald Date: 2006-11-21 22:45:40 -0800 (Tue, 21 Nov 2006)
Log Message: ----------- getters/setters first Modified Paths: -------------- trunk/spring-richclient/samples/simple/src/main/java/org/springframework/richclient/samples/simple/ui/InitialView.java Modified: trunk/spring-richclient/samples/simple/src/main/java/org/springframework/richclient/samples/simple/ui/InitialView.java =================================================================== --- trunk/spring-richclient/samples/simple/src/main/java/org/springframework/richclient/samples/simple/ui/InitialView.java 2006-11-22 06:44:54 UTC (rev 1576) +++ trunk/spring-richclient/samples/simple/src/main/java/org/springframework/richclient/samples/simple/ui/InitialView.java 2006-11-22 06:45:40 UTC (rev 1577) @@ -69,37 +69,6 @@ private Resource descriptionTextPath; /** - * Create the actual UI control for this view. It will be placed into the window according to the layout of the page - * holding this view. - */ - protected JComponent createControl() { - // In this view, we're just going to use standard Swing to place a - // few controls. - - // The location of the text to display has been set as a Resource in the - // property descriptionTextPath. So, use that resource to obtain a URL - // and set that as the page for the text pane. - - JTextPane textPane = new JTextPane(); - JScrollPane spDescription = getComponentFactory().createScrollPane(textPane); - try { - textPane.setPage(getDescriptionTextPath().getURL()); - } - catch (IOException e) { - throw new RuntimeException("Unable to load description URL", e); - } - - JLabel lblMessage = getComponentFactory().createLabel(getFirstMessage()); - lblMessage.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); - - JPanel panel = getComponentFactory().createPanel(new BorderLayout()); - panel.add(spDescription); - panel.add(lblMessage, BorderLayout.SOUTH); - - return panel; - } - - /** * @return the firstMessage */ public String getFirstMessage() { @@ -130,4 +99,35 @@ public void setDescriptionTextPath(Resource descriptionTextPath) { this.descriptionTextPath = descriptionTextPath; } -} + + /** + * Create the actual UI control for this view. It will be placed into the window according to the layout of the page + * holding this view. + */ + protected JComponent createControl() { + // In this view, we're just going to use standard Swing to place a + // few controls. + + // The location of the text to display has been set as a Resource in the + // property descriptionTextPath. So, use that resource to obtain a URL + // and set that as the page for the text pane. + + JTextPane textPane = new JTextPane(); + JScrollPane spDescription = getComponentFactory().createScrollPane(textPane); + try { + textPane.setPage(getDescriptionTextPath().getURL()); + } + catch (IOException e) { + throw new RuntimeException("Unable to load description URL", e); + } + + JLabel lblMessage = getComponentFactory().createLabel(getFirstMessage()); + lblMessage.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); + + JPanel panel = getComponentFactory().createPanel(new BorderLayout()); + panel.add(spDescription); + panel.add(lblMessage, BorderLayout.SOUTH); + + return panel; + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ spring-rich-c-cvs mailing list spring-rich-c-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs