com.jgoodies.skeleton.view.editor
Class WelcomeView

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

public final class WelcomeView
extends com.jgoodies.uif.AbstractView
implements Editor

This panel is displayed after a successful application startup to welcome the user. It provides access to actions that are most useful at the application start.

Version:
$Revision: 1.18 $
Author:
Karsten Lentzsch

Constructor Summary
WelcomeView(MainModel mainModel)
           
 
Method Summary
 void activate()
          Activates this editor.
protected  JComponent buildPanel()
          Builds and returns the panel.
 void deactivate()
          Deactivates the editor.
 Icon getIcon()
          Returns this editor's icon.
 String getTitle()
          Returns this editor's title.
 JToolBar getToolBar()
          Returns this editor's tool bar.
 void updateModel(Object model)
          Reads the values from this editor's components and sets them in the given model.
 void updateView(Object model)
          Reads the values from the given model and sets them in this editor's components.
 
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

WelcomeView

public WelcomeView(MainModel mainModel)
Method Detail

getIcon

public Icon getIcon()
Description copied from interface: Editor
Returns this editor's icon. The icon can be shared by all editors for a domain type, or it can change for every individual edited domain object.

Specified by:
getIcon in interface Editor
Returns:
this editor's icon

getTitle

public String getTitle()
Description copied from interface: Editor
Returns this editor's title. The title can be shared by all editors for a domain type, or it can change with every individual edited domain object.

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

getToolBar

public JToolBar getToolBar()
Description copied from interface: Editor
Returns this editor's tool bar.

Specified by:
getToolBar in interface Editor
Returns:
this editor's tool bar

activate

public void activate()
Description copied from interface: Editor
Activates this editor. This method is invoked if this editor shall become the active editor. In Skeleton (Pro) this happens whenever the selection type in the navigation panel has changed and this editor is associated with the new selection. For example if the selection changes from type Flange to type Shaft, this method will be invoked. It will not be invoked if the selection changes from Flange1 to Flange2.

Implementors may choose to do nothing or update the view. This depends on who can change domain objects. If only editors can change the domain, you likely need not update the view on editor activation. If the domain objects can be changed by third parties, you may need to update the view if an editor gets activated.

Implementors may also need to perform additional actions on activation. For example, scroll a list or table to make the current selection visible.

Specified by:
activate in interface Editor

deactivate

public void deactivate()
Description copied from interface: Editor
Deactivates the editor. This method is invoked if the selection type in the navigation panel has changed and this editor is associated with the old selection.

Typically an implementor needs to update the model data by copying values from this editor's components to the model.

Specified by:
deactivate in interface Editor

updateModel

public void updateModel(Object model)
Description copied from interface: Editor
Reads the values from this editor's components and sets them in the given model.

Specified by:
updateModel in interface Editor
Parameters:
model - the object to write this editor's value to

updateView

public void updateView(Object model)
Description copied from interface: Editor
Reads the values from the given model and sets them in this editor's components.

Specified by:
updateView in interface Editor
Parameters:
model - the object to read the values from

buildPanel

protected JComponent buildPanel()
Builds and returns the panel.

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


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