Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.ui
Class DataAttributes

java.lang.Object
  extended by com.ibm.etools.iseries.ui.DataAttributes
All Implemented Interfaces:
Attributes, PropertyChangeListener, VetoableChangeListener, Serializable, EventListener

public class DataAttributes
extends Object
implements Attributes, PropertyChangeListener, VetoableChangeListener, Serializable

DataAttributes implements Attributes. It is a container for the attributes of a field, such as JFormattedTextField, JFormattedLabel and JFormattedComboBox. It holds information on autoAdvance, data type, length of data, size of decimal places, symbol for decimal point, color of reverse image and errorBeep.

See Also:
Attributes, FieldModel, AS400FieldModel, DefaultFieldModel, Serialized Form

Field Summary
static String Copyright
           
static int DATATYPE_CHARACTER
          Data type is Character
static int DATATYPE_NUMERIC
          Data type is Numeric
static char MINUS_SIGN
          Minus Sign for negative number
static char PLUS_SIGN
          Plus Sign for positive number
protected  PropertyChangeSupport propertyChange
           
protected  VetoableChangeSupport vetoPropertyChange
           
 
Fields inherited from interface com.ibm.etools.iseries.ui.Attributes
copyright
 
Constructor Summary
DataAttributes()
          Constructs a new DataAttributes.
DataAttributes(boolean autoAdvance, int dataType, int dataLength, int decimalPlaces, char decimalSymbol, Color reverseImageColor)
          Constructs a new DataAttributes with the specified autoAdvance, dataType, dataLength, decimalPlaces, decimalSymbol and reverseImageColor.
DataAttributes(boolean autoAdvance, int dataType, int dataLength, int decimalPlaces, char decimalSymbol, Color reverseImageColor, boolean errorBeep)
          Constructs a new DataAttributes with the specified autoAdvance, dataType, dataLength, decimalPlaces, decimalSymbol, reverseImageColor and errorBeep.
DataAttributes(int dataType, int dataLength)
          Constructs a new DataAttributes with the specified dataType, dataLength, decimalPlaces and decimalSymbol.
DataAttributes(int dataType, int dataLength, int decimalPlaces, char decimalSymbol)
          Constructs a new DataAttributes with the specified dataType, dataLength, decimalPlaces and decimalSymbol.
DataAttributes(int dataType, int dataLength, int decimalPlaces, char decimalSymbol, Color reverseImageColor)
          Constructs a new DataAttributes with the specified dataType, dataLength, decimalPlaces, decimalSymbol and reverseImageColor.
 
Method Summary
 void addDataAttributesChangeListener(DataAttributesChangeListener l)
          Add a DataAttributesChangeListener
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void addVetoableChangeListener(VetoableChangeListener l)
          Add a vetoableChangeListener.
static String Copyright()
          This method returns the copyright notice for this class.
 void fireDataAttributesChangeEvent(DataAttributesChangeEvent evt)
          Report that the properties of DataAttributes are changed to any registered listeners.
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          The firePropertyChange method was generated to support the propertyChange field.
 void fireVetoableChange(String propertyName, Object oldValue, Object newValue)
          The fireVetoableChange method was generated to support the vetoPropertyChange field.
 boolean getAutoAdvance()
          Gets the autoAdvance property (boolean) value.
 int getDataLength()
          Gets the dataLength property (int) value.
 int getDataType()
          Gets the dataType property (int) value.
 int getDecimalPlaces()
          Gets the decimalPlaces property (int) value.
 char getDecimalSymbol()
          Gets the decimalSymbol property (char) value.
 boolean getErrorBeep()
          Gets the errorBeep property (boolean) value.
protected  PropertyChangeSupport getPropertyChange()
          Accessor for the propertyChange field.
 Color getReverseImageColor()
          Gets the reverseImageColor property (java.awt.Color) value.
