Rational Developer for Power Systems Software
V7.6

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

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

public class ArrowDecoration
extends PolylineDecoration
implements IFeedbackFigure

Arrow decoration for connection lines.


Field Summary
static String copyright
           
 
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
ArrowDecoration(IMapMode mapMode)
          Constructor.
 
Method Summary
protected  Color getAssociatedSourceColor()
          Get associated source color.
protected  Color getAssociatedTargetColor()
          Get associated target color.
 Rectangle getFeedbackFigureBounds()
          Return feedback figure bound.
 String getFeedbackState()
          Return feedback state.
protected  void init()
          Initialize the figure.
protected  void outlineShape(Graphics g)
          Override the figure method "outlineShape" to draw the actual polyline connection shape.
 void setBaseColor(Color color)
          Set default color.
 void setFeedbackState(String state, EditPart requester)
          Set feedback state which is requested by the requester.
 void setForegroundColor(Color color)
          Set ForegroundColor.
protected  void setupGraphicsForDraw(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
Constructor Detail

ArrowDecoration

public ArrowDecoration(IMapMode mapMode)
Constructor.

Method Detail

init

protected void init()
Initialize the figure.


setBaseColor

public void setBaseColor(Color color)
Set default color. This methods will not cause repaint(). Caller need to call repaint()explicitly if it is necessary. explicitly


setForegroundColor

public void setForegroundColor(Color color)
Set ForegroundColor.


outlineShape

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


setupGraphicsForDraw

protected void setupGraphicsForDraw(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

getAssociatedSourceColor

protected Color getAssociatedSourceColor()
Get associated source color.


getAssociatedTargetColor

protected Color getAssociatedTargetColor()
Get associated target color.


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.