Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.ui.figures.impl
Class SystemConnectionFigure

java.lang.Object
  extended by PolylineConnectionEx
      extended by com.ibm.etools.systems.application.visual.editor.ui.figures.impl.SystemConnectionFigure
All Implemented Interfaces:
IFeedbackFigure

public class SystemConnectionFigure
extends PolylineConnectionEx
implements IFeedbackFigure

Base connection figure for relationship lines on Application Diagram.


Field Summary
static String copyright
           
protected  FeedbackStateManager feedbackManager
           
 
Fields inherited from interface com.ibm.etools.systems.application.visual.editor.ui.figures.IFeedbackFigure
STATE_ASSOCIATED_CLEAR, STATE_ASSOCIATED_SOURCE, STATE_ASSOCIATED_TARGET, STATE_HOVER, STATE_NONE, STATE_SELECTED, STATE_TARGET, STATE_TARGET_HOVER
 
Constructor Summary
SystemConnectionFigure(IMapMode mapMode, IGraphicalEditPart editPart)
          Constructor.
 
Method Summary
protected  Color getAssociatedSourceColor()
          Get associated source color.
protected  Color getAssociatedTargetColor()
          Get associated target color.
 IGraphicalEditPart getEditPart()
          Get editpart.
 Rectangle getFeedbackFigureBounds()
          Return feedback figure bound.
 String getFeedbackState()
          Return feedback state.
 Color getLineColor()
          Get line color.
 int getLineStyle()
          Get line style.
 void init()
          Initialize the figure.
protected  void outlineShape(Graphics g)
          Override the figure method "outlineShape" to draw the actual polyline connection shape.
protected  void setChildrenFeedbackStates(String state, EditPart requester)
          Set children's states.
 void setFeedbackState(String state, EditPart requester)
          Set feedback state which is requested by the requester.
 void setForegroundColor(Color color)
          Set ForegroundColor.
 void setLineColor(Color lineColor)
          Set line color.
 void setLineStyle(int lineStyle)
          Set line style.
protected  void setupGraphics(Graphics g, String feedbackState)
          Setup the properties of graphics for drawing the line.
 
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

feedbackManager

protected FeedbackStateManager feedbackManager
Constructor Detail

SystemConnectionFigure

public SystemConnectionFigure(IMapMode mapMode,
                              IGraphicalEditPart editPart)
Constructor.

Method Detail

init

public void init()
Initialize the figure.


setForegroundColor

public void setForegroundColor(Color color)
Set ForegroundColor.


setLineColor

public void setLineColor(Color lineColor)
Set line color.


getLineColor

public Color getLineColor()
Get line color.


getEditPart

public IGraphicalEditPart getEditPart()
Get editpart.


outlineShape

protected void outlineShape(Graphics g)
Override the figure method "outlineShape" to draw the actual polyline connection shape.


setupGraphics

protected void setupGraphics(Graphics g,
                             String feedbackState)
Setup the properties of graphics for drawing the line. Also draw two extra lines as the feedbacks. This method handles these extra lines drawing. It delegates back to parent for drawing the original line.

Parameters:
g -
feedbackState -

getFeedbackFigureBounds

public Rectangle getFeedbackFigureBounds()
Description copied from interface: IFeedbackFigure
Return feedback figure bound.

Specified by:
getFeedbackFigureBounds in interface IFeedbackFigure

getFeedbackState

public String getFeedbackState()
Description copied from interface: IFeedbackFigure
Return feedback state.

Specified by:
getFeedbackState in interface IFeedbackFigure

setFeedbackState

public void setFeedbackState(String state,
                             EditPart requester)
Description copied from interface: IFeedbackFigure
Set feedback state which is requested by the requester.

Specified by:
setFeedbackState in interface IFeedbackFigure

setChildrenFeedbackStates

protected void setChildrenFeedbackStates(String state,
                                         EditPart requester)
Set children's states.


getAssociatedSourceColor

protected Color getAssociatedSourceColor()
Get associated source color.


getAssociatedTargetColor

protected Color getAssociatedTargetColor()
Get associated target color.


setLineStyle

public void setLineStyle(int lineStyle)
Set line style. Valid value must be one of SWT pre-defined line styles.


getLineStyle

public int getLineStyle()
Get line style.


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.