Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.srcinfo.editparts
Class SourceContainerEditPart

java.lang.Object
  extended by ShapeNodeEditPart
      extended by com.ibm.etools.systems.application.visual.editor.editparts.impl.SystemNodeEditPart
          extended by com.ibm.etools.systems.application.visual.editor.srcinfo.editparts.SourceContainerEditPart
All Implemented Interfaces:
ICollapsableEditPart, INamedEditPart

public class SourceContainerEditPart
extends SystemNodeEditPart
implements ICollapsableEditPart

EditPart for SourceContainer.


Field Summary
 Color background_gradient
           
static String copyright
           
protected  ArtifactCollapseEditPartTracker dragTracker
           
 Color foreground_gradient
           
 
Constructor Summary
SourceContainerEditPart(View view)
          Constructor
 
Method Summary
protected  void createDefaultEditPolicies()
          Create default editpolicies.
protected  NodeFigure createNodeFigure()
          Create figure for this edit part.
 String createTooltipText()
          Create tooltip text.
 void deactivate()
          Deactivate.
 IFigure getContentPane()
          Get content pane.
 DragTracker getDragTracker(Request request)
          Returns a DragTracker for dragging this EditPart.
 EditPolicy getPrimaryDragEditPolicy()
          Return customized drag edit policy.
 int getSemanticChildrenNumber()
          Return semantic children number.
 SourceContainerFigure getSourceContainerFigure()
          Return the figure.
 boolean ignoreCollapseRequest()
          Check if collapse / expand request should be ignored.
 boolean isCollapsed()
          Return true if collapsed, false otherwise.
protected  boolean isFirstTimeExpand()
          Check if this is the first time to expand the container.
 void performRequest(Request request)
          Perform request.
 void setCollapsed(boolean collapsed)
          Set collapse state.
protected  boolean shouldAutoLayout()
          Check if auto layout should be done.
 void updateTooltip()
          Update tooltip text according to expand/collapse state.
 
Methods inherited from class com.ibm.etools.systems.application.visual.editor.editparts.impl.SystemNodeEditPart
getAccessibleEditPart, getArtifact, getCommand, getDelegatedPrimaryView, getDisplayName, getFigureNamedLabel, getIconRetriever, handleNotificationEvent, refreshFont, refreshFontColor, refreshStrikeThrough, refreshUnderline, refreshVisuals, retrieveIcon, setFontColor, setVisibility
 
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

foreground_gradient

public Color foreground_gradient

background_gradient

public Color background_gradient

dragTracker

protected ArtifactCollapseEditPartTracker dragTracker
Constructor Detail

SourceContainerEditPart

public SourceContainerEditPart(View view)
Constructor

Parameters:
view -
Method Detail

createDefaultEditPolicies

protected void createDefaultEditPolicies()
Create default editpolicies.

Overrides:
createDefaultEditPolicies in class SystemNodeEditPart

createNodeFigure

protected NodeFigure createNodeFigure()
Create figure for this edit part.

Overrides:
createNodeFigure in class SystemNodeEditPart

getSourceContainerFigure

public SourceContainerFigure getSourceContainerFigure()
Return the figure.


deactivate

public void deactivate()
Deactivate.


createTooltipText

public String createTooltipText()
Create tooltip text. Use full qualified name for program.

Overrides:
createTooltipText in class SystemNodeEditPart

getContentPane

public IFigure getContentPane()
Get content pane. ContenPane will be used to add children's figures.


getDragTracker

public DragTracker getDragTracker(Request request)
Returns a DragTracker for dragging this EditPart. The SelectionTool is the only Tool by default that calls this method. The SelectionTool will use a org.eclipse.gef.requests.SelectionRequest to provide information such as which mouse button is down, and what modifier keys are pressed.

Parameters:
request - a Request indicating the context of the drag
Returns:
null or a DragTracker

performRequest

public void performRequest(Request request)
Perform request. Override to handle SystemRequestContstants.REQ_COLLAPSE_TOGGLE.


shouldAutoLayout

protected boolean shouldAutoLayout()
Check if auto layout should be done.

Returns:
true if should do auto layout, false otherwise.

isFirstTimeExpand

protected boolean isFirstTimeExpand()
Check if this is the first time to expand the container.

Returns:
true if it is the first time to expand, false otherwise.

ignoreCollapseRequest

public boolean ignoreCollapseRequest()
Check if collapse / expand request should be ignored. If it has only single child, ignore the request.


updateTooltip

public void updateTooltip()
Update tooltip text according to expand/collapse state.


getSemanticChildrenNumber

public int getSemanticChildrenNumber()
Description copied from interface: ICollapsableEditPart
Return semantic children number. Used for determinating if a corresponding collapsable figure of editpart requries a twistie icon or not.

Specified by:
getSemanticChildrenNumber in interface ICollapsableEditPart

isCollapsed

public boolean isCollapsed()
Return true if collapsed, false otherwise.

Specified by:
isCollapsed in interface ICollapsableEditPart

setCollapsed

public void setCollapsed(boolean collapsed)
Set collapse state.

Specified by:
setCollapsed in interface ICollapsableEditPart
See Also:
ICollapsableEditPart.setCollapsed(boolean)

getPrimaryDragEditPolicy

public EditPolicy getPrimaryDragEditPolicy()
Return customized drag edit policy.

Overrides:
getPrimaryDragEditPolicy in class SystemNodeEditPart

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.