com.melloware.jukes.gui.tool
Class MainModule

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.melloware.jukes.gui.tool.MainModule
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, java.io.Serializable

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

Provides bound bean properties for the catalog, navigation tree, navigation tree selection, selection type. Refers to the presentation settings and a submodule for the dynamic help.

Copyright (c) 1999-2007 Melloware, Inc.

Version:
4.0
Author:
Emil A. Lefkof III
See Also:
Settings, DynamicHelpModule, Serialized Form

Field Summary
static java.lang.String PROPERTYNAME_CATALOG
           
static java.lang.String PROPERTYNAME_HIGHLIGHT
           
static java.lang.String PROPERTYNAME_NAVIGATION_TREE_MODEL
           
static java.lang.String PROPERTYNAME_SELECTION
           
static java.lang.String PROPERTYNAME_SELECTION_TYPE
           
static Settings SETTINGS
          Refers to the submodule for the UI-related settings.
 
Constructor Summary
MainModule()
          Constructs a MainModule that has no catalog set, no selection and no tree model.
 
Method Summary
 Catalog getCatalog()
          Returns the current catalog.
 javax.swing.tree.TreeModel getNavigationTreeModel()
          Returns the tree model for the navigation tree.
 javax.swing.tree.TreeSelectionModel getNavigationTreeSelectionModel()
          Returns the fixed selection model for the navigation tree.
 NavigationNode getSelectedNode()
          Gets the selectedNode.
 java.lang.Object getSelection()
          Returns the current selection, a domain object.
 java.lang.Class getSelectionType()
          Returns the class of the selected domain object.
 boolean hasCatalog()
          Checks and answers if a catalog is loaded.
 boolean isCatalogFilePathValid()
          Checks and answers whether the catalog's file path is valid.
 void refreshSelection(java.lang.Object domainObject, java.lang.String operation)
          Refreshes the currently selected tree node.
 void refreshTree()
          Refreshes the tree node from the database.
 void restoreState()
          Restores the application state from the user preferences.
 void selectNodeInTree(java.lang.Object newSelection)
          Finds the selection in the tree and expands the node and sets the editor.
 void setCatalog(Catalog newCatalog)
          Sets a new catalog.
 void storeState()
          Stores the application state to the user preferences.
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireMulticastPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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_CATALOG

public static final java.lang.String PROPERTYNAME_CATALOG
See Also:
Constant Field Values

PROPERTYNAME_HIGHLIGHT

public static final java.lang.String PROPERTYNAME_HIGHLIGHT
See Also:
Constant Field Values

PROPERTYNAME_SELECTION

public static final java.lang.String PROPERTYNAME_SELECTION
See Also:
Constant Field Values

PROPERTYNAME_SELECTION_TYPE

public static final java.lang.String PROPERTYNAME_SELECTION_TYPE
See Also:
Constant Field Values

PROPERTYNAME_NAVIGATION_TREE_MODEL

public static final java.lang.String PROPERTYNAME_NAVIGATION_TREE_MODEL
See Also:
Constant Field Values

SETTINGS

public static final Settings SETTINGS
Refers to the submodule for the UI-related settings.

See Also:
#getSettings()
Constructor Detail

MainModule

public MainModule()
Constructs a MainModule that has no catalog set, no selection and no tree model.

Method Detail

getCatalog

public Catalog getCatalog()
Returns the current catalog.

Returns:
the current catalog.

getNavigationTreeModel

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

Returns:
the tree model for the navigation tree.

getNavigationTreeSelectionModel

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

Returns:
the fixed selection model for the navigation tree.

getSelectedNode

public NavigationNode getSelectedNode()
Gets the selectedNode.

Returns:
Returns the selectedNode.

getSelection

public java.lang.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 java.lang.Class getSelectionType()
Returns the class of the selected domain object.

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

setCatalog

public void setCatalog(Catalog newCatalog)
Sets a new catalog.

Parameters:
newCatalog - the catalog to set
Throws:
java.lang.NullPointerException - if the new catalog is null

isCatalogFilePathValid

public boolean isCatalogFilePathValid()
Checks and answers whether the catalog's file path is valid.

Returns:
true if the catalog's file path is valid.

hasCatalog

public boolean hasCatalog()
Checks and answers if a catalog is loaded.

Returns:
true if a catalog is loaded.

refreshSelection

public void refreshSelection(java.lang.Object domainObject,
                             java.lang.String operation)
Refreshes the currently selected tree node.

Parameters:
domainObject - the domain object may be useful
operation - NODE_INSERTED, NODE_DELETED, NODE_CHANGED

refreshTree

public void refreshTree()
Refreshes the tree node from the database.

Throws:
java.lang.NullPointerException - if the new catalog is null

restoreState

public void restoreState()
Restores the application state from the user preferences.


selectNodeInTree

public void selectNodeInTree(java.lang.Object newSelection)
Finds the selection in the tree and expands the node and sets the editor.

Parameters:
newSelection - the selection to set
See Also:
getSelection()

storeState

public void storeState()
Stores the application state to the user preferences.



Copyright © 1999-2008 Melloware Inc. All Rights Reserved.