Package org.joshy.gfx.node.control

Examples of org.joshy.gfx.node.control.Togglebutton


        handles.add(new VHandle(shape,shape.getLeft()+bounds.getX(),0, PositionHandle.Position.Left));
        handles.add(new VHandle(shape,shape.getRight()+bounds.getX(),0, PositionHandle.Position.Right));
        handles.add(new VHandle(shape,0,shape.getTop()+bounds.getY(), PositionHandle.Position.Top));
        handles.add(new VHandle(shape,0,shape.getBottom()+bounds.getY(), PositionHandle.Position.Bottom));

        hlocked = new Togglebutton("h locked");
        hlocked.setSelected(shape.isHLocked());
        hlocked.onClicked(new Callback<ActionEvent>(){
            public void call(ActionEvent event) {
                shape.setHLocked(hlocked.isSelected());
            }
        });
        vlocked = new Togglebutton("v locked");
        vlocked.setSelected(shape.isVLocked());
        vlocked.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent event) {
                shape.setVLocked(vlocked.isSelected());
            }
View Full Code Here


            addCursor = java.awt.Toolkit.getDefaultToolkit().createCustomCursor(addCursorImage, new java.awt.Point(5,0),"pen");
        } catch (IOException e) {
            e.printStackTrace();
        }
        panel = new HFlexBox().setBoxAlign(HFlexBox.Align.Baseline);
        moveButton = new Togglebutton("move");
        moveButton.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                defaultTool = Tool.Move;
                updateToolButtons();
            }
        });
        panel.add(moveButton);
        deleteButton = new Togglebutton("delete");
        deleteButton.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                defaultTool = Tool.Delete;
                updateToolButtons();
            }
        });
        panel.add(deleteButton);
        reshapeButton = new Togglebutton("reshape");
        reshapeButton.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                defaultTool = Tool.Reshape;
                updateToolButtons();
            }
View Full Code Here

TOP

Related Classes of org.joshy.gfx.node.control.Togglebutton

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.