org.beanfabrics.swing.customizer.table
Class BnColumnPropertyEditor

java.lang.Object
  extended by org.beanfabrics.swing.customizer.table.BnColumnPropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

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

The BnColumnPropertyEditor is a JavaBeans PropertyEditor for a BnColumn.


Constructor Summary
  BnColumnPropertyEditor()
           
protected BnColumnPropertyEditor(ObjectToSourceCodeFormatter<BnColumn[]> javaFormat)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Register a listener for the PropertyChangeEvent.
 java.lang.String getAsText()
           
 java.awt.Component getCustomEditor()
          A PropertyEditor may choose to make available a full custom Component that edits its property value.
 java.lang.String getJavaInitializationString()
          This method is intended for use when generating Java code to set the value of the property.
 java.lang.String[] getTags()
          If the property value must be one of a set of known tagged values, then this method should return an array of the tags.
 java.lang.Object getValue()
          Gets the property value.
 boolean isPaintable()
          Determines whether this property model is paintable.
 void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)
          Paint a representation of the value into a given area of screen real estate.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a listener for the PropertyChangeEvent.
 void setAsText(java.lang.String text)
           
 void setValue(java.lang.Object value)
          Set (or change) the object that is to be edited.
 boolean supportsCustomEditor()
          Determines whether this property model supports a custom editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BnColumnPropertyEditor

public BnColumnPropertyEditor()

BnColumnPropertyEditor

protected BnColumnPropertyEditor(ObjectToSourceCodeFormatter<BnColumn[]> javaFormat)
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Register a listener for the PropertyChangeEvent.

Specified by:
addPropertyChangeListener in interface java.beans.PropertyEditor
Parameters:
listener - the listener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a listener for the PropertyChangeEvent.

Specified by:
removePropertyChangeListener in interface java.beans.PropertyEditor
Parameters:
listener - the listener to be removed

setValue

public void setValue(java.lang.Object value)
Set (or change) the object that is to be edited.

Specified by:
setValue in interface java.beans.PropertyEditor
Parameters:
value - The object to be edited.

getValue

public java.lang.Object getValue()
Gets the property value.

Specified by:
getValue in interface java.beans.PropertyEditor
Returns:
the property value

getJavaInitializationString

public java.lang.String getJavaInitializationString()
This method is intended for use when generating Java code to set the value of the property.

Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor
Returns:
The generated Java code, see BnColumnBuilder

getAsText

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

setAsText

public void setAsText(java.lang.String text)
Specified by:
setAsText in interface java.beans.PropertyEditor

supportsCustomEditor

public boolean supportsCustomEditor()
Determines whether this property model supports a custom editor.

Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor

getCustomEditor

public java.awt.Component getCustomEditor()
A PropertyEditor may choose to make available a full custom Component that edits its property value.

Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Returns:
the custom editor component

isPaintable

public boolean isPaintable()
Determines whether this property model is paintable.

Specified by:
isPaintable in interface java.beans.PropertyEditor
Returns:
true is this property model is paintable, otherwise false

paintValue

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

Specified by:
paintValue in interface java.beans.PropertyEditor
Parameters:
gfx - The graphics object to be painted.
box - The area to be painted to.

getTags

public java.lang.String[] getTags()
If the property value must be one of a set of known tagged values, then this method should return an array of the tags.

Specified by:
getTags in interface java.beans.PropertyEditor
Returns:
An array with the tagged values.