本文整理汇总了Java中org.eclipse.draw2d.Polyline.setAntialias方法的典型用法代码示例。如果您正苦于以下问题:Java Polyline.setAntialias方法的具体用法?Java Polyline.setAntialias怎么用?Java Polyline.setAntialias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.Polyline
的用法示例。
在下文中一共展示了Polyline.setAntialias方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFigure
import org.eclipse.draw2d.Polyline; //导入方法依赖的package包/类
/**
* Creates a filled circle containing an L like segment to simulate a clock.
*
* @see seg.jUCMNav.figures.PathNodeFigure#createFigure()
*/
protected void createFigure() {
ellipse = new Ellipse();
// we're making it larger than the empty point.
ellipse.setBounds(new Rectangle(preferredSize.width / 8, preferredSize.height / 8, DEFAULT_WIDTH * 3 / 4, DEFAULT_HEIGHT * 3 / 4));
ellipse.setAntialias(GeneralPreferencePage.getAntialiasingPref());
poly = new Polyline();
poly.addPoint(new Point(DEFAULT_WIDTH / 2, preferredSize.height / 8));
poly.addPoint(new Point(DEFAULT_WIDTH / 2, DEFAULT_HEIGHT / 2));
poly.addPoint(new Point(preferredSize.width * 7 / 8, DEFAULT_HEIGHT / 2));
poly.setAntialias(GeneralPreferencePage.getAntialiasingPref());
ellipse.add(poly);
ellipse.setLineWidth(2);
ellipse.setAntialias(GeneralPreferencePage.getAntialiasingPref());
poly.setLineWidth(2);
add(ellipse);
}
示例2: createFigure
import org.eclipse.draw2d.Polyline; //导入方法依赖的package包/类
/**
* A simple line, as wide as the bounds.
*
* @see seg.jUCMNav.figures.PathNodeFigure#createFigure()
*/
protected void createFigure() {
mainFigure = new Polygon();
edges = new PointList();
int barWidth = 6 / 2;
edges.addPoint(DEFAULT_WIDTH / 2 - barWidth, 1);
edges.addPoint(DEFAULT_WIDTH / 2 - barWidth, DEFAULT_HEIGHT-1);
edges.addPoint(DEFAULT_WIDTH / 2 + barWidth, DEFAULT_HEIGHT-1);
edges.addPoint(DEFAULT_WIDTH / 2 + barWidth, 1);
edges.addPoint(DEFAULT_WIDTH / 2 - barWidth, 1);
mainFigure.setLineWidth(2);
mainFigure.setPoints(edges);
mainFigure.setAntialias(GeneralPreferencePage.getAntialiasingPref());
mainFigure.setForegroundColor(ColorManager.GRAY);
mainFigure.setBackgroundColor(ColorManager.LINE);
mainFigure.setFill(true);
add(mainFigure);
line = new Polyline();
linePts = new PointList();
linePts.addPoint(new Point(DEFAULT_WIDTH / 2 - barWidth+1, 0));
linePts.addPoint(new Point(DEFAULT_WIDTH / 2 + barWidth-1, DEFAULT_HEIGHT - 1));
line.setPoints(linePts);
line.setLineWidth(2);
line.setAntialias(GeneralPreferencePage.getAntialiasingPref());
line.setForegroundColor(ColorManager.WHITE);
add(line);
}
示例3: createFigure
import org.eclipse.draw2d.Polyline; //导入方法依赖的package包/类
/**
* Is a Z like figure determined by the three static constants, WIDTH, HEIGHT and DELTA
*
*/
protected void createFigure() {
poly = new Polyline();
poly.setLineWidth(3);
poly.addPoint(getInitial());
poly.addPoint(new Point(-WIDTH / 2, HEIGHT / 2));
poly.addPoint(new Point(WIDTH / 2, -HEIGHT / 2));
poly.addPoint(new Point(WIDTH / 2, -DELTA));
poly.setAntialias(GeneralPreferencePage.getAntialiasingPref());
add(poly);
}
示例4: createFigure
import org.eclipse.draw2d.Polyline; //导入方法依赖的package包/类
/**
* An ellipse that fills 2/3 of the area.
*
* @see seg.jUCMNav.figures.PathNodeFigure#createFigure()
*/
protected void createFigure() {
int width = preferredSize.width;
int height = preferredSize.height;
ellipse = new Ellipse();
ellipse.setBounds(new Rectangle(13, 13, 16, 16));
ellipse.setBackgroundColor(ColorManager.LINE);
ellipse.setAntialias(GeneralPreferencePage.getAntialiasingPref());
add(ellipse);
// create the text inside the main figure
flowPage = new FlowPage();
stubTypeText = new TextFlow();
stubTypeText.setLayoutManager(new SimpleTextLayout(stubTypeText));
// TODO CONCERNS: should use default font?
stubTypeText.setFont(new Font(null, "Verdana", 12, SWT.BOLD)); //$NON-NLS-1$
stubTypeText.setText("F"); //$NON-NLS-1$
stubTypeText.setForegroundColor(ColorManager.WHITE);
flowPage.add(stubTypeText);
// TODO CONCERNS: depends on font size!
flowPage.setBounds(new Rectangle(16, 12, 20, 20));
flowPage.setVisible(false);
add(flowPage);
// The lightning for an abort failure point
PointList pts = new PointList();
pts.addPoint(23, 27);
pts.addPoint(27, 33);
pts.addPoint(20, 32);
pts.addPoint(28, 42);
pts.addPoint(28, 37);
pts.addPoint(28, 42);
pts.addPoint(23, 41);
lightning = new Polyline();
lightning.setLineWidth(2);
lightning.setAntialias(GeneralPreferencePage.getAntialiasingPref());
lightning.setPoints(pts);
lightning.setVisible(false);
add(lightning);
bar = new Polyline();
bar.addPoint(new Point(15, 15));
bar.addPoint(new Point(27, 27));
bar.setLineWidth(3);
bar.setVisible(false);
bar.setForegroundColor(ColorManager.WHITE);
add(bar);
}
示例5: createFigure
import org.eclipse.draw2d.Polyline; //导入方法依赖的package包/类
@Override
protected void createFigure() {
int width = getPreferredSize().width;
int height = getPreferredSize().height;
lines = new Vector();
rects = new Vector();
rect1 = new Polyline();
line1 = new PointList();
line1.addPoint(new Point((width - 20) / 2, 18));
line1.addPoint(new Point((width - 20) / 2 + 20, 18));
rect1.setPoints(line1);
rect1.setBackgroundColor(ColorManager.BLACK);
rect1.setLineWidth(2);
rect1.setAntialias(GeneralPreferencePage.getAntialiasingPref());
lines.add(line1);
rects.add(rect1);
add(rect1);
rect2 = new Polyline();
line2 = new PointList();
line2.addPoint(new Point((width - 14) / 2, 13));
line2.addPoint(new Point((width - 14) / 2 + 14, 13));
rect2.setPoints(line2);
rect2.setBackgroundColor(ColorManager.BLACK);
rect2.setLineWidth(2);
rect2.setAntialias(GeneralPreferencePage.getAntialiasingPref());
lines.add(line2);
rects.add(rect2);
add(rect2);
rect3 = new Polyline();
line3 = new PointList();
line3.addPoint(new Point((width - 8) / 2, 8));
line3.addPoint(new Point((width - 8) / 2 + 8, 8));
rect3.setPoints(line3);
rect3.setBackgroundColor(ColorManager.BLACK);
rect3.setLineWidth(2);
rect3.setAntialias(GeneralPreferencePage.getAntialiasingPref());
lines.add(line3);
rects.add(rect3);
add(rect3);
}