Examples of Selection


Examples of org.jamesii.asf.database.hibernate.Selection

  }

  @Override
  protected Selection getEntity(String name) throws Exception {

    Selection sel = new Selection();
    TestRuntimeConfiguration trc = new TestRuntimeConfiguration(session);
    sel.setRuntimeConfiguration(trc
        .createEntity("runtime config for selection " + name));

    TestSelector ts = new TestSelector(session);
    sel.setSelector(ts.createEntity("selectorfor selection " + name));

    Set<IFeature> features = new HashSet<>();
    TestFeatureValue tfv = new TestFeatureValue(false);
    tfv.setUp();
    for (int i = 0; i < NUM_OF_FEATURES; i++) {
      features.add(tfv.createEntity("feature value for selection " + name));
    }
    tfv.tearDown();

    sel.setFeatures(features);

    return sel;
  }
View Full Code Here

Examples of org.jitterbit.ui.selection.Selection

        }
    }

    @Override
    public final IndexedSelection getSelection() {
        Selection sel = super.getSelection();
        return (sel == null) ? IndexedSelection.EMPTY : (IndexedSelection) sel;
    }
View Full Code Here

Examples of org.joshy.sketch.canvas.Selection

        propsPanel.add(new HFlexBox()
            .add(new Label("name"))
            .add(all_name));
        EventBus.getSystem().addListener(all_name, ActionEvent.Action, new Callback<Event>() {
             public void call(Event event) throws Exception {
                 Selection sel = ctx.getSelection();
                 if (sel.size() == 1) {
                     SNode n = sel.firstItem();
                     n.setId(all_name.getText());
                 }
             }
         });

        //cache
        //name
        all_cache = new Checkbox("cache");
        EventBus.getSystem().addListener(all_cache, ActionEvent.Action, new Callback<Event>() {
            public void call(Event event) throws Exception {
                Selection sel = ctx.getSelection();
                if (sel.size() == 1) {
                    SNode n = sel.firstItem();
                    n.setBooleanProperty("com.joshondesign.amino.nodecache",all_cache.isSelected());
                }
            }
        });
        propsPanel.add(all_cache);


        //cache as png image
        all_cache_image = new Checkbox("cache as image");
        EventBus.getSystem().addListener(all_cache_image, ActionEvent.Action, new Callback<Event>() {
            public void call(Event event) throws Exception {
                Selection sel = ctx.getSelection();
                if (sel.size() == 1) {
                    SNode n = sel.firstItem();
                    n.setBooleanProperty("com.joshondesign.amino.nodecacheimage",all_cache_image.isSelected());
                }
            }
        });
        propsPanel.add(all_cache_image);

        //text
        //cache as dynamic bitmap text
        bitmap_text = new Checkbox("use bitmap text");
        EventBus.getSystem().addListener(bitmap_text, ActionEvent.Action, new Callback<Event>() {
            public void call(Event event) throws Exception {
                Selection sel = ctx.getSelection();
                if (sel.size() == 1) {
                    SNode n = sel.firstItem();
                    n.setBooleanProperty("com.joshondesign.amino.bitmaptext",bitmap_text.isSelected());
                }
            }
        });
        propsPanel.add(bitmap_text);
View Full Code Here

