Class EntityCommentFigure
- java.lang.Object
-
- org.eclipse.draw2d.Figure
-
- org.eclipse.draw2d.Shape
-
- com._1c.g5.v8.dt.erd.ui.model.draw2d.AbstractDecorationFigure
-
- com._1c.g5.v8.dt.erd.ui.model.draw2d.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.
-
-
Constructor Summary
Constructors Constructor Description EntityCommentFigure(ErdEntityComment comment, AbstractErdFigure parent)
Constructor
-
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 com._1c.g5.v8.dt.erd.ui.model.draw2d.AbstractDecorationFigure
outlineShape
-
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 benull
.parent
- - a figure to which comment will be attached. Can' benull
.
-
-
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 isnull
resets color to default.- Parameters:
borderUnselectedColor
- - border default color. Can benull
.
-
setBorderSelectedColor
public void setBorderSelectedColor(org.eclipse.swt.graphics.Color borderSelectedColor)
Sets border selected color. If given item isnull
resets color to default.- Parameters:
borderSelectedColor
- - border selected color. Can benull
.
-
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.
-
calculateSize
public void calculateSize()
Description copied from interface:IAutomaticSize
Calculates and changes size of figure.- Specified by:
calculateSize
in interfaceIAutomaticSize
-
recolor
public void recolor()
- Specified by:
recolor
in interfacecom._1c.g5.v8.dt.diagram.framework.ui.model.IRecolorable
-
reloadColors
public void reloadColors()
Reloads colors from preference store.- Specified by:
reloadColors
in interfacecom._1c.g5.v8.dt.diagram.framework.ui.model.IRecolorable
-
setSelected
public void setSelected(boolean isSelected)
- Specified by:
setSelected
in interfacecom._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable
-
setVisible
public void setVisible(boolean isVisible)
- Specified by:
setVisible
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setVisible
in classorg.eclipse.draw2d.Figure
-
initMouseListeners
protected void initMouseListeners()
Description copied from class:AbstractDecorationFigure
Initializes figure's mouse listeners.
All mouse listeners should be initialized through this method.- Specified by:
initMouseListeners
in classAbstractDecorationFigure
-
fillShape
protected void fillShape(org.eclipse.draw2d.Graphics graphics)
- Specified by:
fillShape
in classorg.eclipse.draw2d.Shape
-
-