com.ibm.dse.desktop
Class DSENavigationController

java.lang.Object
  |
  +--com.ibm.dse.base.DSENotifier
        |
        +--com.ibm.dse.desktop.DSENavigationController

public class DSENavigationController
extends DSENotifier
implements NavigationController, CoordinatedEventSource, CoordinatedEventListener

This class takes charge of controlling all the navigations of a business function.A DSENavigationController is defined for each Task.This class keeps information of the views and navigates among them depending on the DSECoordinated events received.


Field Summary
static java.lang.String CTXUSED_ACTIVE
          identifier of the context of the active view
static java.lang.String CTXUSED_PARENT
          identifier of the context of the parent active view
static java.lang.String CTXUSED_PROCESS
          identifier of the context of the process
protected  int NAV_CHILDREN
          identifier of children navigation
protected  int NAV_NONE
          identifier of none navigation
protected  int NAV_PEER
          identifier of the peer navigation
 
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)
          Activate the view passed as parameter.This view will be the active view of the NavigationArea and will nave the focus.
 void addCoordinatedEventListener(CoordinatedEventListener newListener)
          Adds a CoordinatedEventListener.
 void cancel(java.lang.String viewId)
          This method cancels all the operations done until now of the navigation, closing the panels of the navigation until the parent view if exists.
 void close()
          This method close one to one all the views opened of this task
 void closeNavigation(java.lang.String viewId, DataMapperFormat mapper)
          This method close all the navigation of the panels and if an closeMapFormat is declared maps the value to the active view.
 void closeNavigation(java.lang.String viewId, java.lang.String closeMapFormat)
          This method close all the navigation of the panels and if an closeMapFormat is declared maps the value to the active view.
 void closeView(java.lang.String id)
          This method close the view passed as parameter.
 void deActivateView(java.lang.String viewId)
          this method deactivate the view passed as parameter.
 void deRegister(java.lang.String viewId)
          This method removes the entry of this view to the View registry.
 void fireCoordinationEvent()
          Fires a CoordinationEvent.
 void fireCoordinationEvent(DSECoordinationEvent event)
          Fires a CoordinationEvent.
 java.lang.String getActiveView()
          returns the viewId associated to the active view.
 java.util.Vector getChilds(java.lang.String viewId)
          returns a list of the chidren associated to 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()
          This method 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 to this id is.
 java.lang.String getParent(java.lang.String viewId)
          returns the id of the parent view associated to the vieId
 java.util.Vector getPeers(java.lang.String viewId)
          returns the peers associated to the viewId
 java.lang.String getPreviousView(java.lang.String viewId)
          returns the viewId of the previous view associated to this id.
 Processor getProcess()
          This method returns the process associated to this NavigationController.
 javax.swing.JScrollPane getScrollPane()
          This method returns the scrollpane associated to the navigationArea.
 CoordinatedPanel getViewInstance(java.lang.String viewId)
          This method return the instance of the view passed as parameter.
 void handleDSECoordinationEvent(DSECoordinationEvent event)
          Contains the appropriate actions to be executed when DSECoordinationEvent has been triggered.
 boolean isChildren(java.lang.String viewId)
          returns if the view associated to this id has children
 boolean isPeer(java.lang.String viewId)
          returns if the view associated to this id is a peer of another view.
 void modifyNavigation(java.lang.String viewId, boolean close, boolean rollback, DataMapperFormat mapper)
          This method, depending on the parameters, closes, rollbacks, or maps the diferent views of the navigation
 void nextView(java.lang.String id, ClientOperation operation, int navigation, java.lang.String linkContextTo, java.lang.String inputPathFormat)
          This method shows the next view and activates this,and stores the next and previous id of the views
 void nextView(java.lang.String id, java.lang.String source, ClientOperation operation, int navigation, java.lang.String linkContextTo, java.lang.String inputPathFormat)
          This method shows the next view and activates this,and stores the next and previous id of the views
 void openView(java.lang.String viewId)
          This method opens a view and activates this,and stores all the information about the views
 void openView(java.lang.String viewId, ClientOperation op, java.lang.Boolean execOp)
          This method open a view and activates this,and stores all information related to this view
 void openView(java.lang.String viewId, ClientOperation op, int navigation, java.lang.String linkContextTo, java.lang.String inputPathFormat)
          This method open a view and activates this,and stores all 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)
          This method open a view and activates this,and stores all 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)
          This method open a view and activates this,and stores all information related to this view
 void previousView()
          This method deactivates the active view and shows the previous view associated to this view.
 void refreshActiveView()
          This method refresh the active view of the Task
 void removeCoordinatedEventListener(CoordinatedEventListener newListener)
          Removes a CoordinatedEventListener.
 java.util.Vector reorder(java.util.Vector v)
          This method returns the creation order of the views.
 void resizeActiveView(int height, int width)
          This method resize the size of the active view.
 void resizeActiveView(int height, int width, int xpos, int ypos)
          This method resizes the size and location of the active view.
 void setActiveView(java.lang.String viewId)
          Sets the value of the activeView property.
 void setLevel(int i)
          return the level of the navigationArea respects 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)
          This method rollback 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

