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 12397 - Grip Vs Bump in Toolbar
Summary: Grip Vs Bump in Toolbar
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: David Simonek
URL: org.netbeans.awt.Toolbar
Keywords: UI
Depends on:
Blocks:
 
Reported: 2001-05-25 00:09 UTC by _ hair
Modified: 2008-12-22 23:38 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed enhancement code. (31.43 KB, text/plain)
2001-07-20 20:39 UTC, _ hair
Details
proper diff file to make things easier. (1.02 KB, patch)
2001-10-12 00:32 UTC, _ hair
Details | Diff
final diff against main trunk (4.29 KB, patch)
2002-08-06 16:20 UTC, David Simonek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ hair 2001-05-25 00:09:39 UTC
The Bumps are great for java look and feel, but...
They don't suit the windows look and feel at all.
In the Toolbar code their is still the code for the Grip.
The request is use the appropriate grip/bump honouring the
current look and feel. I know that the proper way to do this
would be to go through the ToolbarUI, but here's the intermediate
solution that i used. It gives the Toolbar a grip or bump on startup
depending on the current l&f, it cannot be changed during runtime.

From Toolbar.java:
    /**
     * When Toolbar is floatable, ToolbarGrip is added as Grip as first toolbar
component
     * modified by Michael Wever, 28/4/01, to use l&f's grip/bump.
     */
    void addGrip() {
        if (floatable) {
            //ToolbarGrip dragarea = new ToolbarGrip();
            /** Uses L&F's grip **/
            String lAndF = UIManager.getLookAndFeel().getName();
            JPanel dragarea =  lAndF.equals("Windows") ?
            (JPanel)new ToolbarGrip() : (JPanel)new ToolbarBump();

            if (mouseListener == null)
                mouseListener = new ToolbarMouseListener();

            dragarea.addMouseListener(mouseListener);
            dragarea.addMouseMotionListener(mouseListener);

            add(GRIP, dragarea);
            addSeparator(new Dimension(4, 1));
        }
    }

My full Toolbar.java is also attached.
Comment 1 _ hair 2001-05-25 00:13:07 UTC
Created attachment 1425 [details]
Proposed enhancement code.
Comment 2 _ hair 2001-10-12 00:32:33 UTC
Created attachment 2971 [details]
proper diff file to make things easier.
Comment 3 Jan Zajicek 2001-10-12 08:54:13 UTC
Patch attached, so this enhancement should be easy to integrate ;-)
Reassigning to Dafe, because of UI work on accessibility.
Comment 4 Jan Chalupa 2001-11-27 13:03:23 UTC
Target milestone -> 3.3.1.
Comment 5 David Simonek 2002-01-28 16:13:06 UTC
Marek, please evaluate as well, thanks.
Comment 6 mslama 2002-01-29 12:39:12 UTC
ToolbarBump is inner class of Toolbar. Where does ToolbarGrip come from?
I searched openide and java and nothing was found for ToolbarGrip. Did
I miss anything?

Otherwise yes it should be easy.
Comment 7 mslama 2002-01-29 12:43:40 UTC
Sorry I see it now at full source it was not in diff. I reassign this
issue to Dafe he uses Win2k (I use Linux.)
Comment 8 Marek Grummich 2002-07-22 11:22:38 UTC
Set target milestone to TBD
Comment 9 Marek Grummich 2002-07-22 11:24:45 UTC
Set target milestone to TBD
Comment 10 David Simonek 2002-07-26 14:05:01 UTC
Yes I'll integrate soon (I'm little shy that we didn't managed to do
this yet, somehow I miss reassignment back to me).
Comment 11 David Simonek 2002-08-06 15:35:11 UTC
Finally integrated into main trunk, although with some minor changes
to make it work with current version.
Comment 12 David Simonek 2002-08-06 16:20:05 UTC
Created attachment 7030 [details]
final diff against main trunk
Comment 13 _ hair 2003-07-08 15:13:07 UTC
yup. closed.