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

Java PLine类代码示例

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

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



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

示例1: GraphLegend

import edu.umd.cs.piccolox.nodes.PLine; //导入依赖的package包/类
public GraphLegend() {

            // Create the background and main shape.
            _background = new PPath();
            _background.setStroke( LEGEND_BORDER_STROKE );
            _background.setStrokePaint( LEGEND_BORDER_COLOR );
            _background.setPaint( LEGEND_BACKGROUND_COLOR );
            addChild( _background );

            // Add the title.
            _title = new PText( NuclearPhysicsStrings.POTENTIAL_PROFILE_LEGEND_TITLE );
            _title.setFont( new PhetFont( Font.BOLD, 14 ) );
            _background.addChild( _title );

            // Add other text and graphics to the legend.
            _potentialEnergyLine = new PLine();
            _potentialEnergyLine.setStrokePaint( POTENTIAL_ENERGY_LINE_COLOR );
            _potentialEnergyLine.setStroke( ENERGY_LINE_STROKE );
            _background.addChild( _potentialEnergyLine );

            _potentialEnergyLabel = new PText( NuclearPhysicsStrings.POTENTIAL_PROFILE_POTENTIAL_ENERGY );
            _potentialEnergyLabel.setFont( new PhetFont( Font.PLAIN, 14 ) );
            _background.addChild( _potentialEnergyLabel );

            _totalEnergyLine = new PLine();
            _totalEnergyLine.setStrokePaint( TOTAL_ENERGY_LINE_COLOR );
            _totalEnergyLine.setStroke( ENERGY_LINE_STROKE );
            _background.addChild( _totalEnergyLine );

            _totalEnergyLabel = new PText( NuclearPhysicsStrings.POTENTIAL_PROFILE_TOTAL_ENERGY );
            _totalEnergyLabel.setFont( new PhetFont( Font.PLAIN, 14 ) );
            _background.addChild( _totalEnergyLabel );
        }
 
开发者ID:mleoking,项目名称:PhET,代码行数:34,代码来源:AlphaDecayEnergyChart.java


示例2: drawBorderLine

import edu.umd.cs.piccolox.nodes.PLine; //导入依赖的package包/类
private PLine drawBorderLine(double x,double y, double x2, double y2)
{
	PLine pline = new PLine();
	pline.addPoint(0, x, y);
	pline.addPoint(1, x2, y2);
	pline.setStroke(new BasicStroke( 1.0f ));
	pline.setStrokePaint( CGrid.item_border );
	return pline;
}
 
开发者ID:uci-sdcl,项目名称:Calico,代码行数:10,代码来源:CGridCell.java


示例3: drawDashedBorderLine

import edu.umd.cs.piccolox.nodes.PLine; //导入依赖的package包/类
private PLine drawDashedBorderLine(double x,double y, double x2, double y2)
{
	PLine pline = new PLine();
	pline.addPoint(0, x, y);
	pline.addPoint(1, x2, y2);
	float[] dashFloat = {5f, 10f};
	pline.setStroke(new BasicStroke( 5.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER, 10.0f, dashFloat ,0f));
	pline.setStrokePaint( CGrid.item_border );
	return pline;
}
 
开发者ID:uci-sdcl,项目名称:Calico,代码行数:11,代码来源:CGrid.java


示例4: drawBorderLine

import edu.umd.cs.piccolox.nodes.PLine; //导入依赖的package包/类
private PLine drawBorderLine(int x,int y, int x2, int y2)
{
	PLine pline = new PLine();
	pline.addPoint(0, x, y);
	pline.addPoint(1, x2, y2);
	pline.setStroke(new BasicStroke( 1.0f ));
	pline.setStrokePaint( CCanvasController.getActiveCanvasBackgroundColor() );
	return pline;
}
 
开发者ID:uci-sdcl,项目名称:Calico,代码行数:10,代码来源:CCanvas.java


示例5: addRenderingElements

import edu.umd.cs.piccolox.nodes.PLine; //导入依赖的package包/类
protected void addRenderingElements()
{
	if (arrowType == CArrow.TYPE_NORM_HEAD_AB || arrowType == CArrow.TYPE_NORM_HEAD_A)
	{
		arrowHeadA = null;

		int[] apoints = Geometry.createArrow(anchorB.getPoint().x, anchorB.getPoint().y, anchorA.getPoint().x, anchorA.getPoint().y,
				CalicoOptions.arrow.length, CalicoOptions.arrow.angle, CalicoOptions.arrow.inset);

		arrowHeadA = new PPath();
		arrowHeadA.moveTo((float) apoints[0], (float) apoints[1]);
		for (int i = 2; i < apoints.length; i = i + 2)
		{
			arrowHeadA.lineTo((float) apoints[i], (float) apoints[i + 1]);
		}
		arrowHeadA.setStroke(new BasicStroke(CalicoOptions.arrow.stroke_size));
		arrowHeadA.setStrokePaint(this.color);
		arrowHeadA.setPaint(this.color);

		//this.addChild(0, arrowHeadA);
		//CalicoDraw.addChildToNode(this, arrowHeadA, 0);
	}
	if (arrowType == CArrow.TYPE_NORM_HEAD_AB || arrowType == CArrow.TYPE_NORM_HEAD_B)
	{
		int[] bpoints = Geometry.createArrow(anchorA.getPoint().x, anchorA.getPoint().y, anchorB.getPoint().x, anchorB.getPoint().y,
				CalicoOptions.arrow.length, CalicoOptions.arrow.angle, CalicoOptions.arrow.inset);

		arrowHeadB = new PPath();
		arrowHeadB.moveTo((float) bpoints[0], (float) bpoints[1]);
		for (int i = 2; i < bpoints.length; i = i + 2)
		{
			arrowHeadB.lineTo((float) bpoints[i], (float) bpoints[i + 1]);
		}
		arrowHeadB.setStroke(new BasicStroke(CalicoOptions.arrow.stroke_size));
		arrowHeadB.setStrokePaint(this.color);
		arrowHeadB.setPaint(this.color);
		//this.addChild(0, arrowHeadB);
		//CalicoDraw.addChildToNode(this, arrowHeadB, 0);
	}

	arrowLine = new PLine();
	arrowLine.addPoint(0, anchorA.getPoint().x, anchorA.getPoint().y);
	arrowLine.addPoint(1, anchorB.getPoint().x, anchorB.getPoint().y);
	arrowLine.setStroke(new BasicStroke(CalicoOptions.arrow.stroke_size));
	arrowLine.setStrokePaint(this.color);
	arrowLine.setPaint(this.color);

	//this.addChild(0, arrowLine);
	//CalicoDraw.addChildToNode(this, arrowLine, 0);
}
 
开发者ID:uci-sdcl,项目名称:Calico,代码行数:51,代码来源:AbstractArrow.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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