org.springframework.richclient.form.binding.swing
Class NumberBinding
java.lang.Object
org.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.factory.AbstractControlFactory
org.springframework.richclient.form.binding.support.AbstractBinding
org.springframework.richclient.form.binding.support.CustomBinding
org.springframework.richclient.form.binding.swing.NumberBinding
- All Implemented Interfaces:
- UserInputListener, ControlFactory, Binding
public class NumberBinding
- extends CustomBinding
- implements UserInputListener
Binding to handle Numbers. Can be configured in different with shiftFactor/shiftScale and
decorations.
- Author:
- jh
- See Also:
NumberBinder
| Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.richclient.form.binding.Binding |
getControl |
numberField
protected final BigDecimalTextField numberField
readOnly
protected final boolean readOnly
NumberBinding
public NumberBinding(Class requiredClass,
BigDecimalTextField component,
boolean readOnly,
String leftDecoration,
String rightDecoration,
BigDecimal shiftFactor,
int shiftScale,
FormModel formModel,
String formPropertyPath)
- Creates a NumberBinding.
- Parameters:
requiredClass - Required class for this binding.component - The BigDecimalTextField to use.readOnly - Force readonly at all times.leftDecoration - Decorating label with string at left side.rightDecoration - Decorating label with string at right side.shiftFactor - Shifting factor to use when setting/getting number in
inputfield. Can eg be used to display percentages as ###.##
instead of #.####.shiftScale - Scale to set on BigDecimal.formModel - FormModel.formPropertyPath - PropertyPath.
valueModelChanged
protected void valueModelChanged(Object newValue)
- Description copied from class:
CustomBinding
- Called when the underlying property's value model value changes.
- Specified by:
valueModelChanged in class CustomBinding
doBindControl
protected JComponent doBindControl()
- Specified by:
doBindControl in class AbstractBinding
update
public void update(JComponent component)
- Specified by:
update in interface UserInputListener
readOnlyChanged
protected void readOnlyChanged()
- Description copied from class:
AbstractBinding
- Called when the read only state of the bound property changes.
- Specified by:
readOnlyChanged in class AbstractBinding
- See Also:
FormPropertyState
enabledChanged
protected void enabledChanged()
- Description copied from class:
AbstractBinding
- Called when the enabled state of the bound property changes.
- Specified by:
enabledChanged in class AbstractBinding
- See Also:
FormPropertyState
Copyright © 2004-2009 The Spring Framework. All Rights Reserved.