net.sourceforge.jiu.gui.awt.dialogs
Class OctreeDialog
Dialog
net.sourceforge.jiu.gui.awt.dialogs.OctreeDialog
- ActionListener, KeyListener
public class OctreeDialog
extends Dialog
implements ActionListener, KeyListener
A dialog to enter the parameters for an Octree color quantization operation.
It also allows to enter the optional algorithms that can be applied in combination with Octree.
OctreeDialog(Frame owner, Strings strings, int numColors, boolean paletted) - Creates a modal dialog to enter the parameter.
|
DITHERING_STRINGS
public final int[] DITHERING_STRINGS
DITHERING_TYPES
public final int[] DITHERING_TYPES
cancel
private Button cancel
dithering
private Choice dithering
numColorsField
private TextField numColorsField
outputColorType
private Choice outputColorType
pressedOk
private boolean pressedOk
OctreeDialog
public OctreeDialog(Frame owner,
Strings strings,
int numColors,
boolean paletted)
Creates a modal dialog to enter the parameter.
owner
- the parent of this modal dialogstrings
- an object to get String constants in the current languagenumColors
- the number of colors in the resulting imagepaletted
- if true, the output image will be paletted, otherwise truecolor
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).
center
public void center()
Centers the dialog on screen.
getErrorDiffusion
public int getErrorDiffusion()
getIntValue
private int getIntValue(TextField textField)
getNumColors
public int getNumColors()
hasPressedOk
public boolean hasPressedOk()
isOutputTypePaletted
public boolean isOutputTypePaletted()
keyPressed
public void keyPressed(KeyEvent e)
keyReleased
public void keyReleased(KeyEvent e)
keyTyped
public void keyTyped(KeyEvent e)
updateOkButton
private void updateOkButton()
useErrorDiffusion
public boolean useErrorDiffusion()
useNoDithering
public boolean useNoDithering()