wt.clients.beans
Class SchemaEditor

java.lang.Object
  extended bywt.clients.beans.SchemaEditor
All Implemented Interfaces:
PropertyEditor, Serializable
Direct Known Subclasses:
AssociationsSchemaEditor, AttributesFormSchemaEditor

public class SchemaEditor
extends Object
implements PropertyEditor, Serializable

SchemaEditor is a generic PropertyEditor for the Schema property of different beans. At dev time, this property editor will launch a frame containing an AttributesSelectorList, allowing the user to select a class and some of its attributes.

Note: subclasses can override the getInitialClassNames() method to have the ClassExplorer display different top level nodes in the ClassExplorer.



Supported API: false

Extendable: false

See Also:
ClassExplorer, Schema, Serialized Form

Field Summary
protected  String[] attributeNames
           
protected  PropertyChangeSupport listeners
           
protected  String objectClassName
           
protected  Schema value
           
 
Constructor Summary
SchemaEditor()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 String getAsText()
           
 Component getCustomEditor()
           
 String[] getInitialClassNames()
          Gets the initial class names to display in the ClassExplorer.
 String getJavaInitializationString()
           
 String[] getTags()
           
 Object getValue()
           
 boolean isPaintable()
           
static void main(String[] args)
          A short main method to allow standalone testing.
 void paintValue(Graphics g, Rectangle rc)
           
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void setAsText(String s)
           
 void setValue(Object o)
           
 boolean supportsCustomEditor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected Schema value

objectClassName

protected String objectClassName

attributeNames

protected String[] attributeNames

listeners

protected PropertyChangeSupport listeners
Constructor Detail

SchemaEditor

public SchemaEditor()
Method Detail

setValue

public void setValue(Object o)
Specified by:
setValue in interface PropertyEditor

getValue

public Object getValue()
Specified by:
getValue in interface PropertyEditor

setAsText

public void setAsText(String s)
               throws IllegalArgumentException
Specified by:
setAsText in interface PropertyEditor
Throws:
IllegalArgumentException

getJavaInitializationString

public String getJavaInitializationString()
Specified by:
getJavaInitializationString in interface PropertyEditor

getAsText

public String getAsText()
Specified by:
getAsText in interface PropertyEditor

getTags

public String[] getTags()
Specified by:
getTags in interface PropertyEditor

supportsCustomEditor

public boolean supportsCustomEditor()
Specified by:
supportsCustomEditor in interface PropertyEditor

getCustomEditor

public Component getCustomEditor()
Specified by:
getCustomEditor in interface PropertyEditor

isPaintable

public boolean isPaintable()
Specified by:
isPaintable in interface PropertyEditor

paintValue

public void paintValue(Graphics g,
                       Rectangle rc)
Specified by:
paintValue in interface PropertyEditor

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Specified by:
addPropertyChangeListener in interface PropertyEditor

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Specified by:
removePropertyChangeListener in interface PropertyEditor

getInitialClassNames

public String[] getInitialClassNames()
Gets the initial class names to display in the ClassExplorer.

Note: override this method in subclasses to change the root node classes shown in the ClassExplorer.

Returns:
an array of class names

main

public static void main(String[] args)
A short main method to allow standalone testing.