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


Java Ellipse类代码示例

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


Ellipse类属于org.eclipse.draw2d包,在下文中一共展示了Ellipse类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:21,代码来源:FinalStateFigure.java

示例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);
}
 
开发者ID:UBPL,项目名称:jive,代码行数:19,代码来源:MessageFigure.java

示例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);
}
 
开发者ID:UBPL,项目名称:jive,代码行数:19,代码来源:MessageFigure.java

示例4: createFigure

import org.eclipse.draw2d.Ellipse; //导入依赖的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);

}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:24,代码来源:TimerFigure.java

示例5: EllipseController

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
public EllipseController ( final SymbolController controller, final org.eclipse.scada.vi.model.Ellipse element, final ResourceManager manager )
{
    super ( controller, manager );
    final PrecisionRectangle rect = new PrecisionRectangle ();
    if ( element.getSize () != null )
    {
        rect.setPreciseSize ( element.getSize ().getWidth (), element.getSize ().getHeight () );
    }
    this.figure = new Ellipse () {
        @Override
        public void addNotify ()
        {
            super.addNotify ();
            start ();
        }

        @Override
        public void removeNotify ()
        {
            stop ();
            super.removeNotify ();
        }
    };
    this.figure.setBounds ( rect );

    controller.addElement ( element, this );

    applyCommon ( element );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:30,代码来源:EllipseController.java

示例6: createLayout

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
protected void createLayout () {
	setLayoutManager(new XYLayout());
	setBackgroundColor(Activator.getStartVertexImageColor());
	setOpaque(true);
	this.setBorder(null); 
	ellipse = new Ellipse();
	add(ellipse);
	name = new Label("");
	add(name);
	 
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:StartVertexFigure.java

示例7: createEllipse

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
/**
 * Creates the {@link Ellipse} of the main {@link IFigure}.
 * 
 * @return the {@link Ellipse} of the main {@link IFigure}
 */
private Ellipse createEllipse() {
	final Ellipse res = new Ellipse();

	res.setSize(SIZE, SIZE);
	res.setForegroundColor(ColorConstants.listBackground);

	return res;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:14,代码来源:PossibleStepEditPart.java

示例8: add

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
/**
 * @see org.eclipse.draw2d.Figure#add(org.eclipse.draw2d.IFigure,
 *      java.lang.Object, int)
 */
@Override
public void add(IFigure figure, Object constraint, int index) {
    if (!(figure instanceof Ellipse)) {
        super.add(figure, constraint, index);
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:ClassFigure.java

示例9: createPrimaryShape

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
protected Ellipse createPrimaryShape() {
	switch (resolveSemanticElement().getKind()) {
	case DEEP_HISTORY:
		return new DeepHistoryFigure();
	case SHALLOW_HISTORY:
		return new ShallowHistoryFigure();
	case INITIAL:
		return new InitialStateFigure();
	}
	throw new IllegalStateException();
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:12,代码来源:EntryEditPart.java

示例10: createFigure

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
/**
 * A simple filled circle taking up half the available space.
 * 
 * @see seg.jUCMNav.figures.PathNodeFigure#createFigure()
 */
protected void createFigure() {
    ellipse = new Ellipse();
    ellipse.setBounds(new Rectangle(preferredSize.width / 4, preferredSize.height / 4, DEFAULT_WIDTH / 2, DEFAULT_HEIGHT / 2));
    ellipse.setAntialias(GeneralPreferencePage.getAntialiasingPref());
    add(ellipse);
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:12,代码来源:EmptyPointFigure.java

示例11: createFigure

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
/**
 * An invisible ellipse two which to bind the anchors; not used otherwise.
 * 
 * @see seg.jUCMNav.figures.PathNodeFigure#createFigure()
 */
protected void createFigure() {
    ellipse = new Ellipse();
    ellipse.setBounds(new Rectangle(preferredSize.width / 4, preferredSize.height / 4, 0, 0)); // Size: 0 (invisible)
    ellipse.setAntialias(GeneralPreferencePage.getAntialiasingPref());
    add(ellipse);
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:12,代码来源:OrForkJoinFigure.java

示例12: createFigureForModel

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
/**
 * Return a IFigure depending on the instance of the current model element.
 * This allows this EditPart to be used for both sublasses of Shape.
 */
private IFigure createFigureForModel() {
	if (getModel() instanceof EllipticalShape) {
		return new Ellipse();
	} else if (getModel() instanceof RectangularShape) {
		return new RectangleFigure();
	} else {
		// if Shapes gets extended the conditions above must be updated
		throw new IllegalArgumentException();
	}
}
 
开发者ID:lunifera,项目名称:lunifera-sharky-m2m,代码行数:15,代码来源:ShapeEditPart.java

示例13: createFigure

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
@Override
protected IFigure createFigure() {
	IFigure f = new Ellipse();
	f.setBackgroundColor(ColorConstants.black);
	f.setSize(6, 6);
	return f;
}
 
开发者ID:SERESLab,项目名称:OnionUmlVisualization,代码行数:8,代码来源:HyperClassElementEditPart.java

示例14: createPrimaryShape

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
@Override
public Ellipse createPrimaryShape() {
	return new FinalStateFigure(getMapMode());
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:FinalStateEditPart.java

示例15: customizeFigure

import org.eclipse.draw2d.Ellipse; //导入依赖的package包/类
protected void customizeFigure() {
	this.ellipse = new Ellipse();
	add(this.ellipse, 0);
	this.ellipse.setBounds(getBounds());
	setSize(40, 40);
}
 
开发者ID:snakerflow,项目名称:snaker-designer,代码行数:7,代码来源:EllipseElementFigure.java


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