Examples of SelectShapes


Examples of net.sf.latexdraw.actions.shape.SelectShapes

  }


  @Override
  public void initAction() {
    final SelectShapes selection = ActionsRegistry.INSTANCE.getAction(SelectShapes.class);
    final List<IShape> shapes    = selection.shapes();

    for(final IShape sh : shapes)
      action.addShape(sh);

    action.setDrawing(selection.drawing().get());
  }
View Full Code Here

Examples of net.sf.latexdraw.actions.shape.SelectShapes

  }


  @Override
  public boolean isConditionRespected() {
    final SelectShapes selection = ActionsRegistry.INSTANCE.getAction(SelectShapes.class);
    return selection!=null && !selection.shapes().isEmpty();
  }
View Full Code Here

Examples of net.sf.latexdraw.actions.shape.SelectShapes

   * Updates the widgets of the instrument.
   * @param executedAction The action currently executed. Can be null.
   * @since 3.0
   */
  protected void updateWidgets(final Action executedAction) {
    final SelectShapes sa = ActionsRegistry.INSTANCE.getAction(SelectShapes.class);
    final boolean validSelectAction = sa!=null && !sa.shapes().isEmpty();

    copyMenu.setEnabled(activated && validSelectAction);
    cutMenu.setEnabled(activated && copyMenu.isEnabled());
    pasteMenu.setEnabled(activated && (executedAction instanceof CopyShapes ||
              ActionsRegistry.INSTANCE.getAction(CopyShapes.class)!=null || ActionsRegistry.INSTANCE.getAction(CutShapes.class)!=null));
View Full Code Here

Examples of net.sf.latexdraw.actions.shape.SelectShapes

    super(ins, false, classAction, classInteraction);
  }

  @Override
  public void initAction() {
        final SelectShapes act = ActionsRegistry.INSTANCE.getAction(SelectShapes.class);
    if(act!=null)
      action.setSelection(act);
  }
View Full Code Here

Examples of net.sf.latexdraw.actions.shape.SelectShapes

    super(ins, CutShapes.class, MenuItemPressed.class);
  }

  @Override
  public boolean isConditionRespected() {
        final SelectShapes act = ActionsRegistry.INSTANCE.getAction(SelectShapes.class);
    return act != null && !act.shapes().isEmpty() && getInteraction().getMenuItem()==getInstrument().cutMenu;
  }
View Full Code Here

Examples of net.sf.latexdraw.actions.shape.SelectShapes

    super(ins, CopyShapes.class, MenuItemPressed.class);
  }

  @Override
  public boolean isConditionRespected() {
        final SelectShapes act = ActionsRegistry.INSTANCE.getAction(SelectShapes.class);
    final boolean okSelection = act != null && !act.shapes().isEmpty();
    return okSelection && getInteraction().getMenuItem()==getInstrument().copyMenu;
  }
View Full Code Here

Examples of net.sf.latexdraw.actions.shape.SelectShapes

      super(ins, false, SeparateShapes.class, ButtonPressed.class);
    }

    @Override
    public void initAction() {
      final SelectShapes selection = ActionsRegistry.INSTANCE.getAction(SelectShapes.class);
      final List<IShape> shapes    = selection.shapes();

      if(shapes.size()==1 && shapes.get(0) instanceof IGroup)
        action.setShape(shapes.get(0));

      action.setDrawing(instrument.pencil.canvas().getDrawing());
View Full Code Here

Examples of net.sf.latexdraw.actions.shape.SelectShapes

      super(ins, false, JoinShapes.class, ButtonPressed.class);
    }

    @Override
    public void initAction() {
      final SelectShapes selection = ActionsRegistry.INSTANCE.getAction(SelectShapes.class);
      final List<IShape> shapes    = selection.shapes();

      for(final IShape sh : shapes)
        action.addShape(sh);

      action.setDrawing(instrument.pencil.canvas().getDrawing());
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.