Interface CyColorPaletteChooser


public interface CyColorPaletteChooser
This defines a color chooser that allows users to choose colors from a palette and (optionally) change palettes.

Module: swing-util-api

To use this in your app, include the following dependency in your POM:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>swing-util-api</artifactId>
</dependency>
  • Method Details

    • showDialog

      Color showDialog(Component parent, String title, Palette initialPalette, Color initialColor, int colorCount)
      Display the chooser and return the Color the user chooses
      Parameters:
      parent - the component that the dialog should use to center on
      title - the dialog title
      initialPalette - a palette to use as the initial selected palette
      initialColor - the initial selected color
      colorCount - the number of colors to display for each palette
      Returns:
      the Color the user selects
    • showDialog

      Palette showDialog(Component parent, String title, Palette initialPalette, int colorCount)
      Display the chooser and return the Palette the user chooses
      Parameters:
      parent - the component that the dialog should use to center on
      title - the dialog title
      initialPalette - a palette to use as the initial selected palette
      colorCount - the number of colors to display for each palette
      Returns:
      the Palette the user selects
    • getSelectedColor

      Color getSelectedColor()
      Return the Color the user selected
      Returns:
      the Color the user selects
    • getSelectedPalette

      Palette getSelectedPalette()
      Return the palette the user selected
      Returns:
      the Palette the user selects