Examples of org.joshy.sketch.canvas.Selection

    }

    @Override
    public void execute() throws Exception {
        Selection sel = context.getSelection();
        if(sel.isEmpty()) return;
        if(sel.size() > 1) return;
        SNode node = sel.firstItem();

        context.getDocument().getCurrentPage().remove(node);
        STransformNode trans = new STransformNode(node,context);
        context.getDocument().getCurrentPage().add(trans);

        sel.setSelectedNode(trans);
        context.redraw();
    }
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.Selection

                handler.getCurrentShape().contains(Point.valueOf(e.x, e.y), true) );
    }

    private boolean allVerticesSelectedAndWithinGeom( EditToolHandler handler ) {
        PrimitiveShape currentShape = handler.getCurrentShape();
        Selection selection = handler.getCurrentGeom().getEditBlackboard().getSelection();

        Point dragStarted = handler.getMouseTracker().getDragStarted();
        if( dragStarted==null )
            return false;
        for( Point point : currentShape ) {
            if( ! selection.contains(point) )
                return false;
        }
       
        return currentShape.contains(dragStarted, true);
       
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.Selection

            geoms= editBlackboard.getGeoms(point.getX(),point.getY());
        else{
            EditPlugin.trace(EditPlugin.SELECTION, "VertexSelectorBehaviour: Not over vertex (" //$NON-NLS-1$
                    +e.x+","+e.y+")", null); //$NON-NLS-1$ //$NON-NLS-2$
        }
        Selection selection = editBlackboard.getSelection();
        List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();
        if( e.isShiftDown() ){
            if( geoms!=null && geoms.contains(handler.getCurrentGeom())
                    && !editBlackboard.getSelection().contains(point) ){
                commands.add( new SelectVertexCommand(editBlackboard, point, Type.ADD ) );
            }
        } else if (e.isControlDown()) {
            if (geoms != null && geoms.contains(handler.getCurrentGeom())) {
                if( selection.contains(point) )
                    commands.add( new SelectVertexCommand(editBlackboard, point, Type.REMOVE) );
                else{
                    commands.add( new SelectVertexCommand(editBlackboard, point, Type.ADD) );                   
                }
            }
        }else{
            if( selection.size()!=1 || !selection.contains(point) )
                commands.addnew SelectVertexCommand(editBlackboard, point, Type.SET) );
        }
        if( geoms!=null && geoms.contains(handler.getCurrentGeom()) ){
            if( handler.getCurrentState()==EditState.NONE){
                commands.add( new SetEditStateCommand( handler, EditState.MODIFYING ) );
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.Selection

        else{
            EditPlugin.trace(EditPlugin.SELECTION, "VertexSelectorBehaviour: Not over vertex (" //$NON-NLS-1$
                    +e.x+","+e.y+")", null); //$NON-NLS-1$ //$NON-NLS-2$
            return null;
        }
        Selection selection = editBlackboard.getSelection();
        List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();

        if( !selection.contains(point) )
            commands.addnew SelectVertexCommand(editBlackboard, point, Type.SET) );

        if( geoms!=null && geoms.contains(handler.getCurrentGeom()) ){
            if( handler.getCurrentState()==EditState.NONE){
                commands.add( new SetEditStateCommand( handler, EditState.MODIFYING ) );
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.Selection

    }

    public void run( IProgressMonitor monitor ) throws Exception {
        EditBlackboard blackboard = handler.getEditBlackboard(handler.getEditLayer());
        blackboard.startBatchingEvents();
        Selection selection = blackboard.getSelection();
        undoData = new ArrayList<Bag>();
        EditState oldState = handler.getCurrentState();
        try {
            handler.setCurrentState(EditState.BUSY);
            DeleteVertexAnimation deleteVertexAnimation=null;
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.Selection

    public void run( IProgressMonitor monitor ) throws Exception {
        board.startBatchingEvents();
        PrimitiveShape primitiveShape = shape.get(new SubProgressMonitor(monitor, 1));
        board.insertCoordinate( toAdd, index, primitiveShape);
        oldSelection=new Selection(board.getSelection());
        oldSelection.disconnect();
        board.selectionClear();
        board.selectionAdd(point);
        board.fireBatchedEvents();
        if ( getMap()!=null )
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.Selection

        this( editBlackboard2, Collections.singleton(point), type);
    }

    public void run( IProgressMonitor monitor ) throws Exception {
        editBlackboard.startBatchingEvents();
        oldPoints= new Selection(editBlackboard.getSelection());
        oldPoints.disconnect();
        if( type==Type.ADD)
            editBlackboard.selectionAddAll(points);
        else if( type==Type.SET ){
                editBlackboard.selectionClear();
View Full Code Here
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.