Java Code Examples for javax.swing.colorchooser.ColorChooserComponentFactory

The following examples show how to use javax.swing.colorchooser.ColorChooserComponentFactory. 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: constellation   Source File:    License: Apache License 2.0 5 votes vote down vote up
public GraphColorChooser() {
    // Add our named color panel by getting the existing panels and putting ours in front.
    final AbstractColorChooserPanel[] panels = ColorChooserComponentFactory.getDefaultChooserPanels();
    final AbstractColorChooserPanel[] morePanels = new AbstractColorChooserPanel[panels.length + 1];
    morePanels[0] = new NamedColorPanel();
    System.arraycopy(panels, 0, morePanels, 1, panels.length);

Example 2
public ColorChooserPane() {
  colorModel = new ExtendedColorModel();
  colorModel.addChangeListener( new PreviewColorUpdater() );
  previewPane = ColorChooserComponentFactory.getPreviewPanel();
  multiSelectorPane = new JTabbedPane();
  swatchColorChooser = new SwatchColorChooser();

  addColorChooserPanel( new CombinedColorChooser() );
  addColorChooserPanel( swatchColorChooser );

  setLayout( new BorderLayout() );
  add( previewPane, BorderLayout.SOUTH );
  add( multiSelectorPane, BorderLayout.CENTER );