flatscape.editor
Class Editor

java.lang.Object
  |
  +--flatscape.editor.Editor
All Implemented Interfaces:
Configurable
Direct Known Subclasses:
CheckboxEditor, ColorEditor, DoubleEditor, FontEditor, LockedEditor, ModifierEditor, PointSizeEditor, TextEditor

public abstract class Editor
extends java.lang.Object
implements Configurable

The base class for uform property editors. Each editor is for editing of one type of property defined by the configuration XML element.

The editors are displayed in an EditorPanel.

Copyright (c) 2001 Rutgers, The State University of New Jersey

Since:
flatscape %Version%
Version:
%Version%, %Time%
See Also:
EditorPanel

Field Summary
protected  java.awt.Component component_
          The editor component
protected  java.lang.String description_
          The description of the property
protected  int height_
          Relative height of editor
protected  EditorModel model_
          The model
protected  java.lang.String name_
          The property name
protected  EditorPanel parent_
          The parent
 
Constructor Summary
Editor()
           
 
Method Summary
 java.lang.Object config(java.lang.Object parent, org.w3c.dom.Element config)
          Loads the configuration
 java.awt.Component getComponent()
           
 java.lang.String getDescription()
           
 int getHeight()
           
 java.lang.String getName()
           
abstract  java.lang.Object getPropertyValue()
           
 void init(EditorModel model)
          Initializing the editor.
 boolean isVisible()
           
 void propertyUpdated(java.lang.String name, java.lang.Object value)
          Called by EditorPanel, when a property has been updated.
abstract  void setPropertyValue(java.lang.Object value)
          Sets the value of the property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent_

protected EditorPanel parent_
The parent


model_

protected EditorModel model_
The model


name_

protected java.lang.String name_
The property name


description_

protected java.lang.String description_
The description of the property


component_

protected java.awt.Component component_
The editor component


height_

protected int height_
Relative height of editor

Constructor Detail

Editor

public Editor()
Method Detail

getPropertyValue

public abstract java.lang.Object getPropertyValue()
Returns:
the value of the property

setPropertyValue

public abstract void setPropertyValue(java.lang.Object value)
Sets the value of the property


isVisible

public boolean isVisible()
Returns:
true if editor is visible, else false

getName

public java.lang.String getName()
Returns:
the name of the property

getDescription

public java.lang.String getDescription()
Returns:
the description of the property

getComponent

public java.awt.Component getComponent()
Returns:
the editor component

getHeight

public int getHeight()
Returns:
relative height of the editor

init

public void init(EditorModel model)
Initializing the editor. Called by EditorPanel when its init method is called.


propertyUpdated

public void propertyUpdated(java.lang.String name,
                            java.lang.Object value)
Called by EditorPanel, when a property has been updated.


config

public java.lang.Object config(java.lang.Object parent,
                               org.w3c.dom.Element config)
                        throws java.lang.Exception
Loads the configuration

Specified by:
config in interface Configurable
Parameters:
parent - The argument passed into the FConfig.getList method
config - The DOM element representing the XML element that loaded this class.
Returns:
The configured class, usually returns this.
Throws:
java.lang.Exception - Thrown if there is any problem configuring this class.


Copyright (c) 2003 Rutgers, The State University of New Jersey