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 theColorthe user selected.Return thePalettethe user selected.showDialog(Component parent, String title, Palette initialPalette, int colorCount) Display the chooser and return thePalettethe user chooses--in case no palette is selected or the action is cancelled, the return will benull.showDialog(Component parent, String title, Palette initialPalette, Color initialColor, int colorCount) Display the chooser and return theColorthe user chooses--in case no color is selected or the action is cancelled, the return will benull.
-
Method Details
-
showDialog
Color showDialog(Component parent, String title, Palette initialPalette, Color initialColor, int colorCount) Display the chooser and return theColorthe user chooses--in case no color is selected or the action is cancelled, the return will benull.- 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 or
nullif none is selected or the dialog is cancelled
-
showDialog
Display the chooser and return thePalettethe user chooses--in case no palette is selected or the action is cancelled, the return will benull.- 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 or
nullif none is selected or the dialog is cancelled
-
getSelectedColor
Color getSelectedColor()Return theColorthe user selected.- Returns:
- the Color the user selects or
nullif no color is selected
-
getSelectedPalette
Palette getSelectedPalette()Return thePalettethe user selected.- Returns:
- the Palette the user selects or
nullif no palette is selected
-