Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure

        org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch
      • Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure

        org.eclipse.draw2d.IFigure.NoInsets
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int FIGURE_HEIGHT  
      • Fields inherited from class org.eclipse.draw2d.Shape

        lineStyle, lineWidth
      • Fields inherited from class org.eclipse.draw2d.Figure

        bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip
      • Fields inherited from interface org.eclipse.draw2d.IFigure

        MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
    • 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 given location.
      boolean isSelected()
      Returns true 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.RectangleFigure

        fillShape
      • 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
    • Constructor Detail

      • CaseFigure

        public CaseFigure​(SwitchCase associatedCase)
        Constructor.
        Parameters:
        associatedCase - - associated with this figure case. Can't be null
    • Method Detail

      • setBounds

        public void setBounds​(org.eclipse.draw2d.geometry.Rectangle rect)
        Specified by:
        setBounds in interface org.eclipse.draw2d.IFigure
        Overrides:
        setBounds in class org.eclipse.draw2d.Figure
      • setLabel

        public void setLabel​(String labelText)
        Sets label.
        Parameters:
        labelText - - label to set. Can't be null.
      • 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.
      • highlightClosestAnchor

        public void highlightClosestAnchor​(org.eclipse.draw2d.geometry.Point location,
                                           int anchorType)
        Description copied from interface: IAnchorable
        Highlites the closest anchor to given location.
        Specified by:
        highlightClosestAnchor in interface IAnchorable
        Parameters:
        location - - location. Can't be null.
        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, returns null.
        Specified by:
        getHighlitedAnchor in interface IAnchorable
        Returns:
        highlited anchor. If there is no highlited anchor, returns null. Can return null.
      • dispose

        public void dispose()
        Description copied from interface: IDisposable
        Removes unneed figures associated with this from figure canvas.
        Specified by:
        dispose in interface IDisposable
      • setSelected

        public void setSelected​(boolean isSelected)
        Specified by:
        setSelected in interface com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable
      • isSelected

        public boolean isSelected()
        Returns true if selected.
        Returns:
        true if selected.
      • outlineShape

        protected void outlineShape​(org.eclipse.draw2d.Graphics graphics)
        Overrides:
        outlineShape in class org.eclipse.draw2d.RectangleFigure