|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.controls.ControlAdapter prefuse.controls.ZoomToFitControl
public class ZoomToFitControl
Zooms a display such that all items within a given group will fit within the display bounds. By default, this achieved by clicking the right mouse button once, with no dragging.
Field Summary |
---|
Fields inherited from interface prefuse.controls.Control |
---|
LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON |
Constructor Summary | |
---|---|
ZoomToFitControl()
Create a new ZoomToFitControl. |
|
ZoomToFitControl(int button)
Create a new ZoomToFitControl. |
|
ZoomToFitControl(java.lang.String group)
Create a new ZoomToFitControl. |
|
ZoomToFitControl(java.lang.String group,
int button)
Create a new ZoomToFitControl. |
|
ZoomToFitControl(java.lang.String group,
int margin,
long duration,
int button)
Create a new ZoomToFitControl. |
Method Summary | |
---|---|
int |
getMargin()
Get the display margin to include within the "zoomed-to-fit" bounds. |
boolean |
isZoomOverItem()
Indicates if the zoom control will work while the mouse is over a VisualItem. |
void |
itemClicked(VisualItem item,
java.awt.event.MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on a VisualItem. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on the Display, but NOT on a VisualItem. |
void |
setMargin(int margin)
Set the display margin to include within the "zoomed-to-fit" bounds. |
void |
setZoomOverItem(boolean zoomOverItem)
Determines if the zoom control will work while the mouse is over a VisualItem |
Methods inherited from class prefuse.controls.ControlAdapter |
---|
isEnabled, itemDragged, itemEntered, itemExited, itemKeyPressed, itemKeyReleased, itemKeyTyped, itemMoved, itemPressed, itemReleased, itemWheelMoved, keyPressed, keyReleased, keyTyped, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ZoomToFitControl()
public ZoomToFitControl(java.lang.String group)
group
- the data group that should fit the Displaypublic ZoomToFitControl(int button)
button
- the mouse button used to initiate the zoom-to-fit. One of
Control.LEFT_MOUSE_BUTTON
, Control.MIDDLE_MOUSE_BUTTON
,
or Control.RIGHT_MOUSE_BUTTON
.public ZoomToFitControl(java.lang.String group, int button)
group
- the data group that should fit the Displaybutton
- the mouse button used to initiate the zoom-to-fit. One of
Control.LEFT_MOUSE_BUTTON
, Control.MIDDLE_MOUSE_BUTTON
,
or Control.RIGHT_MOUSE_BUTTON
.public ZoomToFitControl(java.lang.String group, int margin, long duration, int button)
group
- the data group that should fit the Displaymargin
- the margin, in pixels, desired between the group
and the edge of the displayduration
- the duration of the animated zoombutton
- the mouse button used to initiate the zoom-to-fit. One of
Control.LEFT_MOUSE_BUTTON
, Control.MIDDLE_MOUSE_BUTTON
,
or Control.RIGHT_MOUSE_BUTTON
.Method Detail |
---|
public void itemClicked(VisualItem item, java.awt.event.MouseEvent e)
Control
itemClicked
in interface Control
itemClicked
in class ControlAdapter
Control.itemClicked(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
public void mouseClicked(java.awt.event.MouseEvent e)
Control
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in interface Control
mouseClicked
in class ControlAdapter
MouseListener.mouseClicked(java.awt.event.MouseEvent)
public boolean isZoomOverItem()
public void setZoomOverItem(boolean zoomOverItem)
zoomOverItem
- true to indicate the control operates
over VisualItems, false otherwisepublic int getMargin()
public void setMargin(int margin)
margin
- Display margin to use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |