Interface DiagramSurface
-
@OpenApi public interface DiagramSurface
Interface for some component that is used for diagram displaying.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPainter(DiagramSurfacePainter painter)
Registers given painter.java.awt.Color
getBackground()
java.awt.Cursor
getCursor()
Returns diagram cursor.java.util.List
getPainters()
Returns all registered painters.java.awt.Rectangle
getVisibleRect()
com.nomagic.magicdraw.ui.zoom.Zoom
getZoom()
boolean
isLocked()
boolean
isUseBuffer()
void
paintPainters(java.awt.Graphics g)
void
recalculateScrollPosition(java.awt.Point pt)
void
removePainter(DiagramSurfacePainter painter)
Unregisters given painter.void
repaint()
Repaints the diagram surface.void
repaint(java.awt.Rectangle rect)
Repaints the given rectangle of the diagram surface.void
scrollRectToVisible(java.awt.Rectangle r)
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
setBackground(java.awt.Color c)
void
setBufferDirty(boolean dirty)
void
setCursor(java.awt.Cursor cursor)
Sets diagram cursor.void
setUseBuffer(boolean use)
-
-
-
Method Detail
-
repaint
@OpenApi void repaint()
Repaints the diagram surface.
-
repaint
@OpenApi void repaint(java.awt.Rectangle rect)
Repaints the given rectangle of the diagram surface.- Parameters:
rect
- the rectangle to repaint.
-
getZoom
com.nomagic.magicdraw.ui.zoom.Zoom getZoom()
-
getVisibleRect
java.awt.Rectangle getVisibleRect()
-
scrollRectToVisible
@OpenApi void scrollRectToVisible(java.awt.Rectangle r)
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
@OpenApi void setCursor(@CheckForNull java.awt.Cursor cursor)
Sets diagram cursor.- Parameters:
cursor
- a new cursor for diagram.- See Also:
Component.setCursor(java.awt.Cursor)
-
getCursor
@OpenApi java.awt.Cursor getCursor()
Returns diagram cursor.- Returns:
- current diagram cursor.
- See Also:
Component.getCursor()
-
setBackground
void setBackground(java.awt.Color c)
-
getBackground
java.awt.Color getBackground()
-
setUseBuffer
void setUseBuffer(boolean use)
-
isUseBuffer
boolean isUseBuffer()
-
setBufferDirty
void setBufferDirty(boolean dirty)
-
recalculateScrollPosition
void recalculateScrollPosition(java.awt.Point pt)
-
isLocked
boolean isLocked()
-
addPainter
@OpenApi void addPainter(DiagramSurfacePainter painter)
Registers given painter.- Parameters:
painter
- the given painter
-
removePainter
@OpenApi void removePainter(DiagramSurfacePainter painter)
Unregisters given painter.- Parameters:
painter
- the given painter
-
getPainters
@OpenApi java.util.List getPainters()
Returns all registered painters.- Returns:
- list of registered painters
-
paintPainters
void paintPainters(java.awt.Graphics g)
-
-