net.sourceforge.jiu.gui.awt.dialogs
Class MapToArbitraryPaletteDialog
Dialog
net.sourceforge.jiu.gui.awt.dialogs.MapToArbitraryPaletteDialog
- ActionListener
public class MapToArbitraryPaletteDialog
extends Dialog
implements ActionListener
A dialog to enter the parameters for an operation to map an RGB truecolor
image to any given palette.
void | actionPerformed(ActionEvent e) - Hides (closes) this dialog if the OK button was source of the action event
(e.g.
|
int | getErrorDiffusionType() - If the use of error diffusion was selected, this method
returns on of the ErrorDiffusionDithering TYPE constants
|
int | getPaletteType() - Return the palette type (one of the PALETTE_xyz constants of this class)
that is currently selected in the dialog.
|
boolean | hasPressedOk() - Returns true if the OK button was pressed, false if
it was the Cancel button.
|
boolean | useErrorDiffusion() - Returns whether the use of one of the error diffusion
algorithms is selected in the dialog.
|
DITHERING_STRING_CONSTANTS
private static final int[] DITHERING_STRING_CONSTANTS
ERROR_DIFFUSION_TYPES
private static final int[] ERROR_DIFFUSION_TYPES
NUM_PALETTE_TYPES
public static final int NUM_PALETTE_TYPES
PALETTE_FILE
public static final int PALETTE_FILE
PALETTE_PALM_16_COLORS
public static final int PALETTE_PALM_16_COLORS
PALETTE_PALM_16_GRAY
public static final int PALETTE_PALM_16_GRAY
PALETTE_PALM_256_COLORS
public static final int PALETTE_PALM_256_COLORS
PALETTE_PALM_4_GRAY
public static final int PALETTE_PALM_4_GRAY
PALETTE_STRING_CONSTANTS
private static final int[] PALETTE_STRING_CONSTANTS
PALETTE_WEBSAFE
public static final int PALETTE_WEBSAFE
cancel
private Button cancel
checkboxes
private Checkbox[] checkboxes
dithering
private Choice dithering
paletteType
private CheckboxGroup paletteType
pressedOk
private boolean pressedOk
MapToArbitraryPaletteDialog
public MapToArbitraryPaletteDialog(Frame owner,
Strings strings)
owner
- the Frame this dialog will belong to
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).
getErrorDiffusionType
public int getErrorDiffusionType()
If the use of error diffusion was selected, this method
returns on of the ErrorDiffusionDithering TYPE constants
getPaletteType
public int getPaletteType()
Return the palette type (one of the PALETTE_xyz constants of this class)
that is currently selected in the dialog.
hasPressedOk
public boolean hasPressedOk()
Returns true if the OK button was pressed, false if
it was the Cancel button.
useErrorDiffusion
public boolean useErrorDiffusion()
Returns whether the use of one of the error diffusion
algorithms is selected in the dialog.