Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor
Class SystemGraphicalEditorSessionManager

java.lang.Object
  extended by com.ibm.etools.systems.application.visual.editor.SystemGraphicalEditorSessionManager

public class SystemGraphicalEditorSessionManager
extends Object

SystemGraphicalEditorSessionManager manages the session states of a SystemGraphicalEditor instance. A session is started from the opening of editor and ended when the editor instance is closed. During one session, the input of editor may change. For example, user saves the diagram and continues to work on open editor.


Field Summary
static String copyright
           
 
Constructor Summary
SystemGraphicalEditorSessionManager(SystemGraphicalEditor editor)
          Constructor.
 
Method Summary
 void cleanSemanticElementToViewRegistry()
           
 void dispose()
          Dispose the session manager.
protected  CommandResult executeAsCompositeCommand(String actionName, List commands)
          A utility method allows execute a list of commands by wrapping them in a composite command.
 void fireApplicationModelFilterChangeEvent(ApplicationModelFilterChangeEvent event)
          Fire filter change event.
 ArrayList getApplicationModelFilterChangeListeners()
          Get all registered ApplicationModelFilterChangeListener
 boolean getAutoLayoutOption()
          Getter of autolayout.
 Font getCurrentFont()
          Getter of current Font.
 String getCurrentLineStyle()
          Getter of current line style.
 String getCurrentModelFilterID()
          Return current view filter ID.
 String getCurrentOrientation()
          Getter of current orientation.
 Font getDefaultFont()
          Getter of default font.
 String getDefaultLineStyle()
          Getter of default line style.
 String getDefaultModelFilterID()
          Getter of default model filter ID.
 String getDefaultOrientation()
          Getter of default orientation.
protected  Iterator getInputIterator()
           
 ISemanticElementToViewRegistry getSemanticElementToViewRegistry()
          Get SemanticElementToViewRegistry.
protected  void handlePreferenceStorePropertyChanged(PropertyChangeEvent event)
          Handle property change event.
 void initialize()
          Initialize the session manager.
protected  boolean isStrikeout(FontData fontData)
          Return true if the font is strikeout.
protected  boolean isUnderline(FontData fontData)
          Return true if the font is underline.
 void propertyChange(PropertyChangeEvent event)
           
protected  void refreshDefaultFontEffect()
          Refresh the underline and strikeout effect of default font.
protected  void refreshFont(Object newFont)
          Refresh default font.
protected  void refreshIncomingLineColor(RGB newIncomingLineColor)
          Refresh default incoming line color.
protected  void refreshOutgoingLineColor(RGB newOutgoingLineColor)
          Refresh default outgoing line color.
 void registerApplicationModelFilterListener(IApplicationModelFilterChangeListener listener)
          Add semantic model filter change listener
protected  void registerPreferenceStoreListener()
          Register the preference store listener.
 void setAutoLayoutOption(boolean autoLayout)
          Setter of autolayout.
 void setCurrentFont(Font newFont)
          Setter of current Font.
 void setCurrentLineStyle(String lineStyle)
          Setter of line style
 void setCurrentModelFilterID(String filterID)
          Set current view filter ID.
 void setCurrentOrientation(String orientation)
          Setter of orientation.
 void setDefaultFont(Font newFont)
          Refresh default font.
 void setDefaultLineStyle(String lineStyle)
          Setter of default line style.
 void setDefaultModelFilterID(String filterID)
          Setter of default model filter ID.
 void setDefaultOrientation(String orientation)
          Setter of default orientation.
 void setSemanticElementToViewRegistry(ISemanticElementToViewRegistry semanticElementToViewRegistry)
          Set SemanticElementToViewRegistry.
 void unregisterApplicationModelFilterListener(IApplicationModelFilterChangeListener listener)
          Add semantic model filter change listener
protected  void unregisterPreferenceStoreListener()
          Unregister the preference store listener.
protected  void updateGMFLineStylePreference(IPreferenceStore preferenceStore)
          Update GMF line style preference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

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

SystemGraphicalEditorSessionManager

public SystemGraphicalEditorSessionManager(SystemGraphicalEditor editor)
Constructor.

Method Detail

setAutoLayoutOption

public void setAutoLayoutOption(boolean autoLayout)
Setter of autolayout.


getAutoLayoutOption

public boolean getAutoLayoutOption()
Getter of autolayout.


setCurrentLineStyle

