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.

Bug 102614

Summary: allow creation of "drop-down" buttons in netbeans
Product: platform Reporter: Stanislav Aubrecht <saubrecht>
Component: Window SystemAssignee: Stanislav Aubrecht <saubrecht>
Status: RESOLVED FIXED    
Severity: blocker CC: apireviews
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 103307    
Bug Blocks: 90801    
Attachments: proposed implementation
rollover
drop-down
Planned usage in projectui

Description Stanislav Aubrecht 2007-04-26 13:27:00 UTC
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.
Comment 1 Stanislav Aubrecht 2007-04-26 13:32:40 UTC
Created attachment 41725 [details]
proposed implementation
Comment 2 Stanislav Aubrecht 2007-04-26 13:38:41 UTC
Created attachment 41726 [details]
rollover
Comment 3 Stanislav Aubrecht 2007-04-26 13:39:11 UTC
Created attachment 41727 [details]
drop-down
Comment 4 Stanislav Aubrecht 2007-05-03 10:06:11 UTC
if there are no objections, i'll integrate this tomorrow
Comment 5 Jesse Glick 2007-05-03 20:38:10 UTC
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).
Comment 6 Jesse Glick 2007-05-03 20:43:09 UTC
Created attachment 42121 [details]
Planned usage in projectui
Comment 7 Stanislav Aubrecht 2007-05-04 12:07:28 UTC
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