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.
very common ui concept is a button with a small 'arrow' that opens a popup menu when clicked (e.g. 'back' button in internet browsers). i propose adding a factory class that can create such buttons.
Created attachment 41725 [details] proposed implementation
Created attachment 41726 [details] rollover
Created attachment 41727 [details] drop-down
if there are no objections, i'll integrate this tomorrow
Seems to suffice for adding a configuration selector to the Run and Debug toolbar buttons, the use case I am interested in. [JG01] Clicking on the arrow when the menu is already open should close it. [JG02] 'if( null != menu && menu instanceof JPopupMenu )' is redundant (instanceof is always false for null).
Created attachment 42121 [details] Planned usage in projectui
integrated to trunk jg01 - i have problems fixing this - i'll create a new issue for it jg02 - fixed (jesse, i presume you'll want to integrate the MainProjectAction yourself, right?) Checking in src/org/openide/awt/IconWithArrow.java; /cvs/openide/awt/src/org/openide/awt/IconWithArrow.java,v <-- IconWithArrow.java initial revision: 1.1 done RCS file: /cvs/openide/awt/src/org/openide/awt/DropDownToggleButton.java,v done Checking in src/org/openide/awt/DropDownToggleButton.java; /cvs/openide/awt/src/org/openide/awt/DropDownToggleButton.java,v <-- DropDownToggleButton.java initial revision: 1.1 done RCS file: /cvs/openide/awt/src/org/openide/awt/DropDownButtonFactory.java,v done Checking in src/org/openide/awt/DropDownButtonFactory.java; /cvs/openide/awt/src/org/openide/awt/DropDownButtonFactory.java,v <-- DropDownButtonFactory.java initial revision: 1.1 done RCS file: /cvs/openide/awt/src/org/openide/awt/DropDownButton.java,v done Checking in src/org/openide/awt/DropDownButton.java; /cvs/openide/awt/src/org/openide/awt/DropDownButton.java,v <-- DropDownButton.java initial revision: 1.1 done Checking in apichanges.xml; /cvs/openide/awt/apichanges.xml,v <-- apichanges.xml new revision: 1.11; previous revision: 1.10 done RCS file: /cvs/openide/awt/src/org/openide/awt/resources/arrow.png,v done Checking in src/org/openide/awt/resources/arrow.png; /cvs/openide/awt/src/org/openide/awt/resources/arrow.png,v <-- arrow.png initial revision: 1.1 done