NAV_NONE

protected int NAV_NONE
identifier of none navigation

NAV_PEER

protected int NAV_PEER
identifier of the peer navigation

NAV_CHILDREN

protected int NAV_CHILDREN
identifier of children navigation

CTXUSED_PROCESS

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

CTXUSED_ACTIVE

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

CTXUSED_PARENT

public static final java.lang.String CTXUSED_PARENT
identifier of the context of the parent active view
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)
Activate the view passed as parameter.This view will be the active view of the NavigationArea and will nave the focus.
Specified by:
activateView in interface NavigationController
Parameters:
viewId - java.lang.String identifier 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)
This method cancels all the operations done until now of the navigation, closing the panels of the navigation until the parent view if exists.
Specified by:
cancel in interface NavigationController
Parameters:
viewId - String

close

public void close()
This method close one to one all the views opened of this task
Specified by:
close in interface NavigationController

closeNavigation

public void closeNavigation(java.lang.String viewId,
                            DataMapperFormat mapper)
This method close all the navigation of the panels and if an closeMapFormat is declared maps the value to the active view.
Specified by:
closeNavigation in interface NavigationController

closeNavigation

public void closeNavigation(java.lang.String viewId,
                            java.lang.String closeMapFormat)
This method close all the navigation of the panels and if an closeMapFormat is declared maps the value to the active view.
Specified by:
closeNavigation in interface NavigationController

closeView

public void closeView(java.lang.String id)
This method close the view passed as parameter.
Specified by:
closeView in interface NavigationController
Parameters:
id - java.lang.String identifier of the view.

deActivateView

public void deActivateView(java.lang.String viewId)
this method deactivate the view passed as parameter.
Specified by:
deActivateView in interface NavigationController
Parameters:
viewId - java.lang.String identifier of the view.

deRegister

public void deRegister(java.lang.String viewId)
This method removes the entry of this view to the View registry.
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
Parameters:
DSECoordinationEvent - event

getActiveView

public java.lang.String getActiveView()
returns the viewId associated to 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 chidren associated to 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()
This method returns the last element of the queue of views.

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 to this id is.
Specified by:
getNextView in interface NavigationController
Returns:
String

getParent

public java.lang.String getParent(java.lang.String viewId)
returns the id of the parent view associated to the vieId
Specified by:
getParent in interface NavigationController
Tags copied from interface: NavigationController
Returns:
String - The current value of parent.

getPeers

public java.util.Vector getPeers(java.lang.String viewId)
returns the peers associated to the viewId
Specified by:
getPeers in interface NavigationController
Returns:
Vector

getPreviousView

public java.lang.String getPreviousView(java.lang.String viewId)
returns the viewId of the previous view associated to this id.
Specified by:
getPreviousView in interface NavigationController
Returns:
String

