Interface DiagramSurface
@OpenApi
public interface DiagramSurface
Interface for some component that is used for diagram displaying.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPainter
(com.nomagic.magicdraw.ui.AbstractDiagramSurfacePainter painter) Registers given painter.void
addPainter
(DiagramSurfacePainter painter) Registers given painter.Returns diagram cursor.Returns all registered painters.void
removePainter
(com.nomagic.magicdraw.ui.AbstractDiagramSurfacePainter painter) Unregisters given painter.void
removePainter
(DiagramSurfacePainter painter) Unregisters given painter.void
repaint()
Repaints the diagram surface.void
Repaints the given rectangle of the diagram surface.void
Scrolls diagram surface in order to make given part of diagram visible.void
scrollToVisible
(int x, int y) Scrolls diagram surface in order to make given point of diagram visible.void
Sets diagram cursor.
-
Method Details
-
repaint
@OpenApi void repaint()Repaints the diagram surface. -
repaint
Repaints the given rectangle of the diagram surface.- Parameters:
rect
- the rectangle to repaint.
-
scrollRectToVisible
Scrolls diagram surface in order to make given part of diagram visible.- Parameters:
r
- make this part of diagram visible.
-
scrollToVisible
@OpenApi void scrollToVisible(int x, int y) Scrolls diagram surface in order to make given point of diagram visible.- Parameters:
x
- the x coordinate of the visible point.y
- the y coordinate of the visible point.
-
setCursor
Sets diagram cursor.- Parameters:
cursor
- a new cursor for diagram.- See Also:
-
getCursor
Returns diagram cursor.- Returns:
- current diagram cursor.
- See Also:
-
addPainter
Registers given painter.- Parameters:
painter
- the given painter
-
addPainter
@OpenApi void addPainter(com.nomagic.magicdraw.ui.AbstractDiagramSurfacePainter painter) Registers given painter.- Parameters:
painter
- the given painter
-
removePainter
Unregisters given painter.- Parameters:
painter
- the given painter
-
removePainter
@OpenApi void removePainter(com.nomagic.magicdraw.ui.AbstractDiagramSurfacePainter painter) Unregisters given painter.- Parameters:
painter
- the given painter
-
getPainters
Returns all registered painters.- Returns:
- list of registered painters
-