javax.swing.colorchooser.DefaultColorSelectionModel Java Examples

The following examples show how to use javax.swing.colorchooser.DefaultColorSelectionModel. 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 File: JColorWell.java    From pumpernickel with MIT License 4 votes vote down vote up
public JColorWell() {
	setColorSelectionModel(new DefaultColorSelectionModel());
	updateUI();
	setRequestFocusEnabled(true);
	setFocusable(true);
}
 
Example #2
Source File: JPalette.java    From pumpernickel with 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 File: CColorChooser.java    From binnavi with Apache License 2.0 4 votes vote down vote up
public CColorChooser() {
  this(new DefaultColorSelectionModel(Color.WHITE), null);
}
 
Example #4
Source File: CColorChooser.java    From binnavi with Apache License 2.0 4 votes vote down vote up
public CColorChooser(final Color initialColor) {
  this(new DefaultColorSelectionModel(initialColor), null);
}
 
Example #5
Source File: CColorChooser.java    From binnavi with 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 File: WebColorChooser.java    From weblaf with 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 ) );
}