Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.srcinfo.ui.figures
Class CallableBlockFigure

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.srcinfo.ui.figures.CallableBlockFigure
All Implemented Interfaces:
IFeedbackFigure, INamedFigure

public class CallableBlockFigure
extends AbstractFeedbackNodeFigure
implements INamedFigure

The figure that represents a callable block of source model. The figure includes an icon to represent different types of callable blocks. It also displays the name of callable block. The positions of each child figures follow the media design blueprints.


Field Summary
 Color background_gradient
           
static String copyright
           
 int cornerChopHeight
           
 int cornerChopWidth
           
 RGB defaultInsideStroke
           
 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
CallableBlockFigure(Image shapeImage, String shapeTitle, IMapMode mapMode, IGraphicalEditPart editPart)
          Creat a callable block figure.
 
Method Summary
protected  void drawBorder(Graphics graphics, Rectangle outRect, Color outerStrokeColor, Color insideStrokeColor)
          Draw border with specified colors.
protected  void drawBorder(Graphics graphics, Rectangle outRect, String feedbackState)
          Draw border according to the state.
 Rectangle getFeedbackFigureBounds()
          Return feedback figure bound.
 Rectangle getHandleBounds()
          Returns the Rectangle around which handles are to be placed.
 String getName()
          Return name displayed in figure.
 WrappingLabel getNameLabel()
          Get name label.
protected  void init()
          Initialize the figure.
 void paintFigure(Graphics graphics)
           
 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

defaultInsideStroke

public RGB defaultInsideStroke

foreground_gradient

public Color foreground_gradient

background_gradient

public Color background_gradient

cornerChopHeight

public int cornerChopHeight

cornerChopWidth

public int cornerChopWidth

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

CallableBlockFigure

public CallableBlockFigure(Image shapeImage,
                           String shapeTitle,
                           IMapMode mapMode,
                           IGraphicalEditPart editPart)
Creat a callable block 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. The border has customized border shape like this: --------------- | | --- --- | | | | | | | | --- --- | | ---------------

Parameters:
graphics -
outRect -
feedbackState -

drawBorder

protected void drawBorder(Graphics graphics,
                          Rectangle outRect,
                          Color outerStrokeColor,
                          Color insideStrokeColor)
Draw border with specified colors.


setOutLineColor

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

Parameters:
outerLineRGB: - given color of outer line.

setGradientForegroundColor

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


setGradientBackgroundColor

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


getHandleBounds

public Rectangle getHandleBounds()
Returns the Rectangle around which handles are to be placed. The Rectangle should be in the same coordinate system as the figure itself.

Returns:
The rectangle used for handles
See Also:
org.eclipse.gef.handles.HandleBounds

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.