Package org.locationtech.udig.printing.ui.internal.editor.parts

Examples of org.locationtech.udig.printing.ui.internal.editor.parts.LabelDirectEditManager


    public void perform() {
        value = null;
        disposed = false;
        BoxFigure nodeFigure = (BoxFigure) owner.getFigure();
        LabelDirectEditManager manager = new LabelDirectEditManager(owner, TextCellEditor.class,
                new LabelCellEditorLocator(nodeFigure), nodeFigure){

            private boolean committing;

            @Override
            protected void initCellEditor() {
                super.initCellEditor();
                Text text = (Text) getCellEditor().getControl();
                text.setText(getText());
            }


            @Override
            protected void commit() {
                if (committing)
                    return;
                committing = true;
                try {
                    eraseFeedback();
                    value = (String) getCellEditor().getValue();
                } finally {
                    bringDown();
                    committing = false;
                }

            }
            @Override
            protected void bringDown() {
                super.bringDown();
                disposed = true;
            }
        };

        manager.show();
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.printing.ui.internal.editor.parts.LabelDirectEditManager

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.