Class UniformPaletteQuantizerDialog

    • Field Detail

      • TYPE_FLOYD_STEINBERG_ERROR_DIFFUSION

        public static final int TYPE_FLOYD_STEINBERG_ERROR_DIFFUSION
        See Also:
        Constant Field Values
      • TYPE_STUCKI_ERROR_DIFFUSION

        public static final int TYPE_STUCKI_ERROR_DIFFUSION
        See Also:
        Constant Field Values
      • TYPE_BURKES_ERROR_DIFFUSION

        public static final int TYPE_BURKES_ERROR_DIFFUSION
        See Also:
        Constant Field Values
      • TYPE_SIERRA_ERROR_DIFFUSION

        public static final int TYPE_SIERRA_ERROR_DIFFUSION
        See Also:
        Constant Field Values
      • TYPE_JARVIS_JUDICE_NINKE_ERROR_DIFFUSION

        public static final int TYPE_JARVIS_JUDICE_NINKE_ERROR_DIFFUSION
        See Also:
        Constant Field Values
      • TYPE_STEVENSON_ARCE_ERROR_DIFFUSION

        public static final int TYPE_STEVENSON_ARCE_ERROR_DIFFUSION
        See Also:
        Constant Field Values
      • DITHERING_METHODS

        public final int[][] DITHERING_METHODS
      • cancel

        private Button cancel
      • redScrollbar

        private Scrollbar redScrollbar
      • greenScrollbar

        private Scrollbar greenScrollbar
      • blueScrollbar

        private Scrollbar blueScrollbar
      • ditheringMethod

        private Choice ditheringMethod
      • infoLabel1

        private Label infoLabel1
      • infoLabel2

        private Label infoLabel2
      • redLabel

        private Label redLabel
      • greenLabel

        private Label greenLabel
      • blueLabel

        private Label blueLabel
      • pressedOk

        private boolean pressedOk
    • Constructor Detail

      • UniformPaletteQuantizerDialog

        public UniformPaletteQuantizerDialog​(Frame owner,
                                             Strings strings,
                                             int redBits,
                                             int greenBits,
                                             int blueBits,
                                             int ditheringMethodSelection)
        Creates a modal dialog to enter the parameter.
        Parameters:
        owner - the parent of this modal dialog
        strings - an object to get String constants in the current language
        redBits - the initial selection of the number of bits for the red channel
        greenBits - the initial selection of the number of bits for the green channel
        blueBits - the initial selection of the number of bits for the blue channel
        ditheringMethodSelection - initial selection for dithering method
    • Method Detail

      • actionPerformed

        public void actionPerformed​(ActionEvent e)
        Hides (closes) this dialog if the OK button was source of the action event (e.g. if the button was pressed).
        Specified by:
        actionPerformed in interface ActionListener
      • center

        public void center()
        Centers the dialog on screen.
      • getDitheringMethod

        public int getDitheringMethod()
      • getBlueBits

        public int getBlueBits()
      • getGreenBits

        public int getGreenBits()
      • getRedBits

        public int getRedBits()
      • hasPressedOk

        public boolean hasPressedOk()
      • isSelectionValid

        public boolean isSelectionValid()
      • updateLabels

        private void updateLabels()