Orbital library

orbital.awt
Class TaggedPropertyEditorSupport

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by orbital.awt.TaggedPropertyEditorSupport
All Implemented Interfaces:
java.beans.PropertyEditor
Direct Known Subclasses:
ConcurrenceGeneticAlgorithmBeanInfo.TypePropertyEditor, NumberInputBeanInfo.StylePropertyEditor

public class TaggedPropertyEditorSupport
extends java.beans.PropertyEditorSupport
implements java.beans.PropertyEditor

A PropertyEditor base for tagged properties. Derive to generate a concrete PropertyEditor class.

Author:
André Platzer

Constructor Summary
protected TaggedPropertyEditorSupport(java.lang.String[] tags, java.lang.Object[] values)
           
protected TaggedPropertyEditorSupport(java.lang.String[] tags, java.lang.Object[] values, java.lang.String[] javaInitializers)
          Create a TaggedPropertyEditor for the given tags representing the specified values.
 
Method Summary
 java.lang.String getAsText()
           
 java.lang.String getJavaInitializationString()
           
 java.lang.String[] getTags()
           
 void setAsText(java.lang.String text)
           
 void setValue(java.lang.Object value)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getSource, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getCustomEditor, getValue, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor
 

Constructor Detail

TaggedPropertyEditorSupport

protected TaggedPropertyEditorSupport(java.lang.String[] tags,
                                      java.lang.Object[] values,
                                      java.lang.String[] javaInitializers)
Create a TaggedPropertyEditor for the given tags representing the specified values.

Parameters:
tags - a list of tags that can be a value for the property.
values - a list of values corresponding to the tags at the same index. Must be in same order as tags.
javaInitilizers - a list of java initialization strings that represent the values for the property. Must be in same order as tags.
Throws:
java.lang.IllegalArgumentException - if the arrays have incompatible dimensions
Preconditions:
tags.length == values.length && (javaInitializers == null || javaInitializers.length == values.length)

TaggedPropertyEditorSupport

protected TaggedPropertyEditorSupport(java.lang.String[] tags,
                                      java.lang.Object[] values)
Method Detail

getTags

public java.lang.String[] getTags()
Specified by:
getTags in interface java.beans.PropertyEditor
Overrides:
getTags in class java.beans.PropertyEditorSupport

getAsText

public java.lang.String getAsText()
Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport

getJavaInitializationString

public java.lang.String getJavaInitializationString()
Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor
Overrides:
getJavaInitializationString in class java.beans.PropertyEditorSupport

setValue

public void setValue(java.lang.Object value)
Specified by:
setValue in interface java.beans.PropertyEditor
Overrides:
setValue in class java.beans.PropertyEditorSupport

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Throws:
java.lang.IllegalArgumentException

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.