Class CyColorChooser


  • public final class CyColorChooser
    extends Object
    This is an annoying re-implementation of JColorChooser.showDialog() that remembers recently used colors between invocations of the chooser dialog.

    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>

    Cytoscape Backwards Compatibility (Static Class): This class is static and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
    • Method Detail

      • showDialog

        public static Color showDialog​(Component parent,
                                       String title,
                                       Color initialColor)
        Display custom color chooser dialog.
        Parameters:
        parent - parent component of this dialog
        title - Title of this dialog
        initialColor - Initially selected color.
        Returns:
        New Color or null if canceled.