« Java JFC links | Main | Safari available on Windows. Why ? One word: iPhone »

Introducing Colorspace

Colorspace is a mashup (that is what the kids call it nowadays) of the Substance LAF initialization code, the Xoetrope color wheel, the Quaqua color picker and Teppefall Darkstar.

I have done a lot of work in the design industry and know the work flow of designers and web developers. I thought that this application might be a snug fit for just that group. Hell, even a girly girl girl might appreciate this one. Yes, I have bitch-slapped myself for saying that. Colorspace should be a helpful tool alongside Photoshop and Dreamweaver.

I would like to stress that this application is 89% not done by me. I just added 500 lines of Java, 100 lines of C++ and 100 lines of Darkstar build instructions. The inspiration came from the Substance color chooser and the awesome Xoetrope and Quaqua components that it is based on.

Colorspace will be released next week. I broke the JVM C++ hookup code two days ago and must spend some time figuring out what is wrong.

Issues:
- Colorspace is broken on OS X Java 1.6 beta. The fix is to use 1.5.
- This application must run under Substance in order to work properly.



TrackBack

TrackBack URL for this entry:
http://www.installer.teppefall.com/movabletype/mt-tb.cgi/132

Comments

Any reason why it needs Substance to run? The original color panel from Xoetrope is written in such a way that it can be run as a part of Substance color chooser *and* as an embeddable panel in XUI. I can think only about the localization strings, but the implementation does provide the fallback default English strings.

It is not the Xoetrope code. The label internationalization code is implemented and works great.

It is the Quaqua code that locks it to Substance. It has eight calls to UIManager and is loosly tied to the ColorChooser API. ColorChooser.colorPickerMagnifier is not defined under standard LAF´s and throw a null pointer exception. It is just a UIManager resource initialization problem. Very boring.

ColorChooser.colorPickerMagnifier
ColorChooser.colorPickerGlassRect
ColorChooser.colorPickerZoomRect
ColorChooser.colorPickerHotSpot
ColorChooser.colorPickerCaptureRect
ColorChooser.colorPickerPickOffset
ColorChooser.colorPickerIcon

I see. These are initialized in org.jvnet.substance.plugin.BasePlugin. The first and the last to a bundled icon, and the rest to points and rectangles (the same happens in Quaqua). So, you can put the relevant entries in the UIManager itself before using this panel. I'll talk with Werner (Quaqua developer) to see if these settings can be exposed as an API on that class so it's reusable outside a specific LAF, if needed.

Kirill

As Kirill points out this Color chooser can be used outside of Substance, but it's not resticted to XUI ( http://www.xoetrope.com/xui ). It can be used very easily with the standard JColorChooser:

JColorChooser colorChooser = new JColorChooser();
AbstractColorChooserPanel[] oldPanels = colorChooser.getChooserPanels();
AbstractColorChooserPanel[] newPanels = new AbstractColorChooserPanel[ oldPanels.length + 1 ];
System.arraycopy( oldPanels, 0, newPanels, 1, oldPanels.length );
newPanels[ 0 ] = new ColorWheelPanel();
colorChooser.setChooserPanels( newPanels );

The ColorWheelPanel is released under the MPL open source license, and as consequence you need to include a link or reference to the source code: http://xui.svn.sourceforge.net/viewvc/xui/kalideoscope/branches/xui31/src/net/xoetrope/editor/color/

The ColorWheel takes its inspiration from the sort of color scheme generators that have been available to web designers for some time (e.g. http://www.wellstyled.com/tools/colorscheme/index-en.html ). The chooser is part of a much larger, but so far incomplete effort to bring color scheme generation to the the Java world under the umbrella of the XUI project.

One important aspect of this chooser is that it uses a red-yellow-blue color model in place of the normal RGB palette. Although theoretically incorrect the model was once regarded as being closer to the 'artists' conceptual palette and sense of asthetics than the RGB model, however mileage may vary depending on usage.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at contrib.net.xoetrope.editor.color.ColorWheelPanel.mouseMoved(ColorWheelPanel.java:726)
at java.awt.Component.processMouseMotionEvent(Component.java:6083)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3278)
at java.awt.Component.processEvent(Component.java:5807)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3999)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

This website is all about alpha and beta software

Download non-beta software here