com.jgoodies.skeleton.model
Class NavigationModel

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.jgoodies.skeleton.model.NavigationModel
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, Serializable

public final class NavigationModel
extends com.jgoodies.binding.beans.Model

Provides bound properties, operations and Actions for the navigation tree.

Version:
$Revision: 1.23 $
Author:
Karsten Lentzsch
See Also:
Serialized Form

Field Summary
static String ACTION_ADD_FLANGE
           
static String ACTION_ADD_SEGMENT
           
static String ACTION_ADD_SHAFT
           
static String ACTION_DELETE_ITEM
           
static String PROPERTYNAME_NAVIGATION_TREE_MODEL
           
static String PROPERTYNAME_SELECTION
           
static String PROPERTYNAME_SELECTION_TYPE
           
 
Constructor Summary
NavigationModel(MainModel mainModel)
          Constructs a NavigationModel that has no selection and no tree model.
 
Method Summary
 void addFlange(ActionEvent e)
           
 void addSegment(ActionEvent e)
           
 void addShaft(ActionEvent e)
           
 void deleteItem(ActionEvent e)
           
 TreeModel getNavigationTreeModel()
          Returns the tree model for the navigation tree.
 TreeSelectionModel getNavigationTreeSelectionModel()
          Returns the fixed selection model for the navigation tree.
 Object getSelection()
          Returns the current selection, a domain object.
 Class getSelectionType()
          Returns the class of the selected domain object.
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTYNAME_SELECTION

public static final String PROPERTYNAME_SELECTION
See Also:
Constant Field Values

PROPERTYNAME_SELECTION_TYPE

public static final String PROPERTYNAME_SELECTION_TYPE
See Also:
Constant Field Values

PROPERTYNAME_NAVIGATION_TREE_MODEL

public static final String PROPERTYNAME_NAVIGATION_TREE_MODEL
See Also:
Constant Field Values

ACTION_ADD_SHAFT

public static final String ACTION_ADD_SHAFT
See Also:
Constant Field Values

ACTION_ADD_FLANGE

public static final String ACTION_ADD_FLANGE
See Also:
Constant Field Values

ACTION_ADD_SEGMENT

public static final String ACTION_ADD_SEGMENT
See Also:
Constant Field Values

ACTION_DELETE_ITEM

public static final String ACTION_DELETE_ITEM
See Also:
Constant Field Values
Constructor Detail

NavigationModel

public NavigationModel(MainModel mainModel)
Constructs a NavigationModel that has no selection and no tree model.

Parameters:
mainModel - the parent model, the MainModel
Method Detail

getSelection

public Object getSelection()
Returns the current selection, a domain object. This selection will be updated if the selection in the navigation tree changes. During the transition from one tree selection to another this value may hold the old or new selection.

Returns:
the domain object selected in the navigation tree.
See Also:
getSelectionType()

getSelectionType

public Class getSelectionType()
Returns the class of the selected domain object.

Returns:
the class of the selected domain object.
See Also:
getSelection()

getNavigationTreeModel

public TreeModel getNavigationTreeModel()
Returns the tree model for the navigation tree.

Returns:
the tree model for the navigation tree.

getNavigationTreeSelectionModel

public TreeSelectionModel getNavigationTreeSelectionModel()
Returns the fixed selection model for the navigation tree.

Returns:
the fixed selection model for the navigation tree.

addShaft

@Action
public void addShaft(ActionEvent e)

addFlange

@Action
public void addFlange(ActionEvent e)

addSegment

@Action
public void addSegment(ActionEvent e)

deleteItem

@Action
public void deleteItem(ActionEvent e)


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