Package org.locationtech.udig.tools.edit.enablement

Examples of org.locationtech.udig.tools.edit.enablement.WithinLegalLayerBoundsBehaviour


*/
public class PolygonTool extends AbstractEditTool {

    @Override
    protected void initEnablementBehaviours( List<EnablementBehaviour> helper ) {
        helper.add(new WithinLegalLayerBoundsBehaviour());
        helper.add(new ValidToolDetectionActivator(new Class[]{Geometry.class, Polygon.class, MultiPolygon.class}));
    }
View Full Code Here


        helper.done();
    }

    @Override
    protected void initEnablementBehaviours( List<EnablementBehaviour> helper ) {
        helper.add(new WithinLegalLayerBoundsBehaviour());
        helper.add(new ValidToolDetectionActivator(new Class[]{Geometry.class, LineString.class, MultiLineString.class}));
    }
View Full Code Here

* @since 1.1.0
*/
public class RectangleTool extends AbstractEditTool {
    @Override
    protected void initEnablementBehaviours( List<EnablementBehaviour> helper ) {
        helper.add(new WithinLegalLayerBoundsBehaviour());
        helper.add(new ValidToolDetectionActivator(new Class[]{Geometry.class, MultiLineString.class,
                LineString.class, LinearRing.class, Polygon.class, MultiPolygon.class}));
    }
View Full Code Here

    }

    @Test
    public void testLegal() throws Exception {
        handler.setCurrentState(EditState.ILLEGAL);
        WithinLegalLayerBoundsBehaviour behav=new WithinLegalLayerBoundsBehaviour();
        MapMouseEvent e=new MapMouseEvent(map.getRenderManager().getMapDisplay(), 0,0, 0,0,0);
       
        assertNull( behav.isEnabled(handler, e, EventType.MOVED) );
    }
View Full Code Here

    public void testIllegal() throws Exception {
        map.getViewportModelInternal().setBounds(-300, -250, -180, -140);
       
        System.out.println(map.getViewportModel().getBounds());
       
        WithinLegalLayerBoundsBehaviour behav=new WithinLegalLayerBoundsBehaviour();
        MapMouseEvent e=new MapMouseEvent(map.getRenderManager().getMapDisplay(), 0,0, 0,0,0);
        behav.isEnabled(handler, e, EventType.MOVED);
       
        assertNotNull( behav.isEnabled(handler, e, EventType.MOVED));
    }
View Full Code Here

  }

  @Override
  protected void initEnablementBehaviours(List<EnablementBehaviour> enablementBehaviours) {
    enablementBehaviours.add(new WithinLegalLayerBoundsBehaviour());
    enablementBehaviours.add(new ValidToolDetectionActivator(new Class[] {
        Geometry.class,
        Polygon.class,
        MultiPolygon.class,
        LineString.class,
View Full Code Here

     *
     * @param enablementBehaviours an empty list
     */
    @Override
    protected void initEnablementBehaviours( List<EnablementBehaviour> enablementBehaviours ) {
    enablementBehaviours.add(new WithinLegalLayerBoundsBehaviour());
    enablementBehaviours.add(new ValidToolDetectionActivator(new Class[] {
        Geometry.class,
        Polygon.class,
        MultiPolygon.class,
        LineString.class,
View Full Code Here

* @since 1.1.0
*/
public class SelectionTool extends AbstractEditTool {
    @Override
    protected void initEnablementBehaviours( List<EnablementBehaviour> helper ) {
        helper.add(new WithinLegalLayerBoundsBehaviour());
        helper.add(new ValidToolDetectionActivator(new Class[]{Geometry.class, LineString.class,
                MultiLineString.class, Polygon.class, MultiPolygon.class, Point.class,
                MultiPoint.class}));
    }
View Full Code Here

        helper.done();
    }

    @Override
    protected void initEnablementBehaviours( List<EnablementBehaviour> helper ) {
        helper.add(new WithinLegalLayerBoundsBehaviour());
        helper.add(new ValidToolDetectionActivator(new Class[]{Geometry.class, Polygon.class, MultiPolygon.class}));
    }
View Full Code Here

    public FreeHandTool() {
        super();
    }
    @Override
    protected void initEnablementBehaviours( List<EnablementBehaviour> helper ) {
        helper.add(new WithinLegalLayerBoundsBehaviour());
        helper.add(new ValidToolDetectionActivator(new Class[]{Geometry.class, Polygon.class, MultiPolygon.class, LineString.class, MultiLineString.class}));
   }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.tools.edit.enablement.WithinLegalLayerBoundsBehaviour

Copyright © 2018 www.massapicom. 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.