Package com.lightcrafts.ui.action

Examples of com.lightcrafts.ui.action.ToggleAction


        action.addPropertyChangeListener(this);
    }

    public void propertyChange(PropertyChangeEvent event) {
        final String propName = event.getPropertyName();
        final ToggleAction action = (ToggleAction) event.getSource();
        if (propName.equals(ToggleAction.TOGGLE_STATE)) {
            setSelected(action.getState());
        }
    }
View Full Code Here


        ) {
            public void actionPerformed(ActionEvent e) {
                browser.clearSelection();
            }
        };
        showHideTypesAction = new ToggleAction(
            LOCALE.get("HideImageTypeMenuItem"),
            LOCALE.get("ShowImageTypeMenuItem")
        ) {
            protected void onActionPerformed(ActionEvent event) {
                ImageDatumRenderer.setShowImageTypes(true);
View Full Code Here

    }

    Action getDocumentAction() {
        final Document doc = getDocument();
        if (doc != null) {
            Action action = new ToggleAction(HideRegionsText, ShowRegionsText) {
                protected void onActionPerformed(ActionEvent event) {
                    EditorMode mode = doc.getEditor().getMode();
                    if (mode != EditorMode.REGION) {
                        doc.getEditor().setMode(EditorMode.REGION);
                    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.ui.action.ToggleAction

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.