Package com.lightcrafts.ui.crop

Examples of com.lightcrafts.ui.crop.CropListener


    public static void main(String[] args) {

        final CropMode mode = new CropMode(false);
        mode.addCropListener(
            new CropListener() {
                public void cropCommitted(CropBounds rect) {
                    System.out.println(rect);
                }
                public void unCrop() {
                    System.out.println("uncrop");
View Full Code Here


                }
            }
        );
        // The crop and rotate modes likes to end themselves:
        cropMode.addCropListener(
            new CropListener() {
                public void cropCommitted(CropBounds bounds) {
                    // This may be called because someone already switched
                    // away from the crop mode, but it may also be called
                    // from the "Commit" crop mode popup menu item, in which
                    // case we must handle the mode switch ourselves.
                    EventQueue.invokeLater(
                        new Runnable() {
                            public void run() {
                                if (modeButtons != null) {
                                    if (modeButtons.isCropSelected()) {
                                        setEditorMode( EditorMode.ARROW );
                                    }
                                }
                            }
                        }
                    );
                }
                public void unCrop() {
                }
            }
        );
        rotateMode.addCropListener(
            new CropListener() {
                public void cropCommitted(CropBounds bounds) {
                    // This may be called because someone already switched
                    // away from the rotate mode, but it may also be called
                    // from the "Commit" crop mode popup menu item, in which
                    // case we must handle the mode switch ourselves.
View Full Code Here

TOP

Related Classes of com.lightcrafts.ui.crop.CropListener

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.