00001 /* 00002 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 00003 * Copyright (C) 2008 - INRIA - Vincent COUVERT 00004 * 00005 * This file must be used under the terms of the CeCILL. 00006 * This source file is licensed as described in the file COPYING, which 00007 * you should have received as part of this distribution. The terms 00008 * are also available at 00009 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 00010 * 00011 */ 00012 00013 package org.scilab.modules.gui.colorchooser; 00014 00015 import java.awt.Color; 00016 00017 import org.scilab.modules.gui.bridge.colorchooser.SwingScilabColorChooser; 00018 00023 public class ScilabColorChooserBridge { 00024 00028 protected ScilabColorChooserBridge() { 00029 throw new UnsupportedOperationException(); /* Prevents calls from subclass */ 00030 } 00031 00037 public static SimpleColorChooser createColorChooser(Color color) { 00038 return new SwingScilabColorChooser(color); 00039 } 00040 00046 public static Color getSelectedColor(ColorChooser colorChooser) { 00047 return colorChooser.getAsSimpleColorChooser().getSelectedColor(); 00048 } 00049 00055 public static void setTitle(ColorChooser colorChooser, String title) { 00056 colorChooser.getAsSimpleColorChooser().setTitle(title); 00057 } 00058 00064 public static void setDefaultColor(ColorChooser colorChooser, Color color) { 00065 colorChooser.getAsSimpleColorChooser().setDefaultColor(color); 00066 } 00067 00072 public static void displayAndWait(ColorChooser colorChooser) { 00073 colorChooser.getAsSimpleColorChooser().displayAndWait(); 00074 } 00075 }
1.5.5