|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
com.nwoods.jgo.JGoView
com.nwoods.jgo.JGoOverview
A simple overview window, displaying another JGoView's document at a reduced scale, and allowing navigation by the user.
This view can be used once you call setObserved with another JGoView. This overview displays a rectangle that indicates the position and extent of the Observed's view onto the document. The user can change the position of the Observed view in the document by either dragging the rectangle or clicking.
The user cannot select objects in this view, nor can the user drop something from another window or drag something out of this window. This overview does display tooltips for objects, to make it easier for users to tell where they are.
Field Summary |
Fields inherited from class com.nwoods.jgo.JGoView |
ChangedDimensions, ChangedOrigin, ChangedPen, ChangedSnapMove, ChangedSnapResize, ChangedSpot, ChangedStyle, DebugEvents, EventMouseDown, EventMouseMove, EventMouseUp, GridCross, GridDot, GridInvisible, GridLine, MouseStateAction, MouseStateCreateLink, MouseStateCreateLinkFrom, MouseStateDragBoxSelection, MouseStateLast, MouseStateMove, MouseStateNone, MouseStateResize, MouseStateSelection, NoSnap, SnapAfter, SnapJump |
Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
Constructor Summary | |
JGoOverview(org.eclipse.swt.widgets.Composite parent,
int style)
Construct an overview window displaying objects at one eighth scale. |
Method Summary | |
int |
computeAcceptableDrop(org.eclipse.swt.dnd.DropTargetEvent e)
Disallow dragging from other windows to here. |
void |
doBackgroundClick(int modifiers,
org.eclipse.swt.graphics.Point dc,
org.eclipse.swt.graphics.Point vc)
Clicking somewhere other than in the overview rectangle will move the view to be centered at that point. |
JGoDocument |
getDocument()
Make sure this is always looking at the same document as the observed's document. |
Dimension |
getDocumentSize()
Ignore any view objects. |
JGoView |
getObserved()
Get the JGoView that is being watched/tracked. |
JGoOverviewRectangle |
getOverviewRect()
Returns the rectangle in this view that the user drags to change the ViewPosition of the observed view. |
java.lang.String |
getToolTipText(org.eclipse.swt.events.MouseEvent evt)
Show tooltips, so users might get a clue about which object is which even though the objects are so small. |
boolean |
isIncludingNegativeCoords()
This is true if the Observed view's isIncludeNegativeCoords() is true. |
JGoObject |
pickDocObject(org.eclipse.swt.graphics.Point pointToCheck,
boolean selectableOnly)
Ignore all document objects; only the JGoOverviewRectangle can be selected. |
void |
selectInBox(org.eclipse.swt.graphics.Rectangle rect)
Don't allow anything to be selected by user's rubber band either. |
void |
setObserved(JGoView observed)
Set the view that this overview is supposed to observe. |
void |
widgetDisposed(org.eclipse.swt.events.DisposeEvent e)
When the Overview window is no longer needed, make sure the observed view doesn't keep any references to this view. |
Methods inherited from class org.eclipse.swt.widgets.Composite |
changed, checkSubclass, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JGoOverview(org.eclipse.swt.widgets.Composite parent, int style)
Method Detail |
public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e)
widgetDisposed
in interface org.eclipse.swt.events.DisposeListener
widgetDisposed
in class JGoView
public void setObserved(JGoView observed)
observed
- a JGoView that must not be a JGoOverview, but may
be null to turn this overview "off"/blankpublic JGoView getObserved()
public int computeAcceptableDrop(org.eclipse.swt.dnd.DropTargetEvent e)
computeAcceptableDrop
in class JGoView
public JGoOverviewRectangle getOverviewRect()
public JGoObject pickDocObject(org.eclipse.swt.graphics.Point pointToCheck, boolean selectableOnly)
pickDocObject
in class JGoView
pointToCheck
- the point under which to find the object, in
document coordinatesselectableOnly
- if true, consider only selectable objectspublic void selectInBox(org.eclipse.swt.graphics.Rectangle rect)
selectInBox
in class JGoView
rect
- the Rectangle, in document coordinatespublic void doBackgroundClick(int modifiers, org.eclipse.swt.graphics.Point dc, org.eclipse.swt.graphics.Point vc)
doBackgroundClick
in class JGoView
public JGoDocument getDocument()
getDocument
in class JGoView
public Dimension getDocumentSize()
getDocumentSize
in class JGoView
public boolean isIncludingNegativeCoords()
isIncludingNegativeCoords
in class JGoView
public java.lang.String getToolTipText(org.eclipse.swt.events.MouseEvent evt)
Note that it might not be possible for the user to position the mouse pointer over every objects, because thin objects may take less than one pixel.
getToolTipText
in class JGoView
evt
- the mouse event generated when passing over the canvas.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |