Package org.cytoscape.util.swing
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 Summary
Modifier and TypeMethodDescriptionReturn the Color the user selectedReturn the palette the user selectedshowDialog(Component parent, String title, Palette initialPalette, int colorCount)
Display the chooser and return the Palette the user choosesshowDialog(Component parent, String title, Palette initialPalette, Color initialColor, int colorCount)
Display the chooser and return the Color the user chooses
-
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 ontitle
- the dialog titleinitialPalette
- a palette to use as the initial selected paletteinitialColor
- the initial selected colorcolorCount
- the number of colors to display for each palette- Returns:
- the Color the user selects
-
showDialog
Display the chooser and return the Palette the user chooses- Parameters:
parent
- the component that the dialog should use to center ontitle
- the dialog titleinitialPalette
- a palette to use as the initial selected palettecolorCount
- 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
-