• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java UILib类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: itemDragged

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see Control#itemDragged(VisualItem, MouseEvent)
 */
public void itemDragged( VisualItem item, MouseEvent e )
{
	if ( !UILib.isButtonPressed( e, button ) )
		return;
	if ( !( item instanceof NodeItem ) )
		return;

	Display d = (Display)e.getComponent();
	tmp = d.getAbsoluteCoordinate( e.getPoint(), tmp );
	double dx = tmp.getX() - down.getX();
	double dy = tmp.getY() - down.getY();

	updateLocations( (NodeItem)item, dx, dy );

	down.setLocation( tmp );
	item.getVisualization().repaint();
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:21,代码来源:SubtreeDragControl.java


示例2: mouseDragged

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @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() || down == null) {
            hideZoomBox();
            return;
        }
        current = new Point2D.Float();
        display.getAbsoluteCoordinate(e.getPoint(), current);
   
        if (boxItem != null) {
        	boxItem.setVisible(true);
         boxItem.setValidated(false);
         boxItem.getVisualization().repaint();
        }
    }
}
 
开发者ID:P15,项目名称:jailer,代码行数:21,代码来源:ZoomBoxControl.java


示例3: main

import prefuse.util.ui.UILib; //导入依赖的package包/类
public static void main(String argv[]) {
    String infile = DATA_FILE;
    String label = "name";
    
    if ( argv.length > 1 ) {
        infile = argv[0];
        label = argv[1];
    }
    
    UILib.setPlatformLookAndFeel();
    
    JFrame frame = new JFrame("p r e f u s e  |  r a d i a l g r a p h v i e w");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setContentPane(demo(infile, label));
    frame.pack();
    frame.setVisible(true);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:18,代码来源:RadialGraphView.java


示例4: mouseClicked

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
 */
public void mouseClicked(MouseEvent e) {
	Display display = (Display)e.getComponent();
	if ( !display.isTranformInProgress() && 
    	  UILib.isButtonPressed(e, m_button_zoom_in) &&
    	  e.getClickCount() == 2)
    {
		
		Point2D center = new Point2D.Double((double)e.getX(), (double)e.getY());
		double scale = 3.0;
		display.animatePanAndZoomTo(center, scale, m_duration);
	    /*   
        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);
        DisplayLib.fitViewToBounds(display, bounds, center, duration)
    	*/
    }
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:23,代码来源:FlyInOutZoomControl.java


示例5: mouseDragged

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @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();
		int x = e.getX(), y = e.getY();
		int dx = x - xDown, dy = y - yDown;
		int rangeModeldx = 1;
		if (rangeModel != null) {
			if (panInDetailSpace)
				rangeModeldx = rangeModel.panActual(dx);
			else 
				rangeModel.setValue(rangeModel.getValue() - dx);
		}
		display.pan(0, dy);
		
		// next panning step starts here (if last pan had a result)
		if (rangeModeldx != 0) {
			xDown = x;
			yDown = y;
		}
		display.repaint();
	}
}
 
开发者ID:ieg-vienna,项目名称:TimeBench,代码行数:26,代码来源:RangePanControl.java


示例6: mousePressed

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see MouseListener#mousePressed(MouseEvent)
 */
