org.springframework.richclient.form.binding.swing
Class FileChooserBinder

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.form.binding.swing.FileChooserBinder
All Implemented Interfaces:
Binder

public class FileChooserBinder
extends Object
implements Binder


Field Summary
static String BINDING_CLIENT_PROPERTY_KEY
           
 
Constructor Summary
FileChooserBinder()
           
 
Method Summary
 Binding bind(FormModel formModel, String formPropertyPath, Map context)
          Returns a binding between a form model's property and a control that will be created by this Binder.
 Binding bind(JComponent control, FormModel formModel, String formPropertyPath, Map context)
          Returns a binding between a form model's property and the provided control.
protected  JComponent createControl(Map context)
           
protected  Binding doBind(JComponent control, FormModel formModel, String formPropertyPath, Map context)
           
 FileChooser.FileChooserMode getMode()
           
protected  Class<?> getPropertyType(FormModel formModel, String formPropertyPath)
           
 boolean isUseFile()
           
 void setMode(FileChooser.FileChooserMode mode)
           
 void setUseFile(boolean useFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BINDING_CLIENT_PROPERTY_KEY

public static final String BINDING_CLIENT_PROPERTY_KEY
See Also:
Constant Field Values
Constructor Detail

FileChooserBinder

public FileChooserBinder()
Method Detail

createControl

protected JComponent createControl(Map context)

doBind

protected Binding doBind(JComponent control,
                         FormModel formModel,
                         String formPropertyPath,
                         Map context)

bind

public Binding bind(FormModel formModel,
                    String formPropertyPath,
                    Map context)
Description copied from interface: Binder
Returns a binding between a form model's property and a control that will be created by this Binder.

Specified by:
bind in interface Binder
Parameters:
formModel - the form model that this binding is for
context - additional context that may be used by this binder.
Returns:
a Binding (never null).

bind

public Binding bind(JComponent control,
                    FormModel formModel,
                    String formPropertyPath,
                    Map context)
Description copied from interface: Binder
Returns a binding between a form model's property and the provided control.

Specified by:
bind in interface Binder
Parameters:
control - the visual control that will be bound to the form model's property.
formModel - the form model that this binding is for
context - additional context that may be used by this binder
Returns:
a Binding (never null).

setUseFile

public void setUseFile(boolean useFile)
Parameters:
useFile - true when used with File, false when used with String

isUseFile

public boolean isUseFile()
Returns:
true when the binder uses File, otherwise false;

setMode

public void setMode(FileChooser.FileChooserMode mode)
Parameters:
mode - Mode in which the control is to be used:
  • FileChooserMode.FILE: choose files
  • FileChooserMode.FOLDER: choose folders

getMode

public FileChooser.FileChooserMode getMode()
Returns:
The filechooser mode

getPropertyType

protected Class<?> getPropertyType(FormModel formModel,
                                   String formPropertyPath)


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.