Class UniformPaletteQuantizerDialog

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
net.sourceforge.jiu.gui.awt.dialogs.UniformPaletteQuantizerDialog
All Implemented Interfaces:
ActionListener, AdjustmentListener, ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class UniformPaletteQuantizerDialog extends Dialog implements ActionListener, AdjustmentListener, ItemListener
An AWT dialog to enter the parameters for a uniform palette color quantization operation.
Author:
Marco Schmidt
See Also:
  • Field Details

    • TYPE_DITHERING_NONE

      public static final int TYPE_DITHERING_NONE
      See Also:
    • TYPE_ORDERED_DITHERING

      public static final int TYPE_ORDERED_DITHERING
      See Also:
    • TYPE_FLOYD_STEINBERG_ERROR_DIFFUSION

      public static final int TYPE_FLOYD_STEINBERG_ERROR_DIFFUSION
      See Also:
    • TYPE_STUCKI_ERROR_DIFFUSION

      public static final int TYPE_STUCKI_ERROR_DIFFUSION
      See Also:
    • TYPE_BURKES_ERROR_DIFFUSION

      public static final int TYPE_BURKES_ERROR_DIFFUSION
      See Also:
    • TYPE_SIERRA_ERROR_DIFFUSION

      public static final int TYPE_SIERRA_ERROR_DIFFUSION
      See Also:
    • TYPE_JARVIS_JUDICE_NINKE_ERROR_DIFFUSION

      public static final int TYPE_JARVIS_JUDICE_NINKE_ERROR_DIFFUSION
      See Also:
    • TYPE_STEVENSON_ARCE_ERROR_DIFFUSION

      public static final int TYPE_STEVENSON_ARCE_ERROR_DIFFUSION
      See Also:
    • DITHERING_METHODS

      public final int[][] DITHERING_METHODS
    • strings

      private Strings strings
    • ok

      private Button ok
    • 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 Details

    • 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 Details

    • 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
    • adjustmentValueChanged

      public void adjustmentValueChanged(AdjustmentEvent e)
      Specified by:
      adjustmentValueChanged in interface AdjustmentListener
    • 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()
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      Specified by:
      itemStateChanged in interface ItemListener
    • updateLabels

      private void updateLabels()