Examples of StandardAction


Examples of ca.nengo.ui.lib.actions.StandardAction

    if ((myTermination != null) && (myTermination instanceof Interactable)) {
      return ((Interactable) myTermination).getContextMenu();
    }

    PopupMenuBuilder menu = new PopupMenuBuilder("Line End");
    menu.addAction(new StandardAction("Remove") {

      private static final long serialVersionUID = 1L;

      @Override
      protected void action() throws ActionException {
View Full Code Here

Examples of ca.nengo.ui.lib.actions.StandardAction

    super.constructMenu(menu);

    menu.addSection("NEFEnsemble");
    MenuBuilder plotMenu = menu.addSubMenu("Plot");

    plotMenu.addAction(new StandardAction("Constant Rate Responses") {
      private static final long serialVersionUID = 1L;

      @Override
      protected void action() {
        Plotter.plot(getModel());
View Full Code Here

Examples of ca.nengo.ui.lib.actions.StandardAction

    @Override
    protected void updateEditMenu() {
        super.updateEditMenu();

        StandardAction copyAction = null;
        StandardAction cutAction = null;
        StandardAction pasteAction = null;
        StandardAction removeAction = null;

        Collection<WorldObject> selectedObjects = SelectionHandler.getActiveSelection();

        if (selectedObjects != null && selectedObjects.size() > 0) {
            ArrayList<UINeoNode> selectedArray = new ArrayList<UINeoNode>();
            ArrayList<ModelObject> selectedModelObjects = new ArrayList<ModelObject>();
            for (WorldObject obj : selectedObjects) {
                if (obj instanceof UINeoNode) {
                    selectedArray.add((UINeoNode)obj);
                }
                if (obj instanceof ModelObject) {
                    selectedModelObjects.add((ModelObject)obj);
                }
            }

            cutAction = new CutAction("Cut", selectedArray);
            copyAction = new CopyAction("Copy", selectedArray);
            removeAction = new RemoveModelAction("Remove", selectedModelObjects);
        } else {
            cutAction = new DisabledAction("Cut", "No object selected");
            copyAction = new DisabledAction("Copy", "No object selected");
            removeAction = new DisabledAction("Remove", "No objects to remove");
        }

        if (getClipboard().hasContents()) {
            pasteAction = new StandardAction("Paste") {
                private static final long serialVersionUID = 1L;
                @Override
                protected void action() {
                    // look for the active mouse handler. If it exists, it should contain
                    // the current mouse position (from the mousemoved event), so use this
View Full Code Here

Examples of ca.nengo.ui.lib.actions.StandardAction

    @Override
    protected void updateRunMenu() {
        super.updateRunMenu();

        StandardAction simulateAction = null;
        StandardAction interactivePlotsAction = null;
        UINeoNode node = null;
        WorldObject selectedObj = SelectionHandler.getActiveObject();

        if (selectedObj != null) {
            if (selectedObj instanceof UINeoNode) {
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.