The Physiologist's Friend Simulation API

ch.unizh.ini.friend.gui
Class ColorChooser

java.lang.Object
  extended by ch.unizh.ini.friend.gui.ColorChooser

public class ColorChooser
extends Object

Adaptor for JColorChooser. The preview panel is changed and shows the LMS values of the currently selected color.

Version:
$Revision: 1.2 $
Author:
Johann Gyger

Field Summary
protected  JColorChooser chooser
          Color chooser used to show the dialog
 
Constructor Summary
ColorChooser()
          Create a new instance.
 
Method Summary
 Color showDialog(Component component, String title, Color initialColor)
          Show a modal color-chooser dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chooser

protected JColorChooser chooser
Color chooser used to show the dialog

Constructor Detail

ColorChooser

public ColorChooser()
Create a new instance.

Method Detail

showDialog

public Color showDialog(Component component,
                        String title,
                        Color initialColor)
Show a modal color-chooser dialog.

Parameters:
component - Parent component
title - Title of dialog
initialColor - Inital color
Returns:
Selected or previous color if the user opted out

http://www.ini.unizh.ch/~tobi/friend