net.sourceforge.jiu.gui.awt.dialogs
Class ScaleDialog
Dialog
net.sourceforge.jiu.gui.awt.dialogs.ScaleDialog
- ActionListener, KeyListener
public class ScaleDialog
extends Dialog
implements ActionListener, KeyListener
A dialog to enter the parameters for an image scaling operation.
ScaleDialog(Frame owner, Strings strings, int width, int height, boolean pickType, String[] typeNames, int initialType) - Creates an InfoDialog, a modal dialog to display a text message, centered on the desktop.
|
cancel
private Button cancel
heightTextField
private TextComponent heightTextField
maintainAspectRatio
private Checkbox maintainAspectRatio
oldHeight
private int oldHeight
oldHeightString
private String oldHeightString
oldWidth
private int oldWidth
oldWidthString
private String oldWidthString
pressedOk
private boolean pressedOk
types
private Choice types
widthTextField
private TextComponent widthTextField
ScaleDialog
public ScaleDialog(Frame owner,
Strings strings,
int width,
int height,
boolean pickType,
String[] typeNames,
int initialType)
Creates an InfoDialog, a modal dialog to display a text message, centered on the desktop.
owner
- the Frame this dialog will belong tostrings
- the Strings resource used for text messageswidth
- the current width of the imageheight
- the current height of the imagepickType
- determines whether the will be a Choice box for picking the type of scaling algorithmtypeNames
- names of the image scaling algorithmsinitialType
- algorithm type to be initially selected
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.
getHeightValue
public int getHeightValue()
getType
public int getType()
getValue
private int getValue(TextComponent textField)
getWidthValue
public int getWidthValue()
handleKeys
public void handleKeys(KeyEvent e)
hasPressedOk
public boolean hasPressedOk()
keyPressed
public void keyPressed(KeyEvent e)
keyReleased
public void keyReleased(KeyEvent e)
keyTyped
public void keyTyped(KeyEvent e)