net.sourceforge.jiu.gui.awt.dialogs
Class ReduceGrayscaleDialog
Dialog
net.sourceforge.jiu.gui.awt.dialogs.ReduceGrayscaleDialog
- ActionListener, AdjustmentListener
public class ReduceGrayscaleDialog
extends Dialog
implements ActionListener, AdjustmentListener
A dialog to enter the parameters for a grayscale reduction operation.
ReduceGrayscaleDialog(Frame owner, Strings strings, int bits, int maxBits, int ditheringMethodSelection) - Creates a modal dialog to enter the parameters.
|
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
bitLabel
private Label bitLabel
cancel
private Button cancel
ditheringMethod
private Choice ditheringMethod
pressedOk
private boolean pressedOk
scrollbar
private Scrollbar scrollbar
shadesLabel
private Label shadesLabel
ReduceGrayscaleDialog
public ReduceGrayscaleDialog(Frame owner,
Strings strings,
int bits,
int maxBits,
int ditheringMethodSelection)
Creates a modal dialog to enter the parameters.
owner
- the parent of this modal dialogstrings
- an object to get String constants in the current languagebits
- initial number of bits to be shown in the dialogmaxBits
- maximum allowed number of bitsditheringMethodSelection
- initial selection of 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.
getDitheringMethod
public int getDitheringMethod()
getNumBits
public int getNumBits()
hasPressedOk
public boolean hasPressedOk()
updateLabels
private void updateLabels()