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


Java ShapeTransformer.inverseTransform方法代码示例

本文整理汇总了Java中edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer.inverseTransform方法的典型用法代码示例。如果您正苦于以下问题:Java ShapeTransformer.inverseTransform方法的具体用法?Java ShapeTransformer.inverseTransform怎么用?Java ShapeTransformer.inverseTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer的用法示例。


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

示例1: paint

import edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer; //导入方法依赖的package包/类
@Override
public void paint(Graphics g) {
	ShapeTransformer masterViewTransformer = master.getRenderContext()
			.getMultiLayerTransformer().getTransformer(Layer.VIEW);
	ShapeTransformer masterLayoutTransformer = master
			.getRenderContext().getMultiLayerTransformer()
			.getTransformer(Layer.LAYOUT);
	ShapeTransformer vvLayoutTransformer = vv.getRenderContext()
			.getMultiLayerTransformer().getTransformer(Layer.LAYOUT);

	// changed: bounds without offset
	Shape lens = new Rectangle(new Point(), master.getSize());

	lens = masterViewTransformer.inverseTransform(lens);
	lens = masterLayoutTransformer.inverseTransform(lens);
	lens = vvLayoutTransformer.transform(lens);
	Graphics2D g2d = (Graphics2D) g;
	Color old = g.getColor();
	Color lensColor = master.getBackground();
	vv.setBackground(lensColor.darker());
	g.setColor(lensColor);
	g2d.fill(lens);
	g.setColor(Color.gray);
	g2d.draw(lens);
	g.setColor(old);
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:27,代码来源:MySatelliteVisualizationViewer.java

示例2: paint

import edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer; //导入方法依赖的package包/类
@Override
public void paint(Graphics g) {
    ShapeTransformer masterViewTransformer = master.getRenderContext()
            .getMultiLayerTransformer().getTransformer(Layer.VIEW);
    ShapeTransformer masterLayoutTransformer = master
            .getRenderContext().getMultiLayerTransformer()
            .getTransformer(Layer.LAYOUT);
    ShapeTransformer vvLayoutTransformer = vv.getRenderContext()
            .getMultiLayerTransformer().getTransformer(Layer.LAYOUT);

    // changed: bounds without offset
    Shape lens = new Rectangle(new Point(), master.getSize());

    lens = masterViewTransformer.inverseTransform(lens);
    lens = masterLayoutTransformer.inverseTransform(lens);
    lens = vvLayoutTransformer.transform(lens);
    Graphics2D g2d = (Graphics2D) g;
    Color old = g.getColor();
    Color lensColor = master.getBackground();
    vv.setBackground(lensColor.darker());
    g.setColor(lensColor);
    g2d.fill(lens);
    g.setColor(Color.gray);
    g2d.draw(lens);
    g.setColor(old);
}
 
开发者ID:liruixpc11,项目名称:crucian,代码行数:27,代码来源:MySatelliteVisualizationViewer.java

示例3: paint

import edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer; //导入方法依赖的package包/类
public void paint(Graphics g) {
    ShapeTransformer masterViewTransformer = 
    	master.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.VIEW);
    ShapeTransformer masterLayoutTransformer = master.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT);
    ShapeTransformer vvLayoutTransformer = vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT);

    Shape lens = master.getBounds();
    lens = masterViewTransformer.inverseTransform(lens);
    lens = masterLayoutTransformer.inverseTransform(lens);
    lens = vvLayoutTransformer.transform(lens);
    Graphics2D g2d = (Graphics2D)g;
    Color old = g.getColor();
    Color lensColor = master.getBackground();
    vv.setBackground(lensColor.darker());
    g.setColor(lensColor);
    g2d.fill(lens);
    g.setColor(Color.gray);
    g2d.draw(lens);
    g.setColor(old);
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:21,代码来源:SatelliteVisualizationViewer.java

示例4: paint

import edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer; //导入方法依赖的package包/类
public void paint(Graphics g) {
    ShapeTransformer masterViewTransformer = master.getViewTransformer();
    ShapeTransformer masterLayoutTransformer = master.getLayoutTransformer();
    ShapeTransformer vvLayoutTransformer = vv.getLayoutTransformer();

    Shape lens = master.getBounds();
    lens = masterViewTransformer.inverseTransform(lens);
    lens = masterLayoutTransformer.inverseTransform(lens);
    lens = vvLayoutTransformer.transform(lens);
    Graphics2D g2d = (Graphics2D)g;
    Color old = g.getColor();
    Color lensColor = master.getBackground();
    vv.setBackground(lensColor.darker());
    g.setColor(lensColor);
    g2d.fill(lens);
    g.setColor(Color.gray);
    g2d.draw(lens);
    g.setColor(old);
}
 
