public class Overview
extends javax.swing.JComponent
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Diagram contents
and allows scrolling and zooming the diagram with the mouse.
To specify which Diagram instance is shown in the overview, call the
setDiagramView(com.mindfusion.diagramming.DiagramView) method.
The scale in which the overview control paints items is specified via the
setScaleFactor(float) and setFitAll(boolean) methods. If the FitAll mode is
enabled, the whole diagram fits into the overview window.
javax.swing.JComponent.AccessibleJComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
Overview()
Initializes a new instance of the Overview class.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
getBackgroundColor()
Gets the background color of the overview control.
|
DiagramView |
getDiagramView()
Gets the Diagram instance whose contents is displayed in the overview.
|
java.awt.Color |
getDimColor()
Gets a color used to blend with the part of the diagram that is not
visible in the
Diagram's client rectangle. |
boolean |
getFitAll()
Gets a value that specifies whether to fit the whole diagram inside the
overview.
|
float |
getScaleFactor()
Gets the fixed scale factor that is used when the
FitAll mode is disabled. |
boolean |
getShowScrollbars()
Gets a value indicating whether the overview control should display
scrollbars.
|
Pen |
getTrackingRectPen()
Gets the Pen object used to draw the tracking rectangle border.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
java.awt.geom.Point2D |
overviewToDoc(java.awt.Point point) |
void |
paintComponent(java.awt.Graphics g) |
void |
resumeRepaint()
Resumes repainting the control after a
suspendRepaint() call. |
void |
setBackgroundColor(java.awt.Color value)
Sets the background color of the overview control.
|
void |
setDiagramView(DiagramView value)
Sets the Diagram instance whose contents should be displayed in the
overview.
|
void |
setDimColor(java.awt.Color value)
Sets a color used to blend with the part of the diagram that is not
visible in the
Diagram's client rectangle. |
void |
setFitAll(boolean value)
Sets a value indicating whether to fit the whole diagram inside the
overview.
|
void |
setScaleFactor(float value)
Sets a fixed scale factor that should be used when the
FitAll mode is disabled. |
void |
setShowScrollbars(boolean value)
Sets a value indicating whether the overview control should display
scrollbars.
|
void |
setTrackingRectPen(Pen value)
Sets the Pen object used to draw the tracking rectangle border.
|
void |
suspendRepaint()
Stops repainting the control.
|
void |
update()
Causes the control to recalculate all its internals and repaint its
client area.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic void update()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void suspendRepaint()
public void resumeRepaint()
suspendRepaint() call.public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic java.awt.geom.Point2D overviewToDoc(java.awt.Point point)
public DiagramView getDiagramView()
Diagram object representing the flowchart document.public void setDiagramView(DiagramView value)
value - A Diagram object representing the flowchart document.public boolean getFitAll()
true if the diagram contents should fit the overview
window size, otherwise false.public void setFitAll(boolean value)
value - true if the diagram contents should fit the
overview window size, otherwise false.public java.awt.Color getBackgroundColor()
Color object specifying the overview background
color.public void setBackgroundColor(java.awt.Color value)
value - A Color object representing the overview
background color.public java.awt.Color getDimColor()
Diagram's client rectangle.Color object representing the blend color.public void setDimColor(java.awt.Color value)
Diagram's client rectangle.value - A Color object representing the blend color.public float getScaleFactor()
FitAll mode is disabled.public void setScaleFactor(float value)
FitAll mode is disabled.value - A float value specifying the scale factor as percents of the
diagram size.public boolean getShowScrollbars()
true if the overview control displays scrollbars,
otherwise false.public void setShowScrollbars(boolean value)
value - true to display scrollbars, otherwise
false.public void setTrackingRectPen(Pen value)
value - A Pen instance that should be used to draw the
tracking rectangle border lines.