Oracle9i Business Components for Java API Reference
Oracle9i Jdeveloper (9.0.4)
B10391-01


oracle.jbo.server.rules
Class BaseEnumEditor

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
        |
        +--oracle.jbo.server.rules.BaseEnumEditor
All Implemented Interfaces:
java.beans.PropertyEditor
Direct Known Subclasses:
CompareTypeEditor

public abstract class BaseEnumEditor
extends java.beans.PropertyEditorSupport

A base for classes that support GUIs for editing lists of symbols.

Since:
Jdeveloper 3.0

Constructor Summary
BaseEnumEditor()
           

 

Method Summary
 java.lang.String getAsText()
          Generates a string representing this editor's values.
 java.awt.Component getCustomEditor()
          Creates and returns the component that actually modifies this editor's values.
protected abstract  java.lang.String getEnumName()
           
 java.lang.String getJavaInitializationString()
          Generates a Java code string representing a constructor for this editor's values.
abstract  java.lang.String[] getTags()
          Constructs an array of value tags from the enumerated symbols.
 boolean isPaintable()
          Reports whether the editor component has been initialized.
 void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)
          Displays a value in this editor.
 void setAsText(java.lang.String txt)
          Sets this editor's values from a text string.
 void setValue(java.lang.Object o)
          Sets the values to be edited.
 boolean supportsCustomEditor()
          Reports that this editor's values may be modified by an editor component.

 

Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getValue, removePropertyChangeListener

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BaseEnumEditor

public BaseEnumEditor()
Method Detail

getJavaInitializationString

public java.lang.String getJavaInitializationString()
Generates a Java code string representing a constructor for this editor's values.
Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor
Overrides:
getJavaInitializationString in class java.beans.PropertyEditorSupport
Returns:
a fragment of Java code.

getCustomEditor

public java.awt.Component getCustomEditor()
Creates and returns the component that actually modifies this editor's values.

If the component does not exist it is created.

Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Overrides:
getCustomEditor in class java.beans.PropertyEditorSupport
Returns:
this editor's editor component.

supportsCustomEditor

public boolean supportsCustomEditor()
Reports that this editor's values may be modified by an editor component.
Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor
Overrides:
supportsCustomEditor in class java.beans.PropertyEditorSupport
Returns:
true.

isPaintable

public boolean isPaintable()
Reports whether the editor component has been initialized.
Specified by:
isPaintable in interface java.beans.PropertyEditor
Overrides:
isPaintable in class java.beans.PropertyEditorSupport
Returns:
true if the editor component has been initialized.
See Also:
getCustomEditor()

paintValue

public void paintValue(java.awt.Graphics gfx,
                       java.awt.Rectangle box)
Displays a value in this editor.
Specified by:
paintValue in interface java.beans.PropertyEditor
Overrides:
paintValue in class java.beans.PropertyEditorSupport
Parameters:
gfx - a graphics context for a value.
box - ignored.

setValue

public void setValue(java.lang.Object o)
Sets the values to be edited.
Specified by:
setValue in interface java.beans.PropertyEditor
Overrides:
setValue in class java.beans.PropertyEditorSupport
Parameters:
o - the values, in a form that casts to Vector.

setAsText

public void setAsText(java.lang.String txt)
Sets this editor's values from a text string.
Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Parameters:
txt - a string in a form generated by getAsText.
Throws:
java.lang.IllegalArgumentException - if the string is invalid.
See Also:
BaseEnumEditor#gsetAsText

getAsText

public java.lang.String getAsText()
Generates a string representing this editor's values.
Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport
Returns:
a string in a form acceptable to setAsText.
See Also:
setAsText(java.lang.String)

getTags

public abstract java.lang.String[] getTags()
Constructs an array of value tags from the enumerated symbols.
Specified by:
getTags in interface java.beans.PropertyEditor
Overrides:
getTags in class java.beans.PropertyEditorSupport
Returns:
the array of value tags.

getEnumName

protected abstract java.lang.String getEnumName()

Oracle9i Business Components for Java API Reference
Oracle9i Jdeveloper (9.0.4)
B10391-01


 

Copyright © 1997, 2003, Oracle. All rights reserved.