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


Java Graphics.fillPath方法代码示例

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


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

示例1: paintLeftArrow

import org.eclipse.draw2d.Graphics; //导入方法依赖的package包/类
protected void paintLeftArrow(Graphics graphics){
	int width = pagingControlHeight / 4;
	Rectangle r = getBounds().getCopy();
	Point start = new Point(r.getRight().x - 10, r.getCenter().y);
	Path triangle = new Path(null);
	triangle.moveTo(start.x, start.y);
	triangle.lineTo(start.x - width, start.y - pagingControlHeight/2);
	triangle.lineTo(start.x - width, start.y + pagingControlHeight/2);
	graphics.fillPath(triangle);
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:11,代码来源:ScrollableViewFigureAndroid.java

示例2: paintRightArrow

import org.eclipse.draw2d.Graphics; //导入方法依赖的package包/类
protected void paintRightArrow(Graphics graphics){
	int width = pagingControlHeight / 4;
	Rectangle r = getBounds().getCopy();
	Point start = new Point(r.x + 10, r.getCenter().y);
	Path triangle = new Path(null);
	triangle.moveTo(start.x, start.y);
	triangle.lineTo(start.x + width, start.y - pagingControlHeight/2);
	triangle.lineTo(start.x + width, start.y + pagingControlHeight/2);
	graphics.fillPath(triangle);
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:11,代码来源:ScrollableViewFigureAndroid.java

示例3: paintButton

import org.eclipse.draw2d.Graphics; //导入方法依赖的package包/类
protected void paintButton(Graphics graphics) {
	graphics.setBackgroundColor(ColorConstants.black);
	Rectangle bounds = getBounds().getCopy();
	Path path = new Path(null);
	path.moveTo(bounds.right() - BUTTON_SIZE.width / 2,
			bounds.getCenter().y - BUTTON_SIZE.height / 2);
	path.lineTo(bounds.right()- 3*BUTTON_SIZE.width / 2,
			bounds.getCenter().y - BUTTON_SIZE.height / 2);
	path.lineTo(bounds.right() - BUTTON_SIZE.width,
			bounds.getCenter().y + BUTTON_SIZE.height / 2);
	graphics.fillPath(path);
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:13,代码来源:PickerFigure.java

示例4: paintFigure

import org.eclipse.draw2d.Graphics; //导入方法依赖的package包/类
@Override
protected void paintFigure(Graphics graphics) {
	super.paintFigure(graphics);
	Rectangle bounds = getBounds();
	graphics.setBackgroundColor(headerColor);
	float bw =  getBorder().getBorderWidth();
	if (hasHeader()){
		PrecisionRectangle top = new PrecisionRectangle();
		top.setX(bounds.x + bw);
		top.setY(bounds.y + bw);
		top.setWidth(bounds.width - 2*bw);
		top.setHeight(getTitleHeight());
		//Path topPath = Drawer.getPartlyRoundedRectangle(top, getBorder().getBorderRadius() - bw, true, true, false, false);
		Path topPath = Drawer.getTopRoundedRectangle(top, getBorder().getActualBorderRadius(getBounds()) - bw);
		graphics.fillPath(topPath);
	}
	if (footerTitle != null || hasFooterView){
		PrecisionRectangle bottom = new PrecisionRectangle();
		bottom.setX(bounds.x + bw);
		bottom.setY(bounds.bottom() - bw - getTitleHeight());
		bottom.setWidth(bounds.width - 2*bw);
		bottom.setHeight(getTitleHeight());
		//Path bottomPath = Drawer.getPartlyRoundedRectangle(bottom, getBorder().getBorderRadius() - bw, false, false, true, true);
		Path bottomPath = Drawer.getBottomRoundedRectangle(bottom, getBorder().getActualBorderRadius(getBounds()) - bw);
		graphics.fillPath(bottomPath);
	}
	graphics.restoreState();
	this.paintString(graphics, headerTitle, true);
	this.paintString(graphics, footerTitle, false);
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:31,代码来源:TableViewFigure.java


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