Package org.joshy.sketch.actions

Examples of org.joshy.sketch.actions.SAction


        items = new ArrayList<SelectMoveTool.ActionItem>();
        setModel(mdl);
        setCallback(new Callback<ChangedEvent>() {
            public void call(ChangedEvent event) throws Exception {
                int i = ((Integer)event.getValue());
                SAction action = getAction(i);
                action.execute();
            }
        });

    }
View Full Code Here


        if(listView.getModel().size() <= listView.getSelectedIndex()) return;
       
        final SNode shape = listView.getModel().get(listView.getSelectedIndex());
        contextMenu = new ContextMenu();
        contextMenu.addActions(
            new SAction(){
                @Override public String getDisplayName() { return "Delete"; }
                @Override
                public void execute() {
                    symbolManager.remove(shape);
                }
            },
            new SAction(){
                @Override public String getDisplayName() { return "Rename"; }
                @Override
                public void execute() {
                    u.p("renaming");
                    String name = shape.getStringProperty("symbolName");
View Full Code Here

            if(mode.isAlpha()) {
                name = "[ALPHA] " + name;
            }
            grid.addControl(new Button(name).onClicked(new Callback<ActionEvent>() {
                public void call(ActionEvent event) throws Exception {
                    SAction action = mode.getNewDocAction(main);
                    action.execute();
                    stage.hide();
                }
            }).addCSSClass("newdocbutton"));
            count++;
            if(count%2==0) {
View Full Code Here

        fontItalicButton = new Togglebutton("I");
        fontItalicButton.onClicked(fontItalicCallback);
        fontProperties.add(fontItalicButton);

        fontAlignLeft = new TIB("cr22-action-text_left.png", new SAction(){
            @Override
            public void execute() throws Exception {
                if(manager.propMan.isClassAvailable(SText.class)) {
                    manager.propMan.getProperty("halign").setValue(SText.HAlign.Left);
                }
            }
        });
        fontAlignHCenter = new TIB("cr22-action-text_center.png", new SAction(){
            @Override
            public void execute() throws Exception {
                if(manager.propMan.isClassAvailable(SText.class)) {
                    manager.propMan.getProperty("halign").setValue(SText.HAlign.Center);
                }
            }
        });
        fontAlignRight = new TIB("cr22-action-text_right.png", new SAction(){
            @Override
            public void execute() throws Exception {
                if(manager.propMan.isClassAvailable(SText.class)) {
                    manager.propMan.getProperty("halign").setValue(SText.HAlign.Right);
                }
View Full Code Here

TOP

Related Classes of org.joshy.sketch.actions.SAction

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.