Rational Developer for Power Systems Software
V7.6

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

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

public class DefaultSingleEntryFigure
extends NodeFigure
implements IFeedbackFigure, INamedFigure

Single entry child figure in a container figure. It has 1. An image 2. A WrappingLabel to display the text.


Field Summary
 int arcHeight
           
 int arcWidth
           
static String copyright
           
 RGB defaultOuterLineColor
           
 int imageHeight
           
 int imageWidth
           
 int Label_margin_bottom
           
 int Label_margin_left
           
 int Label_margin_right
           
 int Label_margin_top
           
 
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
DefaultSingleEntryFigure(String name, Image image, IMapMode mapMode, IGraphicalEditPart editPart)
          Constructor.
 
Method Summary
protected  void drawBorder(Graphics graphics, Rectangle outRect, String feedbackState)
          Draw border according to the state.
 IGraphicalEditPart getEditPart()
          Return editpart for this figure.
 Rectangle getFeedbackFigureBounds()
          Return feedback figure bound.
 String getFeedbackState()
          Return feedback state.
 String getName()
          Return name displayed in figure.
 WrappingLabel getNameLabel()
          Get name label.
protected  void init()
          Initialize the figure.
 void paintFigure(Graphics graphics)
           
 void restoreFromIndicator()
          Restore to normal state.
 void setAsIndicator()
          Set as indicator state.
 void setFeedbackState(String state, EditPart requester)
          Set feedback state which is requested by the requester.
 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 setName(String newName)
          Set name displayed in figure.
 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 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

defaultOuterLineColor

public RGB defaultOuterLineColor

arcWidth

public int arcWidth

arcHeight

public int arcHeight

imageHeight

public int imageHeight

imageWidth

public int imageWidth

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

DefaultSingleEntryFigure

public DefaultSingleEntryFigure(String name,
                                Image image,
                                IMapMode mapMode,
                                IGraphicalEditPart editPart)
Constructor.

Parameters:
name: - name
img: - icon image
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.


setName

public void setName(String newName)
Set name displayed in figure.


getEditPart

public IGraphicalEditPart getEditPart()
Return editpart for this figure.


restoreFromIndicator

public void restoreFromIndicator()
Restore to normal state.


setAsIndicator

public void setAsIndicator()
Set as indicator state. The figure in indicator state has special name and tooltip.


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:
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 -

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

setFontColor

public void setFontColor(Color color)
Set font color.


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

setForegroundColor

public void setForegroundColor(Color color)
Set ForegroundColor.


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.