Class AbstractErdFigure
- java.lang.Object
-
- org.eclipse.draw2d.Figure
-
- org.eclipse.draw2d.Shape
-
- com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramFigure
-
- com._1c.g5.v8.dt.erd.ui.model.draw2d.AbstractErdFigure
-
- All Implemented Interfaces:
com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable
,ICommentableFigure
,org.eclipse.draw2d.IFigure
- Direct Known Subclasses:
AbstractErdFigureWithBorder
public abstract class AbstractErdFigure extends com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramFigure implements ICommentableFigure, com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable
Base class for diagram figures associated with entity. Can be commented and selected.
-
-
Constructor Summary
Constructors Constructor Description AbstractErdFigure(IErdEntity associatedEntity, DiagramTabItem tab, com._1c.g5.v8.dt.diagram.framework.ui.IDiagram diagram)
Consturcor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IErdEntity
getAssociatedEntity()
ErdColorManager
getColorManager()
Returns erd color manager for getting colors.EntityCommentFigure
getCommentFigure()
Returns comment.com._1c.g5.v8.dt.diagram.framework.ui.IDiagram
getDiagram()
Returns diagram where figure located.ErdOperationManager
getOperationManager()
Returns erd operation manager for executing operations.DiagramTabItem
getTab()
Returns entitys tab.ErdTabsManager
getTabsManager()
Returns erd tabs manager.protected abstract void
initMouseListeners()
Initializes figure's mouse listeners.protected boolean
isSelected()
Returnstrue
if figure is selected.protected void
outlineShape(org.eclipse.draw2d.Graphics graphics)
void
removeComment()
Removes comment.void
setComment(EntityCommentFigure comment)
Sets comment and adds it to the diagram.void
setParent(org.eclipse.draw2d.IFigure parent)
void
setSelected(boolean isSelected)
-
Methods inherited from class org.eclipse.draw2d.Shape
fillShape, 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, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
-
-
-
-
Constructor Detail
-
AbstractErdFigure
public AbstractErdFigure(IErdEntity associatedEntity, DiagramTabItem tab, com._1c.g5.v8.dt.diagram.framework.ui.IDiagram diagram)
Consturcor.- Parameters:
associatedEntity
- - entity to create figure for. Can't benull
.tab
- - tab to add entity to. Can't benull
.diagram
- - diagram whete figure located. Can't benull
.
-
-
Method Detail
-
setParent
public void setParent(org.eclipse.draw2d.IFigure parent)
- Specified by:
setParent
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setParent
in classorg.eclipse.draw2d.Figure
-
setComment
public void setComment(EntityCommentFigure comment)
Description copied from interface:ICommentableFigure
Sets comment and adds it to the diagram. If figure already has comment, removes it and sets new one.- Specified by:
setComment
in interfaceICommentableFigure
- Parameters:
comment
- - comment to set. Can't benull
.
-
removeComment
public void removeComment()
Description copied from interface:ICommentableFigure
Removes comment.- Specified by:
removeComment
in interfaceICommentableFigure
-
getCommentFigure
public EntityCommentFigure getCommentFigure()
Description copied from interface:ICommentableFigure
Returns comment. Returnsnull
if figure has no comment.- Specified by:
getCommentFigure
in interfaceICommentableFigure
- Returns:
- comment. Can return
null
.
-
setSelected
public void setSelected(boolean isSelected)
- Specified by:
setSelected
in interfacecom._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable
-
getAssociatedEntity
public IErdEntity getAssociatedEntity()
- Overrides:
getAssociatedEntity
in classcom._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramFigure
-
getTab
public DiagramTabItem getTab()
Returns entitys tab.- Returns:
- entitys tab. Can't return
null
.
-
getColorManager
public ErdColorManager getColorManager()
Returns erd color manager for getting colors.- Returns:
- erd color manager for getting colors. Can't return
null
.
-
getOperationManager
public ErdOperationManager getOperationManager()
Returns erd operation manager for executing operations.- Returns:
- erd operation manager for executing operations. Can't return
null
.
-
getTabsManager
public ErdTabsManager getTabsManager()
Returns erd tabs manager.- Returns:
- erd tabs manager. Can't return
null
.
-
getDiagram
public com._1c.g5.v8.dt.diagram.framework.ui.IDiagram getDiagram()
Returns diagram where figure located.- Returns:
- diagram where figure located. Can't return
null
.
-
isSelected
protected boolean isSelected()
Returnstrue
if figure is selected.- Returns:
true
if figure is selected.
-
initMouseListeners
protected abstract void initMouseListeners()
Initializes figure's mouse listeners.
All mouse listeners should be initialized through this method.
-
outlineShape
protected void outlineShape(org.eclipse.draw2d.Graphics graphics)
- Specified by:
outlineShape
in classorg.eclipse.draw2d.Shape
-
-