com.atomikos.beans
Class DefaultPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by com.atomikos.beans.DefaultPropertyEditor
All Implemented Interfaces:
PropertyEditor

public class DefaultPropertyEditor
extends PropertyEditorSupport

A default Property Editor. Instances can be constructed with custom component and tags.


Constructor Summary
DefaultPropertyEditor(PropertyEditorComponent component, String[] tags)
          Constructs a new instance.
 
Method Summary
 Component getCustomEditor()
           
 String getJavaInitializationString()
           
 String[] getTags()
          Any restricted value list.
 boolean isPaintable()
          Check if paintable.
 void setAsText(String text)
          Sets the value as text.
 boolean supportsCustomEditor()
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getSource, getValue, paintValue, removePropertyChangeListener, setSource, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPropertyEditor

public DefaultPropertyEditor(PropertyEditorComponent component,
                             String[] tags)
Constructs a new instance. Note that the JavaBeans contract strictly requires a no-argument constructor for third-party tools to instantiate instances. However, since this class is used internally only, it is not required to follow that convention.

Parameters:
component - The GUI component to use. Null if none.
tags - A list of allowed values, null if not applicable.
Method Detail

getTags

public String[] getTags()
Any restricted value list.

Specified by:
getTags in interface PropertyEditor
Overrides:
getTags in class PropertyEditorSupport
Returns:
String[] null by default.

isPaintable

public boolean isPaintable()
Check if paintable.

Specified by:
isPaintable in interface PropertyEditor
Overrides:
isPaintable in class PropertyEditorSupport
Returns:
boolean false by default.

setAsText

public void setAsText(String text)
Sets the value as text.

Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Parameters:
text - The text.

getJavaInitializationString

public String getJavaInitializationString()
Specified by:
getJavaInitializationString in interface PropertyEditor
Overrides:
getJavaInitializationString in class PropertyEditorSupport

supportsCustomEditor

public boolean supportsCustomEditor()
Specified by:
supportsCustomEditor in interface PropertyEditor
Overrides:
supportsCustomEditor in class PropertyEditorSupport

getCustomEditor

public Component getCustomEditor()
Specified by:
getCustomEditor in interface PropertyEditor
Overrides:
getCustomEditor in class PropertyEditorSupport


Copyright © 2011. All Rights Reserved.