getProcess

public Processor getProcess()
This method returns the process associated to this NavigationController.
Returns:
process com.ibm.dse.automaton.DSEProcessor

getScrollPane

public javax.swing.JScrollPane getScrollPane()
This method returns the scrollpane associated to the navigationArea.

getViewInstance

public CoordinatedPanel getViewInstance(java.lang.String viewId)
This method return the instance of the view passed as 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 if the view associated to this id has children
Specified by:
isChildren in interface NavigationController
Returns:
boolean

isPeer

public boolean isPeer(java.lang.String viewId)
returns if the view associated to this id is a peer of another view.
Specified by:
isPeer in interface NavigationController
Returns:
boolean

modifyNavigation

public void modifyNavigation(java.lang.String viewId,
                             boolean close,
                             boolean rollback,
                             DataMapperFormat mapper)
This method, depending on the parameters, closes, rollbacks, or maps the diferent views of the navigation
Parameters:
close - boolean
rollback - boolean
CloseMapFormat - DataMapperFormat

nextView

public void nextView(java.lang.String id,
                     ClientOperation operation,
                     int navigation,
                     java.lang.String linkContextTo,
                     java.lang.String inputPathFormat)
This method shows the next view and activates this,and stores the next and previous id of the views
Specified by:
nextView in interface NavigationController
Parameters:
id - java.lang.String identifier 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)
This method shows the next view and activates this,and stores the next and previous id of the views
Specified by:
nextView in interface NavigationController
Parameters:
id - java.lang.String identifier of the view
java.lang.String - full name of the view
operation - ClientOperation
navigation - int
linkContextTo - String

openView

public void openView(java.lang.String viewId)
              throws java.lang.Exception
This method opens a view and activates this,and stores all the information about the views
Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String identifier of the view

openView

public void openView(java.lang.String viewId,
                     ClientOperation op,
                     int navigation,
                     java.lang.String linkContextTo,
                     java.lang.String inputPathFormat)
This method open a view and activates this,and stores all information related to this view
Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String identifier of the view
operation - ClientOperation
navigation - int
linkContextTo - String

openView

public void openView(java.lang.String viewId,
                     ClientOperation op,
                     java.lang.Boolean execOp)
              throws java.lang.Exception
This method open a view and activates this,and stores all information related to this view
Specified by:
openView in interface NavigationController
Parameters:
viewId - java.lang.String identifier of the view
operation - ClientOperation
execOp - boolean

openView

public void openView(java.lang.String viewId,
                     java.lang.String viewSource,
                     ClientOperation op,
                     int navigation,
                     java.lang.String linkContextTo,
                     DataMapperFormat mapper)
This method open a view and activates this,and stores all 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
operation - 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,
                     java.lang.String inputFormat)
This method open a view and activates this,and stores all 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
operation - ClientOperation
navigation - int
linkContextTo - String

previousView

public void previousView()
This method deactivates the active view and shows the previous view associated to this view.
Specified by:
previousView in interface NavigationController

refreshActiveView

public void refreshActiveView()
This method refresh the active view of the Task
Specified by:
refreshActiveView in interface NavigationController

removeCoordinatedEventListener

public void removeCoordinatedEventListener(CoordinatedEventListener newListener)
Removes a CoordinatedEventListener.
Specified by:
removeCoordinatedEventListener in interface CoordinatedEventSource
Parameters:
newListener - DataChangedListener

reorder

public java.util.Vector reorder(java.util.Vector v)
This method returns the creation order of the views.
Parameters:
v - java.util.Vector
Returns:
Vector

resizeActiveView

public void resizeActiveView(int height,
                             int width)
This method resize the size of 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)
This method resizes the size and location of the active view.
Specified by:
resizeActiveView in interface NavigationController
Parameters:
height - 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)
return the level of the navigationArea respects 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)
This method rollback all the operations of the navigation.
Specified by:
undo in interface NavigationController
Parameters:
viewId - String