public void mousePressed( MouseEvent e )
{
	if ( UILib.isButtonPressed( e, m_button ) ) {
		e.getComponent().setCursor( Cursor.getPredefinedCursor( Cursor.MOVE_CURSOR ) );
		m_xDown = e.getX();
		m_yDown = e.getY();
	}
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:12,代码来源:PanControl.java


示例7: mouseDragged

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see MouseMotionListener#mouseDragged(MouseEvent)
 */
public void mouseDragged( MouseEvent e )
{
	if ( UILib.isButtonPressed( e, m_button ) ) {
		Display display = (Display)e.getComponent();
		int x = e.getX(), y = e.getY();
		int dx = x - m_xDown, dy = y - m_yDown;
		display.pan( dx, dy );
		m_xDown = x;
		m_yDown = y;
		display.repaint();
	}
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:16,代码来源:PanControl.java


示例8: mouseReleased

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see MouseListener#mouseReleased(MouseEvent)
 */
public void mouseReleased( MouseEvent e )
{
	if ( UILib.isButtonPressed( e, m_button ) ) {
		e.getComponent().setCursor( Cursor.getDefaultCursor() );
		m_xDown = -1;
		m_yDown = -1;
	}
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:12,代码来源:PanControl.java


示例9: itemPressed

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see Control#itemPressed(VisualItem, MouseEvent)
 */
public void itemPressed( VisualItem item, MouseEvent e )
{
	if ( !UILib.isButtonPressed( e, button ) )
		return;
	if ( !( item instanceof NodeItem ) )
		return;

	Display d = (Display)e.getComponent();
	down = d.getAbsoluteCoordinate( e.getPoint(), down );
	wasFixed = item.isFixed();
	item.setFixed( true );
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:16,代码来源:SubtreeDragControl.java


示例10: itemReleased

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see Control#itemReleased(VisualItem, MouseEvent)
 */
public void itemReleased( VisualItem item, MouseEvent e )
{
	if ( !UILib.isButtonPressed( e, button ) )
		return;
	if ( !( item instanceof NodeItem ) )
		return;

	item.setFixed( wasFixed );
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:13,代码来源:SubtreeDragControl.java


示例11: mousePressed

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
 */
public void mousePressed(MouseEvent e) {
    if ( UILib.isButtonPressed(e, button) ) {
        Display display = (Display)e.getComponent();
        if (display.isTranformInProgress()) {
            return;
        }
        down = new Point2D.Float();
        current = null;
        display.getAbsoluteCoordinate(e.getPoint(), down);
    }
}
 
开发者ID:P15,项目名称:jailer,代码行数:15,代码来源:ZoomBoxControl.java


示例12: mouseMoved

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
    * Overridden to hide zoom box if no mouse button is pressed.
    */
   @Override
public void mouseMoved(MouseEvent e) {
   	if (!UILib.isButtonPressed(e, button) ) {
   		hideZoomBox();
       }
}
 
开发者ID:P15,项目名称:jailer,代码行数:10,代码来源:ZoomBoxControl.java


示例13: mouseReleased

import prefuse.util.ui.UILib; //导入依赖的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


示例14: mousePressed

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
 */
public void mousePressed(MouseEvent e) {
    if ( UILib.isButtonPressed(e, m_button) ) {
        e.getComponent().setCursor(
            Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
        m_xDown = e.getX();
        m_yDown = e.getY();
        m_DownValid = true;
    }
}
 
开发者ID:P15,项目名称:jailer,代码行数:13,代码来源:PanControl.java


示例15: mouseDragged

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
 */
public void mouseDragged(MouseEvent e) {
    if ( UILib.isButtonPressed(e, m_button) ) {
        Display display = (Display)e.getComponent();
        int x = e.getX(),   y = e.getY();
        int dx = x-m_xDown, dy = y-m_yDown;
        if (m_DownValid) {
        	display.pan(dx,dy);
        }
        m_xDown = x;
        m_yDown = y;
        m_DownValid = true;
        display.repaint();
    }
}
 
开发者ID:P15,项目名称:jailer,代码行数:18,代码来源:PanControl.java


示例16: mouseReleased

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
 */
public void mouseReleased(MouseEvent e) {
    if ( UILib.isButtonPressed(e, m_button) ) {
        e.getComponent().setCursor(Cursor.getDefaultCursor());
        m_xDown = -1;
        m_yDown = -1;
        m_DownValid = false;
    }
}
 
开发者ID:P15,项目名称:jailer,代码行数:12,代码来源:PanControl.java


示例17: main

import prefuse.util.ui.UILib; //导入依赖的package包/类
public static void main(String[] args) {
    UILib.setPlatformLookAndFeel();
    
    // create graphview
    String datafile = null;
    String label = "label";
    if ( args.length > 1 ) {
        datafile = args[0];
        label = args[1];
    }
    
    JFrame frame = demo(datafile, label);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:15,代码来源:GraphView.java


示例18: mousePressed

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
 */
public void mousePressed(MouseEvent e) {
	if (UILib.isButtonPressed(e, BUTTON)) {
		e.getComponent().setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
		xDown = e.getX();
		yDown = e.getY();
	}
}
 
开发者ID:ieg-vienna,项目名称:TimeBench,代码行数:11,代码来源:RangePanControl.java


示例19: mouseReleased

import prefuse.util.ui.UILib; //导入依赖的package包/类
/**
 * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
 */
public void mouseReleased(MouseEvent e) {
	if (UILib.isButtonPressed(e, BUTTON)) {
		e.getComponent().setCursor(Cursor.getDefaultCursor());
		xDown = -1;
		yDown = -1;
	}
}
 
开发者ID:ieg-vienna,项目名称:TimeBench,代码行数:11,代码来源:RangePanControl.java


示例20: pressed

import prefuse.util.ui.UILib; //导入依赖的package包/类
private void pressed(VisualItem item, MouseEvent e) {
    if (UILib.isButtonPressed(e, m_button)) {
        items.clear();
        if (item != null) {
            items.add(item);
            brushedItemAdded(item, e);
        }
    }
}
 
开发者ID:ieg-vienna,项目名称:ieg-prefuse,代码行数:10,代码来源:AbstractBrushControl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ListEvent类代码示例发布时间:2022-05-22
下一篇:
Java XMLTypeUtil类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap