IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.desktop
Class DSENavigationController

java.lang.Object
  extended bycom.ibm.dse.base.DSENotifier
      extended bycom.ibm.dse.desktop.DSENavigationController
All Implemented Interfaces:
CoordinatedEventListener, CoordinatedEventSource, java.util.EventListener, NavigationController, Notifier

public class DSENavigationController
extends DSENotifier
implements NavigationController, CoordinatedEventSource, CoordinatedEventListener

This class controls the navigation of a business function. Each Task has a DSENavigationController to keep information of the views and navigation amongst them based on the received DSECoordinated events.


Field Summary
static java.lang.String CTXUSED_ACTIVE
          The identifier of the context of the active view
static java.lang.String CTXUSED_PARENT
          The identifier of the context of the parent active view
static java.lang.String CTXUSED_PROCESS
          The identifier of the context of the process
protected  int NAV_CHILDREN
          The identifier of children navigation
protected  int NAV_NONE
          The identifier of none navigation
protected  int NAV_PEER
          The identifier of the peer navigation
protected  java.util.Hashtable viewOrderList
          The hashtable with the list of views ordered
protected  java.util.Hashtable viewRegistryList
          The hashtable with the list of views
 
Fields inherited from class com.ibm.dse.base.DSENotifier
handlersList, name
 
Constructor Summary
DSENavigationController()
          This constructor creates a DSENavigationController object.
DSENavigationController(java.lang.String aName)
          This constructor creates a DSENavigationController object.
 
Method Summary
 void activateView(java.lang.String viewId)
          Activates the view passed as the parameter.
 void activeSubView(java.lang.String viewId, java.util.Hashtable position)
          Activates the view passed as a parameter.
 void addCoordinatedEventListener(CoordinatedEventListener newListener)
          Adds a CoordinatedEventListener.
 void cancel(java.lang.String viewId)
          Cancels all the operations of the navigation and closes the navigation's panels until it reaches the parent view, if it exists.
 void close()
          Closes all the views opened for the task.
 void closeNavigation(java.lang.String viewId, DataMapperFormat mapper)
          Closes all the panels of the navigation and, if a closeMapFormat is declared, maps the value to the active view.
 void closeNavigation(java.lang.String viewId, java.lang.String closeMapFormat)
          Closes all the panels of the navigation and uses the closeMapFormat to map the value to the active view.
 void closeView(java.lang.String id)
          Closes the view passed as the parameter.
 void deActivateView(java.lang.String viewId)
          Deactivates the view passed as the parameter.
 void deRegister(java.lang.String viewId)
          Removes the entry of this view from the View registry.
 void deRegisterSubView(java.lang.String viewId)
          Removes the entry of this view from the View registry.
 void fireCoordinationEvent()
          Fires a CoordinationEvent.
 void fireCoordinationEvent(DSECoordinationEvent event)
          Fires a CoordinationEvent.
 java.lang.String getActiveView()
          Returns the viewId associated with the active view.
 java.util.Vector getChilds(java.lang.String viewId)
          Returns a list of the children associated with the viewId.