protected  VetoableChangeSupport getVetoPropertyChange()
          Accessor for the vetoPropertyChange field.
 void propertyChange(PropertyChangeEvent e)
          Examine the PropertyChangeEvent and decides what to do on a particular event.
 void removeDataAttributesChangeListener(DataAttributesChangeListener l)
          Removes a DataAttributesChangeListener.
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes a propertyChangeListener.
 void removeVetoableChangeListener(VetoableChangeListener l)
          Removes a vetoableChangeListener.
 void setAutoAdvance(boolean value)
          Sets the autoAdvance property (boolean) value.
 void setDataLength(int len)
          Sets the dataLength property (int) value.
 void setDataType(int type)
          Sets the dataType property (int) value.
 void setDecimalPlaces(int decPlaces)
          Sets the decimalPlaces property (int) value.
 void setDecimalSymbol(char dec)
          Sets the decimalSymbol property (char) value.
 void setErrorBeep(boolean value)
          Sets the errorBeep property (boolean) value.
 void setReverseImageColor(Color c)
          Sets the reverseImageColor property (java.awt.Color) value.
 void vetoableChange(PropertyChangeEvent e)
          This method gets called when a constrained property is changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

DATATYPE_CHARACTER

public static final int DATATYPE_CHARACTER
Data type is Character

See Also:
Constant Field Values

DATATYPE_NUMERIC

public static final int DATATYPE_NUMERIC
Data type is Numeric

See Also:
Constant Field Values

MINUS_SIGN

public static final char MINUS_SIGN
Minus Sign for negative number

See Also:
Constant Field Values

PLUS_SIGN

public static final char PLUS_SIGN
Plus Sign for positive number

See Also:
Constant Field Values

propertyChange

protected transient PropertyChangeSupport propertyChange

vetoPropertyChange

protected transient VetoableChangeSupport vetoPropertyChange
Constructor Detail

DataAttributes

public DataAttributes()
Constructs a new DataAttributes.


DataAttributes

public DataAttributes(int dataType,
                      int dataLength)
Constructs a new DataAttributes with the specified dataType, dataLength, decimalPlaces and decimalSymbol.

Parameters:
dataType - int
dataLength - int

DataAttributes

public DataAttributes(int dataType,
                      int dataLength,
                      int decimalPlaces,
                      char decimalSymbol)
Constructs a new DataAttributes with the specified dataType, dataLength, decimalPlaces and decimalSymbol.

Parameters:
dataType - int
dataLength - int
decimalPlaces - int
decimalSymbol - char

DataAttributes

public DataAttributes(int dataType,
                      int dataLength,
                      int decimalPlaces,
                      char decimalSymbol,
                      Color reverseImageColor)
Constructs a new DataAttributes with the specified dataType, dataLength, decimalPlaces, decimalSymbol and reverseImageColor.

Parameters:
dataType - int
dataLength - int
decimalPlaces - int
decimalSymbol - char
reverseImageColor - Color

DataAttributes

public DataAttributes(boolean autoAdvance,
                      int dataType,
                      int dataLength,
                      int decimalPlaces,
                      char decimalSymbol,
                      Color reverseImageColor)
Constructs a new DataAttributes with the specified autoAdvance, dataType, dataLength, decimalPlaces, decimalSymbol and reverseImageColor.

Parameters:
autoAdvance - boolean
dataType - int
dataLength - int
decimalPlaces - int
decimalSymbol - char
reverseImageColor - Color

DataAttributes

public DataAttributes(boolean autoAdvance,
                      int dataType,
                      int dataLength,
                      int decimalPlaces,
                      char decimalSymbol,
                      Color reverseImageColor,
                      boolean errorBeep)
Constructs a new DataAttributes with the specified autoAdvance, dataType, dataLength, decimalPlaces, decimalSymbol, reverseImageColor and errorBeep.

Parameters:
autoAdvance - boolean
dataType - int
dataLength - int
decimalPlaces - int
decimalSymbol - char
reverseImageColor - java.awt.Color
errorBeep - boolean
Method Detail

addDataAttributesChangeListener

public void addDataAttributesChangeListener(DataAttributesChangeListener l)
Add a DataAttributesChangeListener

Parameters:
l - com.ibm.etools.iseries.ui.DataAttributesChangeListener

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener l)
Add a vetoableChangeListener.

Parameters:
l - java.beans.VetoableChangeListener

Copyright

public static String Copyright()
This method returns the copyright notice for this class.

Returns:
java.lang.String

fireDataAttributesChangeEvent

public void fireDataAttributesChangeEvent(DataAttributesChangeEvent evt)
Report that the properties of DataAttributes are changed to any registered listeners.

Parameters:
evt - com.ibm.etools.iseries.ui.DataAttributesChangeEvent

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
The firePropertyChange method was generated to support the propertyChange field.


fireVetoableChange

public void fireVetoableChange(String propertyName,
                               Object oldValue,
                               Object newValue)
                        throws PropertyVetoException
