Class EntityCommentFigure

  • All Implemented Interfaces:
    com._1c.g5.v8.dt.diagram.framework.ui.model.IRecolorable, com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable, IAutomaticSize, org.eclipse.draw2d.IFigure

    public class EntityCommentFigure
    extends AbstractDecorationFigure
    implements com._1c.g5.v8.dt.diagram.framework.ui.model.IRecolorable, com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable, IAutomaticSize
    Instance of this class represents entity comment.
    • 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 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void calculateSize()
      Calculates and changes size of figure.
      protected void fillShape​(org.eclipse.draw2d.Graphics graphics)  
      org.eclipse.draw2d.Connection getCommentConnection()  
      ErdEntityComment getCommentModel()  
      org.eclipse.draw2d.FigureListener getParentFigureListener()  
      int getXTranslate()
      Retruns x coordinate translate from parent.
      int getYTranslate()
      Retruns y coordinate translate from parent.
      protected void initMouseListeners()
      Initializes figure's mouse listeners.
      void recolor()  
      void refresh()
      Refreshes comment.
      void reloadColors()
      Reloads colors from preference store.
      void setBorderSelectedColor​(org.eclipse.swt.graphics.Color borderSelectedColor)
      Sets border selected color.
      void setBorderUnselectedColor​(org.eclipse.swt.graphics.Color borderUnselectedColor)
      Sets border unselected color.
      void setSelected​(boolean isSelected)  
      void setVisible​(boolean isVisible)  
      void setXTranslate​(int xTranslate)
      Sets x coordinate translate from parent.
      void setYTranslate​(int yTranslate)
      Sets y coordinate translate from parent.
      • 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, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
    • Constructor Detail

      • EntityCommentFigure

        public EntityCommentFigure​(ErdEntityComment comment,
                                   AbstractErdFigure parent)
        Constructor
        Parameters:
        comment - - entity's comment. Can't be null.
        parent - - a figure to which comment will be attached. Can' be null.
    • Method Detail

      • getCommentConnection

        public org.eclipse.draw2d.Connection getCommentConnection()
        Returns:
        the comment connection. Can't return null.
      • getParentFigureListener

        public org.eclipse.draw2d.FigureListener getParentFigureListener()
        Returns:
        the parent figure listener. Can't be null.
      • getCommentModel

        public ErdEntityComment getCommentModel()
        Returns:
        the comment. Can't return null.
      • refresh

        public void refresh()
        Refreshes comment.
      • setBorderUnselectedColor

        public void setBorderUnselectedColor​(org.eclipse.swt.graphics.Color borderUnselectedColor)
        Sets border unselected color. If given item is null resets color to default.
        Parameters:
        borderUnselectedColor - - border default color. Can be null.
      • setBorderSelectedColor

        public void setBorderSelectedColor​(org.eclipse.swt.graphics.Color borderSelectedColor)
        Sets border selected color. If given item is null resets color to default.
        Parameters:
        borderSelectedColor - - border selected color. Can be null.
      • getYTranslate

        public int getYTranslate()
        Retruns y coordinate translate from parent.
        Returns:
        the yTranslate.
      • setYTranslate

        public void setYTranslate​(int yTranslate)
        Sets y coordinate translate from parent.
        Parameters:
        yTranslate - - the yTranslate to set.
      • getXTranslate

        public int getXTranslate()
        Retruns x coordinate translate from parent.
        Returns:
        the xTranslate.
      • setXTranslate

        public void setXTranslate​(int xTranslate)
        Sets x coordinate translate from parent.
        Parameters:
        xTranslate - - the xTranslate to set.
      • recolor

        public void recolor()
        Specified by:
        recolor in interface com._1c.g5.v8.dt.diagram.framework.ui.model.IRecolorable
      • reloadColors

        public void reloadColors()
        Reloads colors from preference store.
        Specified by:
        reloadColors in interface com._1c.g5.v8.dt.diagram.framework.ui.model.IRecolorable
      • setSelected

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

        public void setVisible​(boolean isVisible)
        Specified by:
        setVisible in interface org.eclipse.draw2d.IFigure
        Overrides:
        setVisible in class org.eclipse.draw2d.Figure
      • fillShape

        protected void fillShape​(org.eclipse.draw2d.Graphics graphics)
        Specified by:
        fillShape in class org.eclipse.draw2d.Shape