本文整理汇总了Java中org.eclipse.draw2d.Ellipse.setBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:Java Ellipse.setBackgroundColor方法的具体用法?Java Ellipse.setBackgroundColor怎么用?Java Ellipse.setBackgroundColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.Ellipse
的用法示例。
在下文中一共展示了Ellipse.setBackgroundColor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createContents
import org.eclipse.draw2d.Ellipse; //导入方法依赖的package包/类
protected void createContents() {
int size = mapMode.DPtoLP(2);
this.setBorder(new MarginBorder(size, size, size, size));
Ellipse whiteCircle = new Ellipse();
whiteCircle.setOutline(false);
whiteCircle.setLineWidth(1);
whiteCircle.setBackgroundColor(ColorConstants.white);
size = mapMode.DPtoLP(3);
whiteCircle.setBorder(new MarginBorder(size, size, size, size));
BorderLayout layout = new BorderLayout();
whiteCircle.setLayoutManager(layout);
Object data = BorderLayout.CENTER;
this.add(whiteCircle, data);
Ellipse blackCircle = new Ellipse();
blackCircle.setOutline(false);
blackCircle.setLineWidth(mapMode.DPtoLP(1));
blackCircle.setBackgroundColor(ColorConstants.black);
data = BorderLayout.CENTER;
whiteCircle.add(blackCircle, data);
}
示例2: FoundMessageFigure
import org.eclipse.draw2d.Ellipse; //导入方法依赖的package包/类
FoundMessageFigure(final boolean isTransparent)
{
super(isTransparent);
final Ellipse circle = new Ellipse();
circle.setBackgroundColor(ColorConstants.lightGray);
circle.setLineWidth(1);
final Rectangle bounds = Rectangle.SINGLETON;
final int diameter = PreferencesPlugin.getDefault().eventHeight();
bounds.x = 0;
bounds.y = 0;
bounds.width = diameter;
bounds.height = diameter;
circle.setBounds(bounds);
final ConnectionEndpointLocator locator = new ConnectionEndpointLocator(this, false);
locator.setUDistance(0);
locator.setVDistance(0);
add(circle, locator);
}
示例3: LostMessageFigure
import org.eclipse.draw2d.Ellipse; //导入方法依赖的package包/类
LostMessageFigure(final boolean isTransparent, final boolean isException)
{
super(isTransparent, isException);
final Ellipse circle = new Ellipse();
circle.setBackgroundColor(ColorConstants.lightGray);
circle.setLineWidth(1);
final Rectangle bounds = Rectangle.SINGLETON;
final int diameter = PreferencesPlugin.getDefault().eventHeight();
bounds.x = 0;
bounds.y = 0;
bounds.width = diameter;
bounds.height = diameter;
circle.setBounds(bounds);
final ConnectionEndpointLocator locator = new ConnectionEndpointLocator(this, true);
locator.setUDistance(0);
locator.setVDistance(0);
add(circle, locator);
}
示例4: createFigure
import org.eclipse.draw2d.Ellipse; //导入方法依赖的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);
}