Package org.jbpm.ui.common.figure

Source Code of org.jbpm.ui.common.figure.EndStateFigure

package org.jbpm.ui.common.figure;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Ellipse;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.GridData;
import org.eclipse.draw2d.geometry.Rectangle;
import org.jbpm.ui.SharedImages;

public class EndStateFigure extends TerminalFigure {
 
  @Override
  public void init(boolean bpmnNotation) {
    super.init(bpmnNotation);
        if (!bpmnNotation) {
            addEllipse();
            addLabel();
        }
  }

    @Override
    protected void addEllipse() {
        ellipse.setBounds(new Rectangle(3, 3, 16, 16));

        Ellipse inner = new Ellipse();
        inner.setBounds(new Rectangle(6, 6, 10, 10));
        inner.setBackgroundColor(ColorConstants.black);
        ellipse.add(inner);

        Ellipse outer = new Ellipse();
        outer.setSize(22, 22);
        outer.setOutline(false);
        outer.add(ellipse);

        add(outer, new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    }

    @Override
    protected void paintBPMNFigure(Graphics g, Rectangle r) {
        g.drawImage(SharedImages.getImage("icons/bpmn/graph/end.png"), r.getLocation());
    }

}
TOP

Related Classes of org.jbpm.ui.common.figure.EndStateFigure

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.