org.jdesktop.binding.metadata
Class StringMetaData

java.lang.Object
  extended by org.jdesktop.binding.metadata.MetaData
      extended by org.jdesktop.binding.metadata.StringMetaData

public class StringMetaData
extends MetaData

Class for representing meta-data for data fields which contain string values. Example usage:


     StringMetaData metaData = new StringMetaData("streetaddress",
                                                  "Street Address");
     metaData.setRequired(true);
     metaData.setMaxLength(32);
 

Version:
1.0
Author:
Amy Fowler

Field Summary
protected  int maxLength
           
protected  int minLength
           
 
Fields inherited from class org.jdesktop.binding.metadata.MetaData
converter, customProps, decodeFormat, displayWidth, encodeFormat, klass, label, maxValueCount, minValueCount, name, pcs, readOnly, validators
 
Constructor Summary
StringMetaData()
           
StringMetaData(java.lang.String name)
           
StringMetaData(java.lang.String name, java.lang.String label)
           
 
Method Summary
 int getMaxLength()
          Gets the meta-data's "maxLength" property, which indicates the maximum number of characters permitted for the data field.
 int getMinLength()
          Gets the meta-data's "minLength" property, which indicates the minimum number of characters permitted for the data field.
 boolean isMultiLine()
           
 void setMaxLength(int maxLength)
          Sets the meta-data's "maxLength" property.
 void setMinLength(int minLength)
          Sets the meta-data's "minLength" property.
 void setMultiLine(boolean multiLine)
          Sets the meta-data's "multLine" property.
 
Methods inherited from class org.jdesktop.binding.metadata.MetaData
addPropertyChangeListener, addValidator, firePropertyChange, firePropertyChange, firePropertyChange, getConverter, getCustomProperty, getCustomProperty, getCustomPropertyKeys, getDecodeFormat, getDisplayWidth, getElementClass, getEncodeFormat, getLabel, getMaxValueCount, getMinValueCount, getName, getPropertyChangeListeners, getValidators, isReadOnly, isRequired, removeCustomProperty, removePropertyChangeListener, removeValidator, setConverter, setCustomProperty, setDecodeFormat, setDisplayWidth, setElementClass, setEncodeFormat, setLabel, setMaxValueCount, setMinValueCount, setName, setReadOnly, setRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minLength

protected int minLength

maxLength

protected int maxLength
Constructor Detail

StringMetaData

public StringMetaData()

StringMetaData

public StringMetaData(java.lang.String name)

StringMetaData

public StringMetaData(java.lang.String name,
                      java.lang.String label)
Method Detail

getMinLength

public int getMinLength()
Gets the meta-data's "minLength" property, which indicates the minimum number of characters permitted for the data field. The default is 0, which means there is no minimum.

Returns:
integer indicating the minimum number of characters permitted for the data field
See Also:
setMinLength(int)

setMinLength

public void setMinLength(int minLength)
Sets the meta-data's "minLength" property.

Parameters:
minLength - integer indicating the minimum number of characters permitted for the data field

getMaxLength

public int getMaxLength()
Gets the meta-data's "maxLength" property, which indicates the maximum number of characters permitted for the data field. The default is Integer.MAX_VALUE, which means there is no maximum.

Returns:
integer indicating the maximum number of characters permitted for the data field
See Also:
setMaxLength(int)

setMaxLength

public void setMaxLength(int maxLength)
Sets the meta-data's "maxLength" property.

Parameters:
maxLength - integer indicating the maximum number of characters permitted for the data field

isMultiLine

public boolean isMultiLine()
Returns:
boolean indicating whether or not the value can be a multi-line string

setMultiLine

public void setMultiLine(boolean multiLine)
Sets the meta-data's "multLine" property.

Parameters:
multiLine - boolean indicating whether or not the value can be a multi-line string


Copyright © 2005 Sun Microsystems All Rights Reserved.