Java 类org.eclipse.draw2d.PolygonShape 实例源码

项目:neoscada    文件:PolygonController.java   
public PolygonController ( final SymbolController controller, final Polygon element, final ResourceManager manager )
{
    super ( controller, manager );

    this.figure = new PolygonShape () {
        @Override
        public void addNotify ()
        {
            super.addNotify ();
            start ();
        }

        @Override
        public void removeNotify ()
        {
            stop ();
            super.removeNotify ();
        }
    };

    final PointList points = new PointList ();
    for ( final Position pos : element.getPoints () )
    {
        final Point p = new PrecisionPoint ( pos.getX (), pos.getY () );
        points.addPoint ( p );
    }
    setPoints ( points );

    controller.addElement ( element, this );

    applyCommon ( element );
}
项目:neoscada    文件:PolygonController.java   
@Override
protected PolygonShape getPropertyFigure ()
{
    return this.figure;
}