The fireVetoableChange method was generated to support the vetoPropertyChange field.

Throws:
PropertyVetoException

getAutoAdvance

public boolean getAutoAdvance()
Gets the autoAdvance property (boolean) value. The default value false. If autoAdvance is true, when the data length reaches the field length, the control is automatically set to the next component.

Returns:
The autoAdvance property value.
See Also:
setAutoAdvance(boolean)

getDataLength

public int getDataLength()
Gets the dataLength property (int) value. The default value is 10.

Returns:
The dataLength property value.
See Also:
setDataLength(int)

getDataType

public int getDataType()
Gets the dataType property (int) value. The default value is character.

Returns:
The dataType property value.
See Also:
setDataType(int)

getDecimalPlaces

public int getDecimalPlaces()
Gets the decimalPlaces property (int) value. The default value is 0.

Returns:
The decimalPlaces property value.
See Also:
setDecimalPlaces(int)

getDecimalSymbol

public char getDecimalSymbol()
Gets the decimalSymbol property (char) value. The default value is '.'

Returns:
The decimalSymbol property value.
See Also:
setDecimalSymbol(char)

getErrorBeep

public boolean getErrorBeep()
Gets the errorBeep property (boolean) value. The default value false. If errorBeep is true, the field will beep when the data is invalid.

Returns:
The errorBeep property value.
See Also:
setErrorBeep(boolean)

getPropertyChange

protected PropertyChangeSupport getPropertyChange()
Accessor for the propertyChange field.


getReverseImageColor

public Color getReverseImageColor()
Gets the reverseImageColor property (java.awt.Color) value.

Returns:
The reverseImageColor property value.
See Also:
setReverseImageColor(java.awt.Color)

getVetoPropertyChange

protected VetoableChangeSupport getVetoPropertyChange()
Accessor for the vetoPropertyChange field.


propertyChange

public void propertyChange(PropertyChangeEvent e)
Examine the PropertyChangeEvent and decides what to do on a particular event.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
e - java.beans.PropertyChangeEvent

removeDataAttributesChangeListener

public void removeDataAttributesChangeListener(DataAttributesChangeListener l)
Removes a DataAttributesChangeListener.

Parameters:
l - com.ibm.etools.iseries.ui.DataAttributesChangeListener

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes a propertyChangeListener.

Parameters:
l - PropertyChangeListener

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener l)
Removes a vetoableChangeListener.

Parameters:
l - java.beans.VetoableChangeListener

setAutoAdvance

public void setAutoAdvance(boolean value)
Sets the autoAdvance property (boolean) value.

Parameters:
value - The new value for the property.
See Also:
getAutoAdvance()

setDataLength

public void setDataLength(int len)
                   throws PropertyVetoException
Sets the dataLength property (int) value.

Parameters:
dataLength - The new value for the property.
Throws:
PropertyVetoException
See Also:
getDataLength()

setDataType

public void setDataType(int type)
                 throws PropertyVetoException
Sets the dataType property (int) value.

Parameters:
dataType - The new value for the property.
Throws:
PropertyVetoException
See Also:
getDataType()

setDecimalPlaces

public void setDecimalPlaces(int decPlaces)
                      throws PropertyVetoException
Sets the decimalPlaces property (int) value.

Parameters:
decimalPlaces - The new value for the property.
Throws:
PropertyVetoException
See Also:
getDecimalPlaces()

setDecimalSymbol

public void setDecimalSymbol(char dec)
Sets the decimalSymbol property (char) value.

Parameters:
decimalSymbol - The new value for the property.
See Also:
getDecimalSymbol()

setErrorBeep

public void setErrorBeep(boolean value)
Sets the errorBeep property (boolean) value.

Parameters:
value - The new value for the property.
See Also:
getErrorBeep()

setReverseImageColor

public void setReverseImageColor(Color c)
Sets the reverseImageColor property (java.awt.Color) value.

Parameters:
reverseImageColor - The new value for the property.
See Also:
getReverseImageColor()

vetoableChange

public void vetoableChange(PropertyChangeEvent e)
                    throws PropertyVetoException
This method gets called when a constrained property is changed.

Specified by:
vetoableChange in interface VetoableChangeListener
Parameters:
e - java.beans.PropertyChangeEvent a PropertyChangeEvent object describing the event source and the property that has changed.
Throws:
PropertyVetoException - if the recipient wishes the property change to be rolled back.

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.