本文整理了Java中prefuse.controls.ZoomControl
类的一些代码示例,展示了ZoomControl
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoomControl
类的具体详情如下:
包路径:prefuse.controls.ZoomControl
类名称:ZoomControl
[英]Zooms the display, changing the scale of the viewable region. By default, zooming is achieved by pressing the right mouse button on the background of the visualization and dragging the mouse up or down. Moving the mouse up zooms out the display around the spot the mouse was originally pressed. Moving the mouse down similarly zooms in the display, making items larger.
[中]缩放显示,更改可视区域的比例。默认情况下,通过在可视化背景上按鼠标右键并上下拖动鼠标来实现缩放。向上移动鼠标将缩小最初按下鼠标的位置周围的显示。向下移动鼠标同样会放大显示,使项目变大。
代码示例来源:origin: de.sciss/prefuse-core
/**
* @see prefuse.controls.Control#itemDragged(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
*/
public void itemDragged(VisualItem item, MouseEvent e) {
if ( m_zoomOverItem )
mouseDragged(e);
}
代码示例来源:origin: de.sciss/prefuse-core
/**
* @see prefuse.controls.Control#itemPressed(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
*/
public void itemPressed(VisualItem item, MouseEvent e) {
if ( m_zoomOverItem )
mousePressed(e);
}
代码示例来源:origin: de.sciss/prefuse-core
/**
* @see prefuse.controls.Control#itemReleased(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
*/
public void itemReleased(VisualItem item, MouseEvent e) {
if ( m_zoomOverItem )
mouseReleased(e);
}
代码示例来源:origin: es.ucm.fdi.gaia/jCOLIBRI
dis.addControlListener(new DragControl());
dis.addControlListener(new PanControl());
dis.addControlListener(new ZoomControl());
dis.addControlListener(new ZoomToFitControl());
代码示例来源:origin: de.sciss/prefuse-core
/**
* @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
*/
public void mouseDragged(MouseEvent e) {
if ( UILib.isButtonPressed(e, button) ) {
Display display = (Display)e.getComponent();
if (display.isTranformInProgress() || yLast == -1) {
yLast = -1;
return;
}
int y = e.getY();
int dy = y-yLast;
double zoom = 1 + ((double)dy) / 100;
int status = zoom(display, down, zoom, true);
int cursor = Cursor.N_RESIZE_CURSOR;
if ( status == NO_ZOOM )
cursor = Cursor.WAIT_CURSOR;
display.setCursor(Cursor.getPredefinedCursor(cursor));
yLast = y;
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/prefuseGraph
display.addControlListener(new DragControl());
display.addControlListener(new PanControl());
display.addControlListener(new ZoomControl());
display.addControlListener(new WheelZoomControl());
display.addControlListener(new ZoomToFitControl());
代码示例来源:origin: nz.ac.waikato.cms.weka/prefuseTree
setItemSorter(new TreeDepthItemSorter());
addControlListener(new ZoomToFitControl());
addControlListener(new ZoomControl());
addControlListener(new WheelZoomControl());
addControlListener(new PanControl());
代码示例来源:origin: org.qi4j.tool/org.qi4j.tool.envisage
addControlListener( new ZoomControl() );
addControlListener( new WheelZoomControl() );
addControlListener( new PanControl() );
内容来源于网络,如有侵权,请联系作者删除!