Rational Developer for Power Systems Software
V7.6

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

java.lang.Object
  extended by NodeFigure
      extended by com.ibm.etools.systems.application.visual.editor.ui.figures.impl.AbstractFeedbackNodeFigure
          extended by com.ibm.etools.systems.application.visual.editor.ui.figures.impl.DefaultArtifactNodeFigure
All Implemented Interfaces:
IFeedbackFigure, INamedFigure

public class DefaultArtifactNodeFigure
extends AbstractFeedbackNodeFigure
implements INamedFigure

Default figure for Artifact. The figure has: 1. an icon to represent Artifact's type 2. a name label


Field Summary
 int arcHeight_outer
           
 int arcWidth_outer
           
 Color background_gradient
           
static String copyright
           
 RGB defaultInnerStroke
           
 RGB defaultOuterStroke
           
 Color foreground_gradient
           
 int Label_margin_bottom
           
 int Label_margin_left
           
 int Label_margin_right
           
 int Label_margin_top
           
 int max_outer_borderline_width
           
 int outerRectangle_shiftX
           
 int outerRectangle_shiftY
           
 int shapeImage_height
           
 int shapeImage_width
           
 
Fields inherited from class com.ibm.etools.systems.application.visual.editor.ui.figures.impl.AbstractFeedbackNodeFigure
editPart, feedbackStateManager, mapMode
 
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
DefaultArtifactNodeFigure(Image shapeImage, String shapeTitle, IMapMode mapMode, IGraphicalEditPart editPart)
          Creat an OPM program figure.
 
Method Summary
protected  void drawBorder(Graphics graphics, Rectangle outRect, String feedbackState)
          Draw border according to the state.
 Rectangle getFeedbackFigureBounds()
          Return feedback figure bound.
 String getName()
          Return name displayed in figure.
 WrappingLabel getNameLabel()
          Get name label.
protected  void init()
          Initialize the figure.
 void paintFigure(Graphics graphics)
           
 void setFillColor(RGB shapeFillRGB)
          Set fill color
 void setFont(Font newFont)
          Set the font.
 void setFontColor(Color color)
          Set Font color.
 void setForegroundColor(Color color)
          Set ForegroundColor.
 void setGradientBackgroundColor(Color backgroundColor)
          Set background color for gradient
 void setGradientForegroundColor(Color foregroundColor)
          Set foreground color for gradient
 void setOutLineColor(RGB outerLineRGB)
          Set line color that is used in round rectangle border.
protected  void setupDefaultColors()
          Setup default colors
protected  void setupLayout()
          Setup layuout.
 
Methods inherited from class com.ibm.etools.systems.application.visual.editor.ui.figures.impl.AbstractFeedbackNodeFigure
blendColor, getAssociatedSourceColor, getAssociatedTargetColor, getFeedbackState, setFeedbackState, setFeedbackStateManager
 
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

defaultOuterStroke

public RGB defaultOuterStroke

defaultInnerStroke

public RGB defaultInnerStroke

foreground_gradient

public Color foreground_gradient

background_gradient

public Color background_gradient

arcWidth_outer

public int arcWidth_outer

arcHeight_outer

public int arcHeight_outer

outerRectangle_shiftX

public int outerRectangle_shiftX

outerRectangle_shiftY

public int outerRectangle_shiftY

max_outer_borderline_width

public int max_outer_borderline_width

shapeImage_width

public int shapeImage_width

shapeImage_height

public int shapeImage_height

Label_margin_left

public int Label_margin_left

Label_margin_right

public int Label_margin_right

Label_margin_top

public int Label_margin_top

Label_margin_bottom

public int Label_margin_bottom
Constructor Detail

DefaultArtifactNodeFigure

public DefaultArtifactNodeFigure(Image shapeImage,
                                 String shapeTitle,
                                 IMapMode mapMode,
                                 IGraphicalEditPart editPart)
Creat an OPM program figure.

Parameters:
shapeImage: - the icon displays in shape top-left corner.
shapeTitle: - the text displays in figure.
mapMode: - the map mode is used by the diagram.
Method Detail

init

protected void init()
Initialize the figure.


setupLayout

protected void setupLayout()
Setup layuout.


setupDefaultColors

protected void setupDefaultColors()
Setup default colors


getName

public String getName()
Return name displayed in figure.


paintFigure

public void paintFigure(Graphics graphics)
See Also:
org.eclipse.draw2d.Figure#paintFigure(org.eclipse.draw2d.Graphics)

drawBorder

protected void drawBorder(Graphics graphics,
                          Rectangle outRect,
                          String feedbackState)
Draw border according to the state.

Parameters:
graphics -
outRect -
feedbackState -

setOutLineColor

public void setOutLineColor(RGB outerLineRGB)
Set line color that is used in round rectangle border.

Parameters:
outerLineRGB: - given color of outer line.

setFillColor

public void setFillColor(RGB shapeFillRGB)
Set fill color

Parameters:
shapeFillRGB -

setGradientForegroundColor

public void setGradientForegroundColor(Color foregroundColor)
Set foreground color for gradient


setGradientBackgroundColor

public void setGradientBackgroundColor(Color backgroundColor)
Set background color for gradient


getFeedbackFigureBounds

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

Specified by:
getFeedbackFigureBounds in interface IFeedbackFigure
Specified by:
getFeedbackFigureBounds in class AbstractFeedbackNodeFigure

setForegroundColor

public void setForegroundColor(Color color)
Set ForegroundColor.


setFontColor

public void setFontColor(Color color)
Set Font color.


getNameLabel

public WrappingLabel getNameLabel()
Description copied from interface: INamedFigure
Get name label.

Specified by:
getNameLabel in interface INamedFigure

setFont

public void setFont(Font newFont)
Set the font.


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.