net.sf.springlayout.web.controller.propertyeditor
Class ZeroPaddedNumberPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by net.sf.springlayout.web.controller.propertyeditor.ZeroPaddedNumberPropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class ZeroPaddedNumberPropertyEditor
extends java.beans.PropertyEditorSupport

A generic PropertyEditor for the referenceDataManager uses Invocation to invoke the method supplied.

Author:
beerj

Constructor Summary
ZeroPaddedNumberPropertyEditor(int totalLength)
           
 
Method Summary
 java.lang.String getAsText()
          Format the Number as String, using the specified NumberFormat.
 void setAsText(java.lang.String text)
          Parse the Number from the given text, using the specified NumberFormat.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZeroPaddedNumberPropertyEditor

public ZeroPaddedNumberPropertyEditor(int totalLength)
                               throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Parse the Number from the given text, using the specified NumberFormat.

Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Throws:
java.lang.IllegalArgumentException

getAsText

public java.lang.String getAsText()
Format the Number as String, using the specified NumberFormat.

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport


Copyright © 2005-2007 Spring Layout Team. All Rights Reserved.