net.sourceforge.jiu.gui.awt.dialogs
Class UniformPaletteQuantizerDialog
Dialog
net.sourceforge.jiu.gui.awt.dialogs.UniformPaletteQuantizerDialog
- ActionListener, AdjustmentListener, ItemListener
public class UniformPaletteQuantizerDialog
extends Dialog
implements ActionListener, AdjustmentListener, ItemListener
An AWT dialog to enter the parameters for a uniform palette color quantization operation.
DITHERING_METHODS
public final int[][] DITHERING_METHODS
TYPE_BURKES_ERROR_DIFFUSION
public static final int TYPE_BURKES_ERROR_DIFFUSION
TYPE_DITHERING_NONE
public static final int TYPE_DITHERING_NONE
TYPE_FLOYD_STEINBERG_ERROR_DIFFUSION
public static final int TYPE_FLOYD_STEINBERG_ERROR_DIFFUSION
TYPE_JARVIS_JUDICE_NINKE_ERROR_DIFFUSION
public static final int TYPE_JARVIS_JUDICE_NINKE_ERROR_DIFFUSION
TYPE_ORDERED_DITHERING
public static final int TYPE_ORDERED_DITHERING
TYPE_SIERRA_ERROR_DIFFUSION
public static final int TYPE_SIERRA_ERROR_DIFFUSION
TYPE_STEVENSON_ARCE_ERROR_DIFFUSION
public static final int TYPE_STEVENSON_ARCE_ERROR_DIFFUSION
TYPE_STUCKI_ERROR_DIFFUSION
public static final int TYPE_STUCKI_ERROR_DIFFUSION
blueLabel
private Label blueLabel
blueScrollbar
private Scrollbar blueScrollbar
cancel
private Button cancel
ditheringMethod
private Choice ditheringMethod
greenLabel
private Label greenLabel
greenScrollbar
private Scrollbar greenScrollbar
infoLabel1
private Label infoLabel1
infoLabel2
private Label infoLabel2
pressedOk
private boolean pressedOk
redLabel
private Label redLabel
redScrollbar
private Scrollbar redScrollbar
UniformPaletteQuantizerDialog
public UniformPaletteQuantizerDialog(Frame owner,
Strings strings,
int redBits,
int greenBits,
int blueBits,
int ditheringMethodSelection)
Creates a modal dialog to enter the parameter.
owner
- the parent of this modal dialogstrings
- an object to get String constants in the current languageredBits
- the initial selection of the number of bits for the red channelgreenBits
- the initial selection of the number of bits for the green channelblueBits
- the initial selection of the number of bits for the blue channelditheringMethodSelection
- initial selection for dithering method
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).
adjustmentValueChanged
public void adjustmentValueChanged(AdjustmentEvent e)
center
public void center()
Centers the dialog on screen.
getBlueBits
public int getBlueBits()
getDitheringMethod
public int getDitheringMethod()
getGreenBits
public int getGreenBits()
getRedBits
public int getRedBits()
hasPressedOk
public boolean hasPressedOk()
isSelectionValid
public boolean isSelectionValid()
itemStateChanged
public void itemStateChanged(ItemEvent e)
updateLabels
private void updateLabels()