Java Code Examples for javax.swing.colorchooser.DefaultColorSelectionModel

The following examples show how to use javax.swing.colorchooser.DefaultColorSelectionModel. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: pumpernickel   Source File: JColorWell.java    License: MIT License 4 votes vote down vote up
public JColorWell() {
	setColorSelectionModel(new DefaultColorSelectionModel());
	updateUI();
	setRequestFocusEnabled(true);
	setFocusable(true);
}
 
Example 2
Source Project: pumpernickel   Source File: JPalette.java    License: MIT License 4 votes vote down vote up
public JPalette(Color[][] colors, int cellSize) {
	setColorSelectionModel(new DefaultColorSelectionModel());
	setColors(colors);
	setCellSize(cellSize);
	updateUI();
}
 
Example 3
Source Project: binnavi   Source File: CColorChooser.java    License: Apache License 2.0 4 votes vote down vote up
public CColorChooser() {
  this(new DefaultColorSelectionModel(Color.WHITE), null);
}
 
Example 4
Source Project: binnavi   Source File: CColorChooser.java    License: Apache License 2.0 4 votes vote down vote up
public CColorChooser(final Color initialColor) {
  this(new DefaultColorSelectionModel(initialColor), null);
}
 
Example 5
Source Project: binnavi   Source File: CColorChooser.java    License: Apache License 2.0 4 votes vote down vote up
public CColorChooser(final Color initialColor, final Color[] recentColors) {
  this(new DefaultColorSelectionModel(initialColor), recentColors);
}
 
Example 6
Source Project: weblaf   Source File: WebColorChooser.java    License: GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs new color chooser.
 *
 * @param id           {@link StyleId}
 * @param initialColor initially selected color
 */
public WebColorChooser ( final StyleId id, final Color initialColor )
{
    this ( id, new DefaultColorSelectionModel ( initialColor ) );
}