com.jgoodies.skeleton.view.editor
Class FlangeEditor

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

public final class FlangeEditor
extends AbstractEditor

An implementation of Editor that displays instances of class Flange.

This class uses a FormLayout to lay out the panel and a DefaultFormBuilder to add components. Columns are specified before the panel is filled with components, rows are added dynamically. The builder is used to update a cursor, to add rows dynamically, and to fill components. The builder's convenience methods are used to add labels and separators.

This panel building style is recommended unless you have a more powerful builder or don't want to add rows dynamically. See the SegmentEditor for an implementation that specifies rows before the panel is filled with components. For learning purposes you may check out the other Editor implementations too.

Version:
$Revision: 1.17 $
Author:
Karsten Lentzsch
See Also:
Flange, DescriptionEditor, ShaftEditor, SegmentEditor

Constructor Summary
FlangeEditor()
          Constructs a FlangeEditor.
 
Method Summary
protected  JComponent buildPanel()
          Builds and returns this editor's panel.
 void updateModel(Object model)
          Writes the 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, getTitle, getToolBar, setTitleSuffix
 
Methods inherited from class com.jgoodies.uif.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

FlangeEditor

public FlangeEditor()
Constructs a FlangeEditor.

Method Detail

updateModel

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

Parameters:
model - the object to write this view's values 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. Columns are specified before components are added to the form, rows are added dynamically using the DefaultFormBuilder.

The builder combines a step that is done again and again: add a label, proceed to the next data column and add a component.

Specified by:
buildPanel in class com.jgoodies.uif.AbstractView


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