com.damnhandy.aspects.bean.test
Class CommitStylesExample

java.lang.Object
  extended by com.damnhandy.aspects.bean.test.CommitStylesExample

public final class CommitStylesExample
extends java.lang.Object

Demonstrates three different styles when to commit changes: on key typed, on focus lost, on OK/Apply pressed. Therefore we bind 3 JTextFields to 3 String typed ValueModels that honor the commit style. And we bind 3 JLabels directly to these ValueModels that display the current value.

The ValueModels used in this example are requested from a PresentationModel that adapts text properties of a TextBean. This is just to demonstrate a consistent binding style. The same techniques work with any ValueModel.

Version:
$Revision$
Author:
Karsten Lentzsch
See Also:
PresentationModel

Nested Class Summary
static class CommitStylesExample.TextBean
          A simple bean that just provides three bound read-write text properties.
 
Constructor Summary
CommitStylesExample()
          Constructs the example with a PresentationModel on the a TextBean.
 
Method Summary
 javax.swing.JComponent build()
          Builds the pane.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommitStylesExample

public CommitStylesExample()
Constructs the example with a PresentationModel on the a TextBean.

Method Detail

main

public static void main(java.lang.String[] args)

build

public javax.swing.JComponent build()
Builds the pane.

Returns:
the built panel


Copyright © 2005 Ryan J. McDonough All Rights Reserved.