public void setCurrentLineStyle(String lineStyle)
Setter of line style


getCurrentLineStyle

public String getCurrentLineStyle()
Getter of current line style.


setCurrentOrientation

public void setCurrentOrientation(String orientation)
Setter of orientation.


getCurrentOrientation

public String getCurrentOrientation()
Getter of current orientation.


setCurrentModelFilterID

public void setCurrentModelFilterID(String filterID)
Set current view filter ID. Fire filter change event.


getCurrentModelFilterID

public String getCurrentModelFilterID()
Return current view filter ID.

Returns:

setDefaultLineStyle

public void setDefaultLineStyle(String lineStyle)
Setter of default line style.


getDefaultLineStyle

public String getDefaultLineStyle()
Getter of default line style.


setDefaultOrientation

public void setDefaultOrientation(String orientation)
Setter of default orientation.


getDefaultOrientation

public String getDefaultOrientation()
Getter of default orientation.


setDefaultModelFilterID

public void setDefaultModelFilterID(String filterID)
Setter of default model filter ID.


getDefaultModelFilterID

public String getDefaultModelFilterID()
Getter of default model filter ID.


getDefaultFont

public Font getDefaultFont()
Getter of default font.


setDefaultFont

public void setDefaultFont(Font newFont)
Refresh default font. Appliable to new and open editor too.


getCurrentFont

public Font getCurrentFont()
Getter of current Font.


setCurrentFont

public void setCurrentFont(Font newFont)
Setter of current Font.


initialize

public void initialize()
Initialize the session manager.


updateGMFLineStylePreference

protected void updateGMFLineStylePreference(IPreferenceStore preferenceStore)
Update GMF line style preference.


dispose

public void dispose()
Dispose the session manager.


registerPreferenceStoreListener

protected void registerPreferenceStoreListener()
Register the preference store listener.


unregisterPreferenceStoreListener

protected void unregisterPreferenceStoreListener()
Unregister the preference store listener.


fireApplicationModelFilterChangeEvent

public void fireApplicationModelFilterChangeEvent(ApplicationModelFilterChangeEvent event)
Fire filter change event.


registerApplicationModelFilterListener

public void registerApplicationModelFilterListener(IApplicationModelFilterChangeListener listener)
Add semantic model filter change listener


unregisterApplicationModelFilterListener

public void unregisterApplicationModelFilterListener(IApplicationModelFilterChangeListener listener)
Add semantic model filter change listener


getApplicationModelFilterChangeListeners

public ArrayList getApplicationModelFilterChangeListeners()
Get all registered ApplicationModelFilterChangeListener


propertyChange

public void propertyChange(PropertyChangeEvent event)

handlePreferenceStorePropertyChanged

protected void handlePreferenceStorePropertyChanged(PropertyChangeEvent event)
Handle property change event.


refreshDefaultFontEffect

protected void refreshDefaultFontEffect()
Refresh the underline and strikeout effect of default font. Should be called only once when the editor is opened.


refreshFont

protected void refreshFont(Object newFont)
Refresh default font. Appliable to new and open editor too.


isUnderline

protected boolean isUnderline(FontData fontData)
Return true if the font is underline.


isStrikeout

protected boolean isStrikeout(FontData fontData)
Return true if the font is strikeout.


getInputIterator

protected Iterator getInputIterator()
Returns:
- an itertor object to iterate over the selected/input edit parts

executeAsCompositeCommand

protected CommandResult executeAsCompositeCommand(String actionName,
                                                  List commands)
A utility method allows execute a list of commands by wrapping them in a composite command.

Parameters:
commands - - List of commands to execute

refreshIncomingLineColor

protected void refreshIncomingLineColor(RGB newIncomingLineColor)
Refresh default incoming line color. Appliable to new and open editor.


refreshOutgoingLineColor

protected void refreshOutgoingLineColor(RGB newOutgoingLineColor)
Refresh default outgoing line color. Appliable to new and open editors.


getSemanticElementToViewRegistry

public ISemanticElementToViewRegistry getSemanticElementToViewRegistry()
Get SemanticElementToViewRegistry.


setSemanticElementToViewRegistry

public void setSemanticElementToViewRegistry(ISemanticElementToViewRegistry semanticElementToViewRegistry)
Set SemanticElementToViewRegistry.


cleanSemanticElementToViewRegistry

public void cleanSemanticElementToViewRegistry()

Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.