static java.awt.Component getFirstFocusableComponent(java.awt.Container c)
          Gets the first component inside the task that can accept the focus.
 java.lang.String getKey()
          Returns the last element of the queue of views.
 SpInternalFrame getNavigationArea()
          Returns the Container of the view.
 java.lang.String getNextView(java.lang.String viewId)
          Returns the viewId of the next view associated with the passed viewId.
 java.lang.String getParent(java.lang.String viewId)
          Returns the ID of the parent view associated with the viewId.
 java.util.Vector getPeers(java.lang.String viewId)
          Returns the peers associated with the viewId.
 java.lang.String getPreviousView(java.lang.String viewId)
          Returns the viewId of the previous view associated with the viewId.
 Processor getProcess()
          Returns the process associated with this NavigationController.
 javax.swing.JScrollPane getScrollPane()
          Returns the scrollpane associated with the navigationArea.
 CoordinatedPanel getViewInstance(java.lang.String viewId)
          Returns the instance of the view passed as a parameter.
 void handleDSECoordinationEvent(DSECoordinationEvent event)
          Contains the appropriate actions to be executed when DSECoordinationEvent has been triggered.
 boolean isChildren(java.lang.String viewId)
          Returns whether the view with the passed ID has children.
 boolean isPeer(java.lang.String viewId)
          Returns whether the view with the passed ID is a peer of another view.
 void modifyNavigation(java.lang.String viewId, boolean close, boolean rollback, DataMapperFormat mapper)
          Closes, rolls back, and maps (depending on the parameters) the view.
 void nextView(java.lang.String id, ClientOperation operation, int navigation, java.lang.String linkContextTo, java.lang.String inputPathFormat)
          Shows the next view, activates it, and stores the IDs of the next and previous views.
 void nextView(java.lang.String id, java.lang.String source, ClientOperation operation, int navigation, java.lang.String linkContextTo, java.lang.String inputPathFormat)
          Shows the next view, activates it, and stores the IDs of the next and previous views.
 void nextView(java.lang.String id, java.lang.String source, ClientOperation operation, int navigation, java.lang.String linkContextTo, java.lang.String inputPathFormat, java.util.Hashtable position)
          Shows the next view, activates it, and stores the IDs of the next and previous views.
 void openView(java.lang.String viewId)
          Opens a view, activates it, and stores all the information about the view.
 void openView(java.lang.String viewId, ClientOperation op, java.lang.Boolean execOp)
          Opens a view, activates it, and stores all the information related to this view.
 void openView(java.lang.String viewId, ClientOperation op, int navigation, java.lang.String linkContextTo, java.lang.String inputPathFormat)
          Opens a view, activates it, and stores all the information related to this view.
 void openView(java.lang.String viewId, java.lang.String viewSource, ClientOperation op, int navigation, java.lang.String linkContextTo, DataMapperFormat mapper)
          Opens a view, activates it, and stores all the information related to this view.
 void openView(java.lang.String viewId, java.lang.String viewSource, ClientOperation op, int navigation, java.lang.String linkContextTo, DataMapperFormat mapper, java.util.Hashtable position)
          Opens a view, activates it, and stores all the information related to this view.
 void openView(java.lang.String viewId, java.lang.String viewSource, ClientOperation op, int navigation, java.lang.String linkContextTo, java.lang.String inputFormat)
          Opens a view, activates it, and stores all the information related to this view.
 void openView(java.lang.String viewId, java.lang.String viewSource, ClientOperation op, int navigation, java.lang.String linkContextTo, java.lang.String inputFormat, java.util.Hashtable position)
          Opens a view, activates it, and stores all the information related to this view.
 void previousView()
          Deactivates the active view and shows the previous view.
 void reactivateSubView(java.lang.String viewId)
          Reactivates the view passed as a parameter.
 void refreshActiveView()
          Refreshes the active view of the Task.
 void removeCoordinatedEventListener(CoordinatedEventListener newListener)
          Removes the CoordinatedEventListener.
 java.util.Vector reorder(java.util.Vector v)
          Returns the order in which the views were created.
 void resizeActiveView(int height, int width)
          Resizes the active view.
 void resizeActiveView(int height, int width, int xpos, int ypos)
          Resizes and relocates the active view.
 void setActiveView(java.lang.String viewId)
          Sets the value of the activeView property.
 void setLevel(int i)
          Returns the level of the navigationArea with respect to the WorkingArea.
 void setNavigationArea(SpInternalFrame na)
          Sets the value of the navigationArea property.
 void setProcess(Processor proc)
          Sets the value of the process property.
 void undo(java.lang.String viewId)
          Rolls back all the operations of the navigation.
 
Methods inherited from class com.ibm.dse.base.DSENotifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent, terminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewRegistryList

protected java.util.Hashtable viewRegistryList
The hashtable with the list of views


viewOrderList

protected java.util.Hashtable viewOrderList
The hashtable with the list of views ordered


NAV_NONE

protected int NAV_NONE
The identifier of none navigation


NAV_PEER

protected int NAV_PEER
The identifier of the peer navigation


NAV_CHILDREN

protected int NAV_CHILDREN
The identifier of children navigation


CTXUSED_PROCESS

public static final java.lang.String CTXUSED_PROCESS
The identifier of the context of the process

See Also:
Constant Field Values

CTXUSED_ACTIVE

public static final java.lang.String CTXUSED_ACTIVE
The identifier of the context of the active view

See Also:
Constant Field Values

CTXUSED_PARENT

public static final java.lang.String CTXUSED_PARENT
The identifier of the context of the parent active view

