com.jgoodies.skeleton.view.editor
Class DescriptionEditor

java.lang.Object
  extended by com.jgoodies.uif_lite.AbstractView
      extended by com.jgoodies.skeleton.view.editor.AbstractEditor
          extended by com.jgoodies.skeleton.view.editor.DescriptionEditor
All Implemented Interfaces:
Editor

public final class DescriptionEditor
extends AbstractEditor

An implementation of the Editor interface that presents the general project data, i.e. instances of Description.

This container uses a FormLayout and the panel building is done with the PanelBuilder class. Columns and rows are specified before the panel is filled with components. Unlike the ShaftEditor this class uses a hard coded row numbers. This is easier to read with the downside that inserting a row requires extra work.

This panel building style is simple and works quite well. However, you may consider using a more sophisticated form builder to fill the panel and/or add rows dynamically; see the SegmentEditor and FlangeEditor.

Version:
$Revision: 1.13 $
Author:
Karsten Lentzsch
See Also:
Description, ShaftEditor, SegmentEditor, FlangeEditor

Constructor Summary
DescriptionEditor()
          Constructs a DescriptionEditor.
 
Method Summary
protected  JComponent buildPanel()
          Builds and returns this editor's panel.
 String getTitle()
          Returns this Editor's title.
 void updateModel(Object model)
          Writes editor contents to the given model.
 void updateView(Object model)
          Reads the editor contents from the given model.
 
Methods inherited from class com.jgoodies.skeleton.view.editor.AbstractEditor
activate, deactivate, getIcon, getToolBar, setTitleSuffix
 
Methods inherited from class com.jgoodies.uif_lite.AbstractView
getPanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jgoodies.skeleton.view.editor.Editor
getPanel
 

Constructor Detail

DescriptionEditor

public DescriptionEditor()
Constructs a DescriptionEditor.

Method Detail

getTitle

public String getTitle()
Returns this Editor's title.

Specified by:
getTitle in interface Editor
Overrides:
getTitle in class AbstractEditor
Returns:
this editor's title.

updateModel

public void updateModel(Object model)
Writes editor contents to the given model.

Parameters:
model - the object to write this editor's value to

updateView

public void updateView(Object model)
Reads the editor contents from the given model.

Parameters:
model - the object to read the values from

buildPanel

protected JComponent buildPanel()
Builds and returns this editor's panel.

Specified by:
buildPanel in class com.jgoodies.uif_lite.AbstractView
Returns:
this view's panel


Copyright © 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.