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 108783
Collapse All | Expand All

(-)graph/lib/apichanges.xml (+14 lines)
Lines 330-335 Link Here
330
            <class package="org.netbeans.api.visual.vmd" name="VMDColorScheme" link="yes"/>
330
            <class package="org.netbeans.api.visual.vmd" name="VMDColorScheme" link="yes"/>
331
            <issue number="105929"/>
331
            <issue number="105929"/>
332
        </change>
332
        </change>
333
334
        <change>
335
            <api name="general"/>
336
            <summary>Popup menu action could be invoked by Shift+F10 key</summary>
337
            <version major="2" minor="6"/>
338
            <date day="18" month="7" year="2007"/>
339
            <author login="dkaspar"/>
340
            <compatibility addition="yes"/>
341
            <description>
342
                Popup menu action (created by ActionFactory.createPopupMenuAction method) could be invoked by an user using Shift+F10 key.
343
            </description>
344
            <class package="org.netbeans.api.visual.action" name="ActionFactory" link="yes"/>
345
            <issue number="108783"/>
346
        </change>
333
    </changes>
347
    </changes>
334
348
335
    <htmlcontents>
349
    <htmlcontents>
(-)graph/lib/manifest.mf (-1 / +1 lines)
Lines 1-4 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.api.visual
2
OpenIDE-Module: org.netbeans.api.visual
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visual/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visual/resources/Bundle.properties
4
OpenIDE-Module-Specification-Version: 2.5
4
OpenIDE-Module-Specification-Version: 2.6
(-)graph/lib/src/org/netbeans/api/visual/action/ActionFactory.java (-1 / +1 lines)
Lines 167-173 Link Here
167
167
168
    /**
168
    /**
169
     * Creates a add-remove control point action with a default sensitivity. The action is assigned to a FreeConnectionWidget.
169
     * Creates a add-remove control point action with a default sensitivity. The action is assigned to a FreeConnectionWidget.
170
     * @return the add-remove control point action
170
f     * @return the add-remove control point action
171
     */
171
     */
172
    public static WidgetAction createAddRemoveControlPointAction () {
172
    public static WidgetAction createAddRemoveControlPointAction () {
173
        return createAddRemoveControlPointAction (3.0, 5.0);
173
        return createAddRemoveControlPointAction (3.0, 5.0);
(-)graph/lib/src/org/netbeans/api/visual/action/PopupMenuProvider.java (-1 / +1 lines)
Lines 36-42 Link Here
36
     * no popup menu will be displayed if this PopupMenuAction gets
36
     * no popup menu will be displayed if this PopupMenuAction gets
37
     * a valid popup trigger on the given Widget.
37
     * a valid popup trigger on the given Widget.
38
     * @param widget the widget
38
     * @param widget the widget
39
     * @param localLocation the local location where the popup menu was invoked
39
     * @param localLocation the local location where the popup menu was invoked; if null, then popup menu is invoked by a keyboard
40
     * @return The JPopupMenu to display for the given Widget.
40
     * @return The JPopupMenu to display for the given Widget.
41
     *         May be <code>null</code>.
41
     *         May be <code>null</code>.
42
     */
42
     */
(-)graph/lib/src/org/netbeans/modules/visual/action/PopupMenuAction.java (+17 lines)
Lines 25-30 Link Here
25
25
26
import javax.swing.*;
26
import javax.swing.*;
27
import java.awt.*;
27
import java.awt.*;
28
import java.awt.event.KeyEvent;
29
import java.awt.event.InputEvent;
28
30
29
/**
31
/**
30
 * @author William Headrick, David Kaspar
32
 * @author William Headrick, David Kaspar
Lines 91-96 Link Here
91
                Scene scene = widget.getScene ();
93
                Scene scene = widget.getScene ();
92
                Point point = scene.convertSceneToView (widget.convertLocalToScene (event.getPoint ()));
94
                Point point = scene.convertSceneToView (widget.convertLocalToScene (event.getPoint ()));
93
                popupMenu.show (scene.getView (), point.x, point.y);
95
                popupMenu.show (scene.getView (), point.x, point.y);
96
            }
97
            return State.CONSUMED;
98
        }
99
        return State.REJECTED;
100
    }
101
102
    public State keyPressed (Widget widget, WidgetKeyEvent event) {
103
        if ((event.getModifiers () & InputEvent.SHIFT_MASK) == InputEvent.SHIFT_MASK  &&  event.getKeyCode () == KeyEvent.VK_F10) {
104
            JPopupMenu popupMenu = provider.getPopupMenu (widget, null);
105
            if (popupMenu != null) {
106
                JComponent view = widget.getScene ().getView ();
107
                if (view != null) {
108
                    Rectangle visibleRect = view.getVisibleRect ();
109
                    popupMenu.show (view, visibleRect.x + 10, visibleRect.y + 10);
110
                }
94
            }
111
            }
95
            return State.CONSUMED;
112
            return State.CONSUMED;
96
        }
113
        }

Return to bug 108783