loci.plugins.in

## Class ColorDialog

- java.lang.Object
- - loci.plugins.prefs.OptionsDialog
  - - loci.plugins.in.ImporterDialog
    - - loci.plugins.in.ColorDialog

-     public class ColorDialog
      extends ImporterDialog

  Bio-Formats Importer custom color chooser dialog box. Heavily adapted from `ColorChooser`. ColorChooser is not used because there is no way to change the slider labels—this means that we can't record macros in which custom colors are chosen for multiple channels.
  Author:
    Melissa Linkert melissa at glencoesoftware.com, Curtis Rueden ctrueden at wisc.edu

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static java.awt.Dimension` | `SWATCH_SIZE`

    - ### Fields inherited from class loci.plugins.in.ImporterDialog

      `options, process`

    - ### Fields inherited from class loci.plugins.prefs.OptionsDialog

      `IS_GLITCHED, optionsList, STATUS_CANCELED, STATUS_FINISHED, STATUS_OK`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColorDialog(ImportProcess process)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `attachListeners(java.util.List<java.awt.TextField> colors, java.util.List<java.awt.Panel> swatches)`
    `protected ij.gui.GenericDialog` | `constructDialog()`
    `private java.awt.Panel` | `createSwatch(java.awt.Color color)`
    `private int` | `getColorValue(java.awt.TextField colorField)`
    `private java.util.List<java.awt.TextField>` | `getNumericFields(ij.gui.GenericDialog gd)`
    `protected boolean` | `harvestResults(ij.gui.GenericDialog gd)`
    `private java.lang.String` | `makeLabel(java.lang.String baseLabel, int s, int c)`
    `protected boolean` | `needPrompt()`

    - ### Methods inherited from class loci.plugins.in.ImporterDialog

      `displayDialog, showDialog`

    - ### Methods inherited from class loci.plugins.prefs.OptionsDialog

      `addCheckbox, addChoice, sleep`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SWATCH_SIZE

          private static final java.awt.Dimension SWATCH_SIZE

  - ### Constructor Detail

    - #### ColorDialog

          public ColorDialog(ImportProcess process)

  - ### Method Detail

    - #### needPrompt

          protected boolean needPrompt()

      Specified by:
        `needPrompt` in class `ImporterDialog`

    - #### constructDialog

          protected ij.gui.GenericDialog constructDialog()

      Specified by:
        `constructDialog` in class `ImporterDialog`

    - #### harvestResults

          protected boolean harvestResults(ij.gui.GenericDialog gd)

      Specified by:
        `harvestResults` in class `ImporterDialog`

    - #### makeLabel

          private java.lang.String makeLabel(java.lang.String baseLabel,
                                             int s,
                                             int c)

    - #### createSwatch

          private java.awt.Panel createSwatch(java.awt.Color color)

    - #### attachListeners

          private void attachListeners(java.util.List<java.awt.TextField> colors,
                                       java.util.List<java.awt.Panel> swatches)

    - #### getColorValue

          private int getColorValue(java.awt.TextField colorField)

    - #### getNumericFields

          private java.util.List<java.awt.TextField> getNumericFields(ij.gui.GenericDialog gd)

Copyright © 2026 Open Microscopy Environment