Bug 52040 - Add a toolbar in JMeter main window
Add a toolbar in JMeter main window
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
Nightly (Please specify date)
All All
: P2 enhancement with 1 vote (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-10-16 20:15 UTC by Milamber
Modified: 2012-01-19 23:06 UTC (History)
0 users



Attachments
Patch to add a toolbar (files modified) (1.90 KB, patch)
2011-10-16 20:15 UTC, Milamber
Details | Diff
Patch to add a toolbar (new files) (25.15 KB, application/zip)
2011-10-16 20:16 UTC, Milamber
Details
Patch to add a toolbar (screenshot) (20.56 KB, image/png)
2011-10-16 20:17 UTC, Milamber
Details
Patch to add a toolbar (screenshot) (48.60 KB, image/png)
2011-10-22 22:51 UTC, Milamber
Details
Patch to add a toolbar (files modified) (8.52 KB, patch)
2011-10-22 22:51 UTC, Milamber
Details | Diff
Patch to add a toolbar (new files) (29.76 KB, application/zip)
2011-10-22 22:52 UTC, Milamber
Details
Toolbar with better polish (21.51 KB, image/png)
2012-01-19 23:06 UTC, Milamber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milamber 2011-10-16 20:15:05 UTC
To improve user-friendly, we can add a toolbar in JMeter main window.

Please review screenshot / patch, and give your comments (order, icons, add/remove items, etc.)

I haven't added a menu to hide/unhide the toolbar (just a property), but I can add the menu, if you want.
Comment 1 Milamber 2011-10-16 20:15:47 UTC
Created attachment 27794 [details]
Patch to add a toolbar (files modified)
Comment 2 Milamber 2011-10-16 20:16:38 UTC
Created attachment 27795 [details]
Patch to add a toolbar (new files)
Comment 3 Milamber 2011-10-16 20:17:35 UTC
Created attachment 27796 [details]
Patch to add a toolbar (screenshot)
Comment 4 Sebb 2011-10-17 00:03:59 UTC
Looks good.

There should definitely be a menu item to show/hide it, rather than a property; maybe the setting should be sticky (as we did with LAF just recently)?

Where did the icons come from?

I think the icon file names should be stored in a property file, as we have done for the tree icons.

I suspect the first thing people are going to want to do is to configure the buttons - add and remove them and move them around.

I don't know if that is easy - I expect it would be quite time-consuming to code.
But it would be quite easy to add another property to list the icons (and dividers) in order. So for example one could have:

new  = org/apache/jmeter/images/toolbar/new.png
open = org/apache/jmeter/images/toolbar/open.png
...
toolbar = new, open, | , etc.

This assumes the properties are in their own file. If we want to share another file, then we could add a prefix to the property names.
Comment 5 Milamber 2011-10-18 23:49:38 UTC
(In reply to comment #4)
> Looks good.
> 
> There should definitely be a menu item to show/hide it, rather than a property;
> maybe the setting should be sticky (as we did with LAF just recently)?

Ok, I will add a new menu item.

> 
> Where did the icons come from?

From JMeter code src (directory images) with some changes (convert to png, rename, modified)
From my works with The Gimp (like - + ?, start/stop remote start/stop, cut/copy/paste, etc)


> 
> I think the icon file names should be stored in a property file, as we have
> done for the tree icons.

ok, I do this.


> 
> I suspect the first thing people are going to want to do is to configure the
> buttons - add and remove them and move them around.
> 
> I don't know if that is easy - I expect it would be quite time-consuming to
> code.
>
> But it would be quite easy to add another property to list the icons (and
> dividers) in order. So for example one could have:
> 
> new  = org/apache/jmeter/images/toolbar/new.png
> open = org/apache/jmeter/images/toolbar/open.png
> ...
> toolbar = new, open, | , etc.


Good idea to allow changes on icons order.
I can do this too.

> 
> This assumes the properties are in their own file. If we want to share another
> file, then we could add a prefix to the property names.
Comment 6 Milamber 2011-10-22 22:51:09 UTC
Created attachment 27836 [details]
Patch to add a toolbar (screenshot)
Comment 7 Milamber 2011-10-22 22:51:53 UTC
Created attachment 27837 [details]
Patch to add a toolbar (files modified)
Comment 8 Milamber 2011-10-22 22:52:19 UTC
Created attachment 27838 [details]
Patch to add a toolbar (new files)
Comment 9 Milamber 2011-10-22 22:56:18 UTC
New patch for add toolbar in JMeter.

* Allow hide/unhide the toolbar in Options menu
* icons set and order can be customizable, add new icon/action is possible too

Any comments are welcome
Comment 10 Sebb 2011-10-23 10:31:08 UTC
I'm not sure it's necessary to have defaults for the icon properties and toolbar.
If the icons-toolbar.properties file is not found, then JMeter can display an error box with the details.

This would simplify the code quite a bit.

However, it would be useful to be able to override the standard properties file.
One way to do that is to load it first, and then load the override file (if any).

The IconToolbarBean class should probably be immutable; not sure it makes sense to allow any of the fields to be changed. Also, I would probably make it responsible for resolving the ActionNames fields. It could also default the iconPathPressed field to be the same as iconPath, which would simplify the calling code.

The code does not affect how tests work, so it can be committed now and tweaked later.
Comment 11 Milamber 2011-10-23 18:36:44 UTC
(In reply to comment #10)
> I'm not sure it's necessary to have defaults for the icon properties and
> toolbar.
> If the icons-toolbar.properties file is not found, then JMeter can display an
> error box with the details.

Done.

> 
> This would simplify the code quite a bit.
> 
> However, it would be useful to be able to override the standard properties
> file.
> One way to do that is to load it first, and then load the override file (if
> any).

It's possible with a copy of icon-toolbar.properties and a defined jmeter.toolbar.icons property
Allow override only some icon/action: to do later.

> 
> The IconToolbarBean class should probably be immutable; not sure it makes sense
> to allow any of the fields to be changed. 
Done.

> Also, I would probably make it
> responsible for resolving the ActionNames fields.

Done. 

> It could also default the
> iconPathPressed field to be the same as iconPath, which would simplify the
> calling code.

Done.

> 
> The code does not affect how tests work, so it can be committed now and tweaked
> later.

To do now.

Thanks for your comments and suggestions.

Milamber
Comment 12 Milamber 2011-10-23 18:49:17 UTC
URL: http://svn.apache.org/viewvc?rev=1187947&view=rev
Log:
Bug 52040 - Add a toolbar in JMeter main window

Added:
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ToolBar.java   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/IconToolbarBean.java   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/clear.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/clearall.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/close.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/collapse.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/copy.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/cut.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/expand.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/function.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/help.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/icons-toolbar.properties   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/new.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/open.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/paste.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/save.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/saveastp.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/search.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/searchreset.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/shutdown.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/shutdownremoteall.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/start.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/startremoteall.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/stop.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/stopremoteall.png   (with props)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/toggle.png   (with props)
Modified:
    jakarta/jmeter/trunk/bin/jmeter.properties
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jakarta/jmeter/trunk/xdocs/changes.xml
Comment 13 Milamber 2012-01-19 23:05:05 UTC
See too this discussion for better polish toolbar icons:
http://mail-archives.apache.org/mod_mbox/jmeter-dev/201201.mbox/browser
Comment 14 Milamber 2012-01-19 23:05:30 UTC
URL: http://svn.apache.org/viewvc?rev=1233638&view=rev
Log:
Improve toolbar icons set with some icons from open_icon_library-CC (http://openiconlibrary.sourceforge.net/)
Add some color saturation for start/stop icons
Update New and Noteworthy section on changes.xml

Modified:
    jmeter/trunk/docs/images/screenshots/changes/01_toolbar.png
    jmeter/trunk/docs/images/screenshots/changes/02_ignore_pause_timers.png
    jmeter/trunk/docs/images/screenshots/changes/05_search_tree.png
    jmeter/trunk/docs/images/screenshots/changes/22_drag_and_drop.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/clear.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/clearall.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/close.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/collapse.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/copy.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/cut.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/expand.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/function.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/help.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/new.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/open.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/paste.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/save.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/saveastp.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/search.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/searchreset.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/shutdown.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/shutdownremoteall.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/start.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/startnotimers.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/startremoteall.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/stop.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/stopremoteall.png
    jmeter/trunk/src/core/org/apache/jmeter/images/toolbar/toggle.png
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/images/screenshots/changes/01_toolbar.png
    jmeter/trunk/xdocs/images/screenshots/changes/02_ignore_pause_timers.png
    jmeter/trunk/xdocs/images/screenshots/changes/05_search_tree.png
    jmeter/trunk/xdocs/images/screenshots/changes/22_drag_and_drop.png
Comment 15 Milamber 2012-01-19 23:06:34 UTC
Created attachment 28179 [details]
Toolbar with better polish