开发者ID:markus1978,项目名称:clickwatch,代码行数:20,代码来源:SatelliteVisualizationViewer.java

示例5: paint

import edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer; //导入方法依赖的package包/类
public void paint(Graphics g) {
    ShapeTransformer masterViewTransformer = master.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.VIEW);
    ShapeTransformer masterLayoutTransformer = master.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT);
    ShapeTransformer vvLayoutTransformer = vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT);

    Rectangle rect = master.getBounds();
    GeneralPath path = new GeneralPath();
    path.moveTo(rect.x, rect.y);
    path.lineTo(rect.width,rect.y);
    path.lineTo(rect.width, rect.height);
    path.lineTo(rect.x, rect.height);
    path.lineTo(rect.x, rect.y);
    
    for(int i=0; i<=rect.width; i+=rect.width/10) {
    		path.moveTo(rect.x+i, rect.y);
    		path.lineTo(rect.x+i, rect.height);
    }
    for(int i=0; i<=rect.height; i+=rect.height/10) {
    		path.moveTo(rect.x, rect.y+i);
    		path.lineTo(rect.width, rect.y+i);
    }
    Shape lens = path;
    lens = masterViewTransformer.inverseTransform(lens);
    lens = masterLayoutTransformer.inverseTransform(lens);
    lens = vvLayoutTransformer.transform(lens);
    Graphics2D g2d = (Graphics2D)g;
    Color old = g.getColor();
    g.setColor(Color.cyan);
    g2d.draw(lens);
    
    path = new GeneralPath();
    path.moveTo((float)rect.getMinX(), (float)rect.getCenterY());
    path.lineTo((float)rect.getMaxX(), (float)rect.getCenterY());
    path.moveTo((float)rect.getCenterX(), (float)rect.getMinY());
    path.lineTo((float)rect.getCenterX(), (float)rect.getMaxY());
    Shape crosshairShape = path;
    crosshairShape = masterViewTransformer.inverseTransform(crosshairShape);
    crosshairShape = masterLayoutTransformer.inverseTransform(crosshairShape);
    crosshairShape = vvLayoutTransformer.transform(crosshairShape);
    g.setColor(Color.black);
    g2d.setStroke(new BasicStroke(3));
    g2d.draw(crosshairShape);
    
    g.setColor(old);
}
 
开发者ID:marcvanzee,项目名称:mdp-plan-revision,代码行数:46,代码来源:SatelliteViewDemo.java

示例6: paint

import edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer; //导入方法依赖的package包/类
public void paint(Graphics g) {
    ShapeTransformer masterViewTransformer = master.getViewTransformer();
    ShapeTransformer masterLayoutTransformer = master.getLayoutTransformer();
    ShapeTransformer vvLayoutTransformer = vv.getLayoutTransformer();

    Rectangle rect = master.getBounds();
    GeneralPath path = new GeneralPath();
    path.moveTo(rect.x, rect.y);
    path.lineTo(rect.width,rect.y);
    path.lineTo(rect.width, rect.height);
    path.lineTo(rect.x, rect.height);
    path.lineTo(rect.x, rect.y);
    
    for(int i=0; i<=rect.width; i+=rect.width/10) {
    		path.moveTo(rect.x+i, rect.y);
    		path.lineTo(rect.x+i, rect.height);
    }
    for(int i=0; i<=rect.height; i+=rect.height/10) {
    		path.moveTo(rect.x, rect.y+i);
    		path.lineTo(rect.width, rect.y+i);
    }
    Shape lens = path;
    lens = masterViewTransformer.inverseTransform(lens);
    lens = masterLayoutTransformer.inverseTransform(lens);
    lens = vvLayoutTransformer.transform(lens);
    Graphics2D g2d = (Graphics2D)g;
    Color old = g.getColor();
    g.setColor(Color.cyan);
    g2d.draw(lens);
    
    path = new GeneralPath();
    path.moveTo((float)rect.getMinX(), (float)rect.getCenterY());
    path.lineTo((float)rect.getMaxX(), (float)rect.getCenterY());
    path.moveTo((float)rect.getCenterX(), (float)rect.getMinY());
    path.lineTo((float)rect.getCenterX(), (float)rect.getMaxY());
    Shape crosshairShape = path;
    crosshairShape = masterViewTransformer.inverseTransform(crosshairShape);
    crosshairShape = masterLayoutTransformer.inverseTransform(crosshairShape);
    crosshairShape = vvLayoutTransformer.transform(crosshairShape);
    g.setColor(Color.black);
    g2d.setStroke(new BasicStroke(3));
    g2d.draw(crosshairShape);
    
    g.setColor(old);
}
 
开发者ID:markus1978,项目名称:clickwatch,代码行数:46,代码来源:SatelliteViewDemo.java


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