当前位置: 首页>>代码示例>>Java>>正文


Java DisplayLib类代码示例

本文整理汇总了Java中prefuse.util.display.DisplayLib的典型用法代码示例。如果您正苦于以下问题:Java DisplayLib类的具体用法?Java DisplayLib怎么用?Java DisplayLib使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DisplayLib类属于prefuse.util.display包,在下文中一共展示了DisplayLib类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializeWindowCharacteristics

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
/**
 * This sets up various things about the window, including the size.
 * TODO include the size in the constructor
 */
private void initializeWindowCharacteristics()
{
	setBorder( BorderFactory.createEmptyBorder() );

	// main display controls

	addComponentListener(
		new ComponentAdapter() {
			public void componentResized( ComponentEvent e )
			{
				if ( !isTranformInProgress() ) {
					int margin = 10;

					Rectangle2D bounds = m_vis.getBounds( Visualization.ALL_ITEMS );
					double barWidth = bounds.getWidth() / m_histoTable.getBinCount();

					GraphicsLib.expand( bounds, margin + (int)( 1 / getScale() ) );
					DisplayLib.fitViewToBounds( HistogramGraph.this, bounds, 0 );

					setBarWidth( barWidth );
				}
			}
		}
	);

	// addControlListener(new ZoomToFitControl());
	setHighQuality( true );

	initializeLayoutBoundsForDisplay();
	m_shapeR.setBounds( m_dataB );
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:36,代码来源:HistogramGraph.java

示例2: mouseReleased

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
 */
public void mouseReleased(MouseEvent e) {
    if ( UILib.isButtonPressed(e, button) ) {
    	if (down != null && current != null) {
    		Display display = (Display)e.getComponent();
            DisplayLib.fitViewToBounds(display, getZoomBoxBounds(200), 500);
    	}
    	hideZoomBox();
    }
}
 
开发者ID:P15,项目名称:jailer,代码行数:13,代码来源:ZoomBoxControl.java

示例3: zoomToFit

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
/**
 * Zooms to fit.
 */
public void zoomToFit() {
       Visualization vis = display.getVisualization();
       Rectangle2D bounds = vis.getBounds(Visualization.ALL_ITEMS);
       GraphicsLib.expand(bounds, 50 + (int)(1/display.getScale()));
       DisplayLib.fitViewToBounds(display, bounds, duration);
}
 
开发者ID:P15,项目名称:jailer,代码行数:10,代码来源:GraphicalDataModelView.java

示例4: run

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
@Override
public void run( double frac )
{
    int duration = 20;
    int margin = 50;
    Visualization vis = getVisualization();
    Rectangle2D bounds = vis.getBounds( Visualization.ALL_ITEMS );
    GraphicsLib.expand( bounds, margin + (int) ( 1 / getScale() ) );
    DisplayLib.fitViewToBounds( TreeGraphDisplay.this, bounds, duration );
}
 
开发者ID:apache,项目名称:polygene-java,代码行数:11,代码来源:TreeGraphDisplay.java

示例5: getZoomToFitAction

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
private Action getZoomToFitAction() {
   	return(new Action() {

		@Override
		public void run(double frac) {
			Rectangle2D bounds = m_vis.getBounds(Visualization.ALL_ITEMS);
			Display display = m_vis.getDisplay(0);
	        GraphicsLib.expand(bounds, 50 + (int)(1/display.getScale()));
	        DisplayLib.fitViewToBounds(display, bounds, 2000);
		}
   		
   	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:14,代码来源:GraphView.java

示例6: itemBoundsChanged

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
public void itemBoundsChanged(Display d) {
    d.getItemBounds(m_temp);
    GraphicsLib.expand(m_temp, 25/d.getScale());
    
    double dd = m_d/d.getScale();
    double xd = Math.abs(m_temp.getMinX()-m_bounds.getMinX());
    double yd = Math.abs(m_temp.getMinY()-m_bounds.getMinY());
    double wd = Math.abs(m_temp.getWidth()-m_bounds.getWidth());
    double hd = Math.abs(m_temp.getHeight()-m_bounds.getHeight());
    if ( xd>dd || yd>dd || wd>dd || hd>dd ) {
        m_bounds.setFrame(m_temp);
        DisplayLib.fitViewToBounds(d, m_bounds, 0);
    }
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:15,代码来源:GraphView.java

示例7: onDoubleTap

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
@Override
public boolean onDoubleTap(MotionEvent e)
{
	Visualization vis = display.getVisualization();
	Rectangle2D bounds = vis.getBounds(m_group);
	GraphicsLib.expand(bounds, m_margin + (int) (1 / display.getScale()));
	DisplayLib.fitViewToBounds(display, bounds, m_duration);
	display.invalidate();
	return true;
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:11,代码来源:ZoomToFitControl.java

示例8: zoomToFit

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
/**
 * Zoom to fit.
 * 
 * @param display
 *            the display
 */
private void zoomToFit(Display display) {
	if (!display.isTranformInProgress()) {
		Visualization vis = display.getVisualization();
		Rectangle2D bounds = vis.getBounds(Visualization.ALL_ITEMS);

		GraphicsLib.expand(bounds, 300 + (int) (1 / display.getScale()));
		DisplayLib.fitViewToBounds(display, bounds, 1000);

		m_vis.run("layout");
	}
}
 
开发者ID:santiontanon,项目名称:fterm,代码行数:18,代码来源:CBVisualizer.java

示例9: zoomToFit

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
/**
 * Zoom to fit.
 * 
 * @param display
 *            the display
 */
public void zoomToFit(Display display) {
	if (!display.isTranformInProgress()) {
		Visualization vis = display.getVisualization();
		Rectangle2D bounds = vis.getBounds(Visualization.ALL_ITEMS);

		GraphicsLib.expand(bounds, 300 + (int) (1 / display.getScale()));
		DisplayLib.fitViewToBounds(display, bounds, 1000);

		m_vis.run("layout");
	}
}
 
开发者ID:santiontanon,项目名称:fterm,代码行数:18,代码来源:FTVisualizerStatic.java

示例10: mouseClicked

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
 */
public void mouseClicked(MouseEvent e) {
	Display display = (Display)e.getComponent();
	if ( !display.isTranformInProgress() && 
			e.getClickCount()==2 )
    {
	    Visualization vis = display.getVisualization();
        Rectangle2D bounds = vis.getBounds(m_group);
        
        //System.out.println("ZTO: " + bounds.getHeight());
        GraphicsLib.expand(bounds, m_margin + (int)(1/display.getScale()));
        DisplayLib.fitViewToBounds(display, bounds, m_duration);
    }
}
 
开发者ID:santiontanon,项目名称:fterm,代码行数:17,代码来源:ZoomToFitControl.java

示例11: ZoomToFit

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
private void ZoomToFit() {

		if (!display.isTranformInProgress()) {
			long m_duration = 2000;
			int m_margin = 50;
			Visualization vis = display.getVisualization();
			Rectangle2D bounds = vis.getBounds(Visualization.ALL_ITEMS);
			GraphicsLib.expand(bounds, m_margin + (int) (1 / display.getScale()));
			DisplayLib.fitViewToBounds(display, bounds, m_duration);
		}

	}
 
开发者ID:jdepend,项目名称:cooper,代码行数:13,代码来源:MainMenuControl.java

示例12: itemBoundsChanged

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
public void itemBoundsChanged(Display d) {
	d.getItemBounds(m_temp);
	GraphicsLib.expand(m_temp, 25/d.getScale());

	double dd = m_d/d.getScale();
	double xd = Math.abs(m_temp.getMinX()-m_bounds.getMinX());
	double yd = Math.abs(m_temp.getMinY()-m_bounds.getMinY());
	double wd = Math.abs(m_temp.getWidth()-m_bounds.getWidth());
	double hd = Math.abs(m_temp.getHeight()-m_bounds.getHeight());
	if ( xd>dd || yd>dd || wd>dd || hd>dd ) {
		m_bounds.setFrame(m_temp);
		DisplayLib.fitViewToBounds(d, m_bounds, 0);
	}
}
 
开发者ID:renespeck,项目名称:Cugar,代码行数:15,代码来源:FitOverviewListener.java

示例13: centerGraph

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
public void centerGraph() {
	synchronized (mVis) {
		if (!isTranformInProgress()) {
			Rectangle2D bounds = mVis.getBounds(Visualization.ALL_ITEMS);
			GraphicsLib.expand(bounds, 50 + (int) (1 / getScale()));
			DisplayLib.fitViewToBounds(this, bounds, 1000);
		}
	}
}
 
开发者ID:trustathsh,项目名称:irongui,代码行数:10,代码来源:GraphPanel.java

示例14: zoomToFit

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
public void zoomToFit() {
	Rectangle2D bounds = m_vis.getBounds(Visualization.ALL_ITEMS);
	Display display = m_vis.getDisplay(0);
       GraphicsLib.expand(bounds, 50 + (int)(1/display.getScale()));
       DisplayLib.fitViewToBounds(display, bounds, 1000);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:7,代码来源:CommonTreeView.java

示例15: zoomToFit

import prefuse.util.display.DisplayLib; //导入依赖的package包/类
public void zoomToFit() {
	Rectangle2D bounds = m_vis.getBounds(Visualization.ALL_ITEMS);
	Display display = m_vis.getDisplay(0);
       GraphicsLib.expand(bounds, 50 + (int)(1/display.getScale()));
       DisplayLib.fitViewToBounds(display, bounds, 2000);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:7,代码来源:GraphView.java


注:本文中的prefuse.util.display.DisplayLib类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。