com.sdm.quasar.client.showcase.swing.navigation
Class NavigationDialog

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.showcase.swing.navigation.NavigationDialog
All Implemented Interfaces:
Feature, NavigationDialogActions, SystemInfoProvider

public class NavigationDialog
extends AbstractFeature
implements NavigationDialogActions

The navigation dialog that displays a tree menu used to select various dialogs in the portal. The dialog uses a NavigationPanel as visual representation.

The dialog requires that a PortalControlService is available in the hierarchy.

The dialog requires a creation context of type NavigationDialogConfig.

The dialog uses a DataManagerComponent} to store the navigation tree and the currently selected node.

Version:
1.0
Author:
Thomas Wolf, sd&m AG, Martin Haft, sd&m AG, Bernd Olleck, sd&m AG

Field Summary
protected static java.lang.String DATA_NAVIGATION_TREE
          The key of the navigation menu in the data manager, the value is of type NavigationMenuNode.
protected static java.lang.String DATA_SELECTED_NODE
          The key of the currently selected menu item in the data manager, the value is of type NavigationMenuNode.
 
Constructor Summary
NavigationDialog()
           
 
Method Summary
protected  boolean canRemoveOldDialog()
          Tests if the current content dialog can be removed (calls PortalControlService.canReleaseContent()).
protected  void changeToNewDialog(NavigationMenuNode navigationMenuNode)
          Updates the value of DATA_SELECTED_NODE and calls PortalControlService.createContentDialog(String, Object) with the parameters defined in the given node.
protected  void dispose()
          Called when the feature or dialog is disposed.
protected  void init()
          Called when the feature is initializing.
protected  void prepare()
          Called when the dialog is prepared.
 void selectNode(NavigationMenuNode navigationMenuNode)
          Closes the current content dialog if possible (canRemoveOldDialog()) and creates the new content dialog (changeToNewDialog(NavigationMenuNode).
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractFeature
activate, attachDialogControl, collectSystemInfo, deactivate, disposeFeature, getDialogControl, isInitialized, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_NAVIGATION_TREE

protected static final java.lang.String DATA_NAVIGATION_TREE
The key of the navigation menu in the data manager, the value is of type NavigationMenuNode.

See Also:
Constant Field Values

DATA_SELECTED_NODE

protected static final java.lang.String DATA_SELECTED_NODE
The key of the currently selected menu item in the data manager, the value is of type NavigationMenuNode.

See Also:
Constant Field Values
Constructor Detail

NavigationDialog

public NavigationDialog()
Method Detail

init

protected void init()
Description copied from class: AbstractFeature
Called when the feature is initializing. This is normally done, when the feature is connected to the lifecycle of the DialogControl installed to. To access the DialogControl use the AbstractFeature.getDialogControl() method.

Override this method to perform some action on initialization e.g. register public services.

Specified by:
init in class AbstractFeature
See Also:
com.sdm.quasar.client.core.dialog.features.AbstractFeature#init()

dispose

protected void dispose()
                throws DisposeException
Description copied from class: AbstractFeature
Called when the feature or dialog is disposed. Override this method to clean up resources and free memory when disposing.

Specified by:
dispose in class AbstractFeature
Throws:
DisposeException
See Also:
com.sdm.quasar.client.core.dialog.features.AbstractFeature#dispose()

prepare

protected void prepare()
Description copied from class: AbstractFeature
Called when the dialog is prepared. Override this method if you want to perform some action on LifeCycle.prepare(), e.g. gain resource and provide services for childs.

The default implementation in AbstractFeature does nothing.

Overrides:
prepare in class AbstractFeature
See Also:
AbstractFeature.prepare()

selectNode

public void selectNode(NavigationMenuNode navigationMenuNode)
Closes the current content dialog if possible (canRemoveOldDialog()) and creates the new content dialog (changeToNewDialog(NavigationMenuNode).

Specified by:
selectNode in interface NavigationDialogActions
Parameters:
navigationMenuNode - the menu entry to select or null, if no entry should be selected

canRemoveOldDialog

protected boolean canRemoveOldDialog()
Tests if the current content dialog can be removed (calls PortalControlService.canReleaseContent()).

Returns:
true if the current content dialog can be closed

changeToNewDialog

protected void changeToNewDialog(NavigationMenuNode navigationMenuNode)
Updates the value of DATA_SELECTED_NODE and calls PortalControlService.createContentDialog(String, Object) with the parameters defined in the given node.

Parameters:
navigationMenuNode - the menu entry with its dialog information