Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sunwheeltech.sirius.support
Class SimpleReadOnlyPropertyEditor  view SimpleReadOnlyPropertyEditor download SimpleReadOnlyPropertyEditor.java

java.lang.Object
  extended bycom.sunwheeltech.sirius.support.SimpleReadOnlyPropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class SimpleReadOnlyPropertyEditor
extends java.lang.Object
implements java.beans.PropertyEditor

Simple property 'editor' that displays current value of a read-only property


Field Summary
protected  java.util.Vector listeners
          list of property change listeners to be notified of property updates
static java.lang.String NULL_VALUE_LABEL
          display name to use for a null value
(package private)  java.lang.Object value
          value being edited
 
Constructor Summary
SimpleReadOnlyPropertyEditor()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          add a listener to notify of property changes
 void firePropertyChange(java.lang.Object oldv, java.lang.Object newv)
          fire update event to all listeners
 java.lang.String getAsText()
          Gets the property value as a string suitable for presentation to a human to edit.
 java.awt.Component getCustomEditor()
          get the custom editor component
 java.lang.String getJavaInitializationString()
          get scrap of java code used to initialise the bean
 java.lang.String[] getTags()
          get list of accepted values for this bean property
 java.lang.Object getValue()
          get the value of the property.
 boolean isPaintable()
          whether can paint a representation of current value
 void paintValue(java.awt.Graphics g, java.awt.Rectangle box)
          Paint a representation of the value into a given area of screen
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          remove a listener
 void setAsText(java.lang.String str)
          Sets the property value by parsing a given String.
 void setValue(java.lang.Object obj)
          set the object to be edited
 boolean supportsCustomEditor()
          indicate whether a custom editor component is supported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_VALUE_LABEL

public static final java.lang.String NULL_VALUE_LABEL
display name to use for a null value

See Also:
Constant Field Values

value

java.lang.Object value
value being edited


listeners

protected java.util.Vector listeners
list of property change listeners to be notified of property updates

Constructor Detail

SimpleReadOnlyPropertyEditor

public SimpleReadOnlyPropertyEditor()
Method Detail

getValue

public java.lang.Object getValue()
get the value of the property.

Specified by:
getValue in interface java.beans.PropertyEditor

setValue

public void setValue(java.lang.Object obj)
set the object to be edited

Specified by:
setValue in interface java.beans.PropertyEditor

supportsCustomEditor

public boolean supportsCustomEditor()
indicate whether a custom editor component is supported

Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor

getCustomEditor

public java.awt.Component getCustomEditor()
get the custom editor component

Specified by:
getCustomEditor in interface java.beans.PropertyEditor

isPaintable

public boolean isPaintable()
whether can paint a representation of current value

Specified by:
isPaintable in interface java.beans.PropertyEditor

paintValue

public void paintValue(java.awt.Graphics g,
                       java.awt.Rectangle box)
Paint a representation of the value into a given area of screen

Specified by:
paintValue in interface java.beans.PropertyEditor

getJavaInitializationString

public java.lang.String getJavaInitializationString()
get scrap of java code used to initialise the bean

Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor

getAsText

public java.lang.String getAsText()
Gets the property value as a string suitable for presentation to a human to edit.

Specified by:
getAsText in interface java.beans.PropertyEditor

setAsText

public void setAsText(java.lang.String str)
               throws java.lang.IllegalArgumentException
Sets the property value by parsing a given String.

Specified by:
setAsText in interface java.beans.PropertyEditor

getTags

public java.lang.String[] getTags()
get list of accepted values for this bean property

Specified by:
getTags in interface java.beans.PropertyEditor

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
add a listener to notify of property changes

Specified by:
addPropertyChangeListener in interface java.beans.PropertyEditor

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
remove a listener

Specified by:
removePropertyChangeListener in interface java.beans.PropertyEditor

firePropertyChange

public void firePropertyChange(java.lang.Object oldv,
                               java.lang.Object newv)
fire update event to all listeners