|
|
||
Tim Boudreau's BlogA Single-Mouse-Gesture Color Chooser for SwingPosted by timboudreau on June 05, 2006 at 05:56 PM | Comments (1)Ever needed a faster, slicker way to let your users select a color in Swing? I just set up a new java.net project, which produces just such a widget. Press the mouse and a palette pops up; drag over the palette and release when the color is right; use combinations of ctrl/alt/shift to switch palettes (palettes are pluggable if you want to write your own).
The widget is the Quick Color Chooser -
It's actually been sitting around in So the code is fairly mature and solid - I just split it out into having a separate UI delegate so it's more Swing-like and the painting behavior is overridable, but it's the same logic as before. Feedback appreciated. If you want to try it using Matisse in NetBeans, there's a NetBeans module that installs the component in the component palette for immediate drag-and-drop use (created using BeanNetter). The module includes the javadoc. Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|