See Also:
Constant Field Values
Constructor Detail

DSENavigationController

public DSENavigationController()
This constructor creates a DSENavigationController object.

This class takes charge of all the navigation of the views.


DSENavigationController

public DSENavigationController(java.lang.String aName)
                        throws java.io.IOException
This constructor creates a DSENavigationController object.

This class takes charge of all the navigation of the views.

Parameters:
aName - java.lang.String
Throws:
java.io.IOException
Method Detail

activateView

public void activateView(java.lang.String viewId)
Activates the view passed as the parameter. This view is the active view of the NavigationArea and has the focus.

Specified by:
activateView in interface NavigationController
Parameters:
viewId - java.lang.String - the identifier of the view

activeSubView

public void activeSubView(java.lang.String viewId,
                          java.util.Hashtable position)
Activates the view passed as a parameter. This view is the active view of the NavigationArea and remains modal through the rest of the navigation flow. This view has a fixed position and size, which have been passed as parameters. The behavior of this view is like a subview.

Specified by:
activeSubView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
position - java.util.Hashtable - position and size of the view

addCoordinatedEventListener

public void addCoordinatedEventListener(CoordinatedEventListener newListener)
Adds a CoordinatedEventListener.

Specified by:
addCoordinatedEventListener in interface CoordinatedEventSource
Parameters:
newListener - CoordinatedEventListener

cancel

public void cancel(java.lang.String viewId)
Cancels all the operations of the navigation and closes the navigation's panels until it reaches the parent view, if it exists.

Specified by:
cancel in interface NavigationController
Parameters:
viewId - String

close

public void close()
Closes all the views opened for the task.

Specified by:
close in interface NavigationController

closeNavigation

public void closeNavigation(java.lang.String viewId,
                            java.lang.String closeMapFormat)
Closes all the panels of the navigation and uses the closeMapFormat to map the value to the active view.

Specified by:
closeNavigation in interface NavigationController
Parameters:
viewId - String
closeMapFormat - String

closeNavigation

public void closeNavigation(java.lang.String viewId,
                            DataMapperFormat mapper)
Closes all the panels of the navigation and, if a closeMapFormat is declared, maps the value to the active view.

Specified by:
closeNavigation in interface NavigationController
Parameters:
viewId - String
mapper - DataMapperFormat

closeView

public void closeView(java.lang.String id)
Closes the view passed as the parameter.

Specified by:
closeView in interface NavigationController
Parameters:
id - java.lang.String - identifier of the view

deActivateView

public void deActivateView(java.lang.String viewId)
Deactivates the view passed as the parameter.

Specified by:
deActivateView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view

deRegister

public void deRegister(java.lang.String viewId)
Removes the entry of this view from the View registry.

Parameters:
viewId - java.lang.String - identifier of the view

deRegisterSubView

public void deRegisterSubView(java.lang.String viewId)
Removes the entry of this view from the View registry.

Specified by:
deRegisterSubView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view

fireCoordinationEvent

public void fireCoordinationEvent()
Fires a CoordinationEvent.

Specified by:
fireCoordinationEvent in interface CoordinatedEventSource

fireCoordinationEvent

public void fireCoordinationEvent(DSECoordinationEvent event)
Fires a CoordinationEvent.

Specified by:
fireCoordinationEvent in interface CoordinatedEventSource

getActiveView

public java.lang.String getActiveView()
Returns the viewId associated with the active view.

Specified by:
getActiveView in interface NavigationController
Returns:
String

getChilds

public java.util.Vector getChilds(java.lang.String viewId)
Returns a list of the children associated with the viewId.

Specified by:
getChilds in interface NavigationController
Returns:
Vector

getFirstFocusableComponent

public static java.awt.Component getFirstFocusableComponent(java.awt.Container c)
Gets the first component inside the task that can accept the focus.

Parameters:
c - java.awt.Container
Returns:
java.awt.Component

getKey

public java.lang.String getKey()
Returns the last element of the queue of views.

Returns:
String

getNavigationArea

public SpInternalFrame getNavigationArea()
Returns the Container of the view.

Specified by:
getNavigationArea in interface NavigationController
Returns:
java.swing JComponent

getNextView

public java.lang.String getNextView(java.lang.String viewId)
Returns the viewId of the next view associated with the passed viewId.

Specified by:
getNextView in interface NavigationController
Parameters:
viewId -
Returns:
String

getParent

public java.lang.String getParent(java.lang.String viewId)
Returns the ID of the parent view associated with the viewId.

Specified by:
getParent in interface NavigationController
Parameters:
viewId -
Returns:
String - the current value of parent

getPeers

public java.util.Vector getPeers(java.lang.String viewId)
Returns the peers associated with the viewId.

Specified by:
getPeers in interface NavigationController
Parameters:
viewId -
Returns:
Vector

getPreviousView

public java.lang.String getPreviousView(java.lang.String viewId)
Returns the viewId of the previous view associated with the viewId.

Specified by:
getPreviousView in interface NavigationController
Parameters:
viewId -
Returns:
String

getProcess

public Processor getProcess()
Returns the process associated with this NavigationController.

Returns:
process com.ibm.dse.automaton.DSEProcessor

getScrollPane

public javax.swing.JScrollPane getScrollPane()
Returns the scrollpane associated with the navigationArea.


getViewInstance

public CoordinatedPanel getViewInstance(java.lang.String viewId)
Returns the instance of the view passed as a parameter.

Specified by:
getViewInstance in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
Returns:
com.ibm.dse.gui.CoordinatedPanel

handleDSECoordinationEvent

public void handleDSECoordinationEvent(DSECoordinationEvent event)
Contains the appropriate actions to be executed when DSECoordinationEvent has been triggered.

Specified by:
handleDSECoordinationEvent in interface CoordinatedEventListener
Parameters:
event - DSECoordinationEvent

isChildren

public boolean isChildren(java.lang.String viewId)
Returns whether the view with the passed ID has children.

Specified by:
isChildren in interface NavigationController
Parameters:
viewId -
Returns:
boolean - True if the view has children

isPeer

public boolean isPeer(java.lang.String viewId)
Returns whether the view with the passed ID is a peer of another view.

Specified by:
isPeer in interface NavigationController
Parameters:
viewId -
Returns:
boolean - True if the view has peers

modifyNavigation

public void modifyNavigation(java.lang.String viewId,
                             boolean close,
                             boolean rollback,
                             DataMapperFormat mapper)
Closes, rolls back, and maps (depending on the parameters) the view.

Parameters:
viewId - String
close - boolean - True to close the view
rollback - boolean - True to roll back the view
mapper - DataMapperFormat

nextView

public void nextView(java.lang.String id,
                     ClientOperation operation,
                     int navigation,
                     java.lang.String linkContextTo,
                     java.lang.String inputPathFormat)
Shows the next view, activates it, and stores the IDs of the next and previous views.

Specified by:
nextView in interface NavigationController
Parameters:
id - java.lang.String - identifier of the view
operation - ClientOperation
navigation - int
linkContextTo - String
inputPathFormat - String

nextView

public void nextView(java.lang.String id,
                     java.lang.String source,
                     ClientOperation operation,
                     int navigation,
                     java.lang.String linkContextTo,
                     java.lang.String inputPathFormat)
Shows the next view, activates it, and stores the IDs of the next and previous views.

Specified by:
nextView in interface NavigationController
Parameters:
id - java.lang.String - identifier of the view
source - java.lang.String - full name of the view
operation - ClientOperation
navigation - int
linkContextTo - String

nextView

public void nextView(java.lang.String id,
                     java.lang.String source,
                     ClientOperation operation,
                     int navigation,
                     java.lang.String linkContextTo,
                     java.lang.String inputPathFormat,
                     java.util.Hashtable position)
Shows the next view, activates it, and stores the IDs of the next and previous views.

Specified by:
nextView in interface NavigationController
Parameters:
id - java.lang.String - identifier of the view
source - java.lang.String - full name of the view
operation - ClientOperation
navigation - int
linkContextTo - String
position - java.util.Hashtable - position and size of the view

openView

public void openView(java.lang.String viewId)
              throws java.lang.Exception
Opens a view, activates it, and stores all the information about the view.

Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
Throws:
java.lang.Exception

openView

public void openView(java.lang.String viewId,
                     ClientOperation op,
                     int navigation,
                     java.lang.String linkContextTo,
                     java.lang.String inputPathFormat)
Opens a view, activates it, and stores all the information related to this view.

Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
op - ClientOperation
navigation - int
linkContextTo - String
inputPathFormat - String

openView

public void openView(java.lang.String viewId,
                     ClientOperation op,
                     java.lang.Boolean execOp)
              throws java.lang.Exception
Opens a view, activates it, and stores all the information related to this view.

Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
op - ClientOperation
execOp - boolean
Throws:
java.lang.Exception

openView

public void openView(java.lang.String viewId,
                     java.lang.String viewSource,
                     ClientOperation op,
                     int navigation,
                     java.lang.String linkContextTo,
                     DataMapperFormat mapper)
Opens a view, activates it, and stores all the information related to this view.

Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
viewSource - java.lang.String - name of the package of the view
op - ClientOperation
navigation - int
linkContextTo - String
mapper - DataMapperFormat

openView

public void openView(java.lang.String viewId,
                     java.lang.String viewSource,
                     ClientOperation op,
                     int navigation,
                     java.lang.String linkContextTo,
                     DataMapperFormat mapper,
                     java.util.Hashtable position)
Opens a view, activates it, and stores all the information related to this view.

Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
viewSource - java.lang.String - name of the package of the view
op - ClientOperation
navigation - int
linkContextTo - String
mapper - DataMapperFormat
position - java.util.Hashtable - position and size of the view

openView

public void openView(java.lang.String viewId,
                     java.lang.String viewSource,
                     ClientOperation op,
                     int navigation,
                     java.lang.String linkContextTo,
                     java.lang.String inputFormat)
Opens a view, activates it, and stores all the information related to this view.

Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
viewSource - java.lang.String - name of the package of the view
op - ClientOperation
navigation - int
linkContextTo - String
inputFormat - String

openView

public void openView(java.lang.String viewId,
                     java.lang.String viewSource,
                     ClientOperation op,
                     int navigation,
                     java.lang.String linkContextTo,
                     java.lang.String inputFormat,
                     java.util.Hashtable position)
Opens a view, activates it, and stores all the information related to this view.

Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view
viewSource - java.lang.String - name of the package of the view
op - ClientOperation
navigation - int
linkContextTo - String
position - java.util.Hashtable - position and size of the view
inputFormat - boolean

previousView

public void previousView()
Deactivates the active view and shows the previous view.

Specified by:
previousView in interface NavigationController

reactivateSubView

public void reactivateSubView(java.lang.String viewId)
Reactivates the view passed as a parameter.

Specified by:
reactivateSubView in interface NavigationController
Parameters:
viewId - java.lang.String - identifier of the view

refreshActiveView

public void refreshActiveView()
Refreshes the active view of the Task.

Specified by:
refreshActiveView in interface NavigationController

removeCoordinatedEventListener

public void removeCoordinatedEventListener(CoordinatedEventListener newListener)
Removes the CoordinatedEventListener.

Specified by:
removeCoordinatedEventListener in interface CoordinatedEventSource
Parameters:
newListener - DataChangedListener

reorder

public java.util.Vector reorder(java.util.Vector v)
Returns the order in which the views were created.

Parameters:
v - java.util.Vector
Returns:
Vector

resizeActiveView

public void resizeActiveView(int height,
                             int width)
Resizes the active view.

Specified by:
resizeActiveView in interface NavigationController
Parameters:
height - int
width - int

resizeActiveView

public void resizeActiveView(int height,
                             int width,
                             int xpos,
                             int ypos)
Resizes and relocates the active view.

Specified by:
resizeActiveView in interface NavigationController
Parameters:
height - int
width - int
xpos - int
ypos - int

setActiveView

public void setActiveView(java.lang.String viewId)
Sets the value of the activeView property.

Specified by:
setActiveView in interface NavigationController
Parameters:
viewId - String - the new value of the property

setLevel

public void setLevel(int i)
Returns the level of the navigationArea with respect to the WorkingArea.

Specified by:
setLevel in interface NavigationController

setNavigationArea

public void setNavigationArea(SpInternalFrame na)
Sets the value of the navigationArea property.

Specified by:
setNavigationArea in interface NavigationController
Parameters:
na - Container - the new value of the property

setProcess

public void setProcess(Processor proc)
Sets the value of the process property.

Specified by:
setProcess in interface NavigationController
Parameters:
proc - com.ibm.dse.automaton.DSEProcessor - the new value of the property

undo

public void undo(java.lang.String viewId)
Rolls back all the operations of the navigation.

Specified by:
undo in interface NavigationController
Parameters:
viewId - String

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005