public class ZoomToFitControl extends ControlAdapter
LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
isEnabled, itemDragged, itemEntered, itemExited, itemKeyPressed, itemKeyReleased, itemKeyTyped, itemMoved, itemPressed, itemReleased, itemWheelMoved, keyPressed, keyReleased, keyTyped, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setEnabledpublic 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.public void itemClicked(VisualItem item, java.awt.event.MouseEvent e)
ControlitemClicked in interface ControlitemClicked in class ControlAdapterControl.itemClicked(prefuse.visual.VisualItem, java.awt.event.MouseEvent)public void mouseClicked(java.awt.event.MouseEvent e)
ControlmouseClicked in interface java.awt.event.MouseListenermouseClicked in interface ControlmouseClicked in class ControlAdapterMouseListener.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