Rational Developer for Power Systems Software
V7.6

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

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.AbstractCollapsableFigure
All Implemented Interfaces:
ICollapsableArtifactFigure, IFeedbackFigure
Direct Known Subclasses:
BinaryContainerFigure, SourceContainerFigure

public abstract class AbstractCollapsableFigure
extends AbstractFeedbackNodeFigure
implements ICollapsableArtifactFigure

Abstract class for collapsable figure. Collapsable figure can optionally have icon or child figure on the figure to toggle the collapse / expand state. Otherwise,


Field Summary
protected  boolean collapsed
           
static String copyright
           
protected  boolean hasCollapsedFigure
           
 
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
AbstractCollapsableFigure(IMapMode mapMode, IGraphicalEditPart editPart)
          Construct.
 
Method Summary
protected abstract  Rectangle getCollapseIconArea()
          Return the rectangle where collapsable toggler icon is.
protected  Boolean getInitialCollapseState()
          Get collapsed state from drawerStyle.
protected  void initCollapseState()
          Initialize the collapsable state.
 boolean isCollapsed()
          True if the figure is collapsed, false otherwise.
 boolean isCollapseIconArea(Point mouseLocation)
          Return true if the mouse is in the collapse icon area, false otherwise.
 void setCollapsed(boolean collapseState)
          Set collapse state for the figure.
 
Methods inherited from class com.ibm.etools.systems.application.visual.editor.ui.figures.impl.AbstractFeedbackNodeFigure
blendColor, getAssociatedSourceColor, getAssociatedTargetColor, getFeedbackFigureBounds, 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 String copyright

collapsed

protected boolean collapsed

hasCollapsedFigure

protected boolean hasCollapsedFigure
Constructor Detail

AbstractCollapsableFigure

public AbstractCollapsableFigure(IMapMode mapMode,
                                 IGraphicalEditPart editPart)
Construct.

Method Detail

isCollapseIconArea

public boolean isCollapseIconArea(Point mouseLocation)
Description copied from interface: ICollapsableArtifactFigure
Return true if the mouse is in the collapse icon area, false otherwise. For collapsable figure without collapse/expand twisties, the implementation should always return false. In this case, the implementation should use handler for collapse/expand indicator.

Specified by:
isCollapseIconArea in interface ICollapsableArtifactFigure
Returns:

isCollapsed

public boolean isCollapsed()
True if the figure is collapsed, false otherwise.

Specified by:
isCollapsed in interface ICollapsableArtifactFigure
Returns:

setCollapsed

public void setCollapsed(boolean collapseState)
Set collapse state for the figure.

Specified by:
setCollapsed in interface ICollapsableArtifactFigure
Parameters:
collapseState - true to collapse, false to expand.

getInitialCollapseState

protected Boolean getInitialCollapseState()
Get collapsed state from drawerStyle.

Returns:
Boolean object which wraps the collapsed state. null if there is no drawer style installed.

initCollapseState

protected void initCollapseState()
Initialize the collapsable state.


getCollapseIconArea

protected abstract Rectangle getCollapseIconArea()
Return the rectangle where collapsable toggler icon is.


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.