Class CaseFigure
- java.lang.Object
-
- org.eclipse.draw2d.Figure
-
- org.eclipse.draw2d.Shape
-
- org.eclipse.draw2d.RectangleFigure
-
- com._1c.g5.v8.dt.bp.scheme.ui.model.draw2d.CaseFigure
-
- All Implemented Interfaces:
IAnchorable
,IDisposable
,IRefreshable
,com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable
,org.eclipse.draw2d.IFigure
public class CaseFigure extends org.eclipse.draw2d.RectangleFigure implements IDisposable, IAnchorable, com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable, IRefreshable
Instance of this class represents "Case" figure.
-
-
Field Summary
Fields Modifier and Type Field Description static int
FIGURE_HEIGHT
-
Constructor Summary
Constructors Constructor Description CaseFigure(SwitchCase associatedCase)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Removes unneed figures associated with this from figure canvas.Collection<AnchorFigure>
getAnchors()
Return figure anchors.SwitchCase
getAssociatedCase()
Returns associated case.com._1c.g5.v8.dt.diagram.framework.IEntity
getCaseEntity()
Returns entity which this case references to.AnchorFigure
getHighlitedAnchor()
Returns highlited anchor.String
getLabel()
Returns label text.void
highlightClosestAnchor(org.eclipse.draw2d.geometry.Point location, int anchorType)
Highlites the closest anchor to givenlocation
.boolean
isSelected()
Returnstrue
if selected.protected void
outlineShape(org.eclipse.draw2d.Graphics graphics)
void
refresh()
Refreshes ui style.void
setAnchorsVisible(boolean isVisible, int anchorType)
Sets anchors visibility.void
setBounds(org.eclipse.draw2d.geometry.Rectangle rect)
void
setLabel(String labelText)
Sets label.void
setSelected(boolean isSelected)
-
Methods inherited from class org.eclipse.draw2d.Shape
getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, paintFigure, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidth, setLineWidthFloat, setOutline, setOutlineXOR, setXOR
-
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
-
-
-
-
Field Detail
-
FIGURE_HEIGHT
public static final int FIGURE_HEIGHT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CaseFigure
public CaseFigure(SwitchCase associatedCase)
Constructor.- Parameters:
associatedCase
- - associated with this figure case. Can't benull
-
-
Method Detail
-
setBounds
public void setBounds(org.eclipse.draw2d.geometry.Rectangle rect)
- Specified by:
setBounds
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setBounds
in classorg.eclipse.draw2d.Figure
-
setLabel
public void setLabel(String labelText)
Sets label.- Parameters:
labelText
- - label to set. Can't benull
.
-
getAnchors
public Collection<AnchorFigure> getAnchors()
Return figure anchors.- Returns:
- figure anchors. Can't return
null
.
-
getCaseEntity
public com._1c.g5.v8.dt.diagram.framework.IEntity getCaseEntity()
Returns entity which this case references to.- Returns:
- entity which this case references to. Can't return
null
.
-
getAssociatedCase
public SwitchCase getAssociatedCase()
Returns associated case.- Returns:
- associated case. Can't return
null
.
-
getLabel
public String getLabel()
Returns label text.- Returns:
- label text. Can't return
null
.
-
setAnchorsVisible
public void setAnchorsVisible(boolean isVisible, int anchorType)
Description copied from interface:IAnchorable
Sets anchors visibility.- Specified by:
setAnchorsVisible
in interfaceIAnchorable
- Parameters:
isVisible
- -true
if anchors should be visible.anchorType
- - anchor type.- See Also:
AnchorFigure.TARGET
,AnchorFigure.SOURCE
-
highlightClosestAnchor
public void highlightClosestAnchor(org.eclipse.draw2d.geometry.Point location, int anchorType)
Description copied from interface:IAnchorable
Highlites the closest anchor to givenlocation
.- Specified by:
highlightClosestAnchor
in interfaceIAnchorable
- Parameters:
location
- - location. Can't benull
.anchorType
- - anchor type.- See Also:
AnchorFigure.TARGET
,AnchorFigure.SOURCE
-
getHighlitedAnchor
public AnchorFigure getHighlitedAnchor()
Description copied from interface:IAnchorable
Returns highlited anchor. If there is no highlited anchor, returnsnull
.- Specified by:
getHighlitedAnchor
in interfaceIAnchorable
- Returns:
- highlited anchor. If there is no highlited anchor, returns
null
. Can returnnull
.
-
dispose
public void dispose()
Description copied from interface:IDisposable
Removes unneed figures associated with this from figure canvas.- Specified by:
dispose
in interfaceIDisposable
-
setSelected
public void setSelected(boolean isSelected)
- Specified by:
setSelected
in interfacecom._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable
-
refresh
public void refresh()
Description copied from interface:IRefreshable
Refreshes ui style.- Specified by:
refresh
in interfaceIRefreshable
-
isSelected
public boolean isSelected()
Returnstrue
if selected.- Returns:
true
if selected.
-
outlineShape
protected void outlineShape(org.eclipse.draw2d.Graphics graphics)
- Overrides:
outlineShape
in classorg.eclipse.draw2d.RectangleFigure
-
-