This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 203245
Collapse All | Expand All

(-)a/editor.actions/src/org/netbeans/modules/editor/actions/Bundle.properties (+1 lines)
Lines 57-62 Link Here
57
goto-declaration_menu_text=Go to &Declaration
57
goto-declaration_menu_text=Go to &Declaration
58
zoom-text-in=Zoom Text In
58
zoom-text-in=Zoom Text In
59
zoom-text-out=Zoom Text Out
59
zoom-text-out=Zoom Text Out
60
zoom-text-reset=Zoom Text Reset
60
move-code-element-up=Move Code Element Up
61
move-code-element-up=Move Code Element Up
61
move-code-element-up_menu_text=Move Code Element &Up
62
move-code-element-up_menu_text=Move Code Element &Up
62
move-code-element-down=Move Code Element Down
63
move-code-element-down=Move Code Element Down
(-)a/editor.actions/src/org/netbeans/modules/editor/actions/ZoomTextAction.java (-8 / +19 lines)
Lines 38-44 Link Here
38
package org.netbeans.modules.editor.actions;
38
package org.netbeans.modules.editor.actions;
39
39
40
import java.awt.event.ActionEvent;
40
import java.awt.event.ActionEvent;
41
import java.util.Map;
41
import java.util.Arrays;
42
import javax.swing.text.JTextComponent;
42
import javax.swing.text.JTextComponent;
43
import org.netbeans.api.editor.EditorActionNames;
43
import org.netbeans.api.editor.EditorActionNames;
44
import org.netbeans.api.editor.EditorActionRegistration;
44
import org.netbeans.api.editor.EditorActionRegistration;
Lines 57-62 Link Here
57
    ),
57
    ),
58
    @EditorActionRegistration(
58
    @EditorActionRegistration(
59
        name = EditorActionNames.zoomTextOut
59
        name = EditorActionNames.zoomTextOut
60
    ),
61
    @EditorActionRegistration(
62
        name = EditorActionNames.zoomTextReset
60
    )
63
    )
61
})
64
})
62
public class ZoomTextAction extends AbstractEditorAction {
65
public class ZoomTextAction extends AbstractEditorAction {
Lines 67-81 Link Here
67
    @Override
70
    @Override
68
    public void actionPerformed(ActionEvent evt, JTextComponent target) {
71
    public void actionPerformed(ActionEvent evt, JTextComponent target) {
69
        String actionName = actionName();
72
        String actionName = actionName();
70
        int delta = (EditorActionNames.zoomTextIn.equals(actionName)) ? +1 : -1;
73
	
71
        if (target != null) {
74
        if (target != null) {
72
            int newZoom = 0;
75
            int newZoom = 0;
73
            Integer currentZoom = (Integer) target.getClientProperty(TEXT_ZOOM_PROPERTY);
76
	    //zoom in/out
74
            if (currentZoom != null) {
77
	    if (Arrays.asList(EditorActionNames.zoomTextIn, EditorActionNames.zoomTextOut).contains(actionName)) {
75
                newZoom += currentZoom;
78
		Integer currentZoom = (Integer) target.getClientProperty(TEXT_ZOOM_PROPERTY);
76
            }
79
		if (currentZoom != null) {
77
            newZoom += delta;
80
		    newZoom += currentZoom;
78
            target.putClientProperty(TEXT_ZOOM_PROPERTY, newZoom);
81
		}
82
		int delta = (EditorActionNames.zoomTextIn.equals(actionName)) ? +1 : -1;
83
		newZoom += delta;
84
		target.putClientProperty(TEXT_ZOOM_PROPERTY, newZoom);
85
	    }
86
	    //zoom reset
87
	    if (EditorActionNames.zoomTextReset.equals(actionName)){
88
		target.putClientProperty(TEXT_ZOOM_PROPERTY, null);
89
	    }
79
        }
90
        }
80
    }
91
    }
81
92
(-)a/editor.lib2/nbproject/project.properties (-1 / +1 lines)
Lines 43-49 Link Here
43
is.autoload=true
43
is.autoload=true
44
javac.source=1.6
44
javac.source=1.6
45
javac.compilerargs=-Xlint:unchecked
45
javac.compilerargs=-Xlint:unchecked
46
spec.version.base=1.75.0
46
spec.version.base=1.76.0
47
47
48
javadoc.arch=${basedir}/arch.xml
48
javadoc.arch=${basedir}/arch.xml
49
javadoc.apichanges=${basedir}/apichanges.xml
49
javadoc.apichanges=${basedir}/apichanges.xml
(-)a/editor.lib2/src/org/netbeans/api/editor/EditorActionNames.java (+7 lines)
Lines 96-101 Link Here
96
    public static final String zoomTextOut = "zoom-text-out"; // NOI18N
96
    public static final String zoomTextOut = "zoom-text-out"; // NOI18N
97
    
97
    
98
    /**
98
    /**
99
     * Zoom text reset to default font size.
100
     * @see #zoomInTextAction
101
     * @since 1.76
102
     */
103
    public static final String zoomTextReset = "zoom-text-reset"; // NOI18N
104
    
105
    /**
99
     * Toggle between regular text selection and rectangular block selection
106
     * Toggle between regular text selection and rectangular block selection
100
     * when caret selects in a column mode.
107
     * when caret selects in a column mode.
101
     */
108
     */

Return to bug 203245