net.sourceforge.jiu.gui.awt.dialogs

Class ShearDialog

Implemented Interfaces:
ActionListener, KeyListener

public class ShearDialog
extends Dialog
implements ActionListener, KeyListener

An AWT dialog to enter the angle for a shearing operation.
Author:
Marco Schmidt

Field Summary

private TextField
angleTextField
private Button
cancel
private int
imageHeight
private int
imageWidth
private Label
newWidthLabel
private Button
ok
private boolean
pressedOk
private Double
result

Constructor Summary

ShearDialog(Frame owner, Strings strings, double initialValue, int imageWidth, int imageHeight)
Creates a ShearDialog.

Method Summary

void
actionPerformed(ActionEvent e)
Hides (closes) this dialog if the OK button was source of the action event (e.g.
Double
getValue()
private Double
getValue(TextField tf)
void
handleKeys(KeyEvent e)
boolean
hasPressedOk()
void
keyPressed(KeyEvent e)
void
keyReleased(KeyEvent e)
void
keyTyped(KeyEvent e)

Field Details

angleTextField

private TextField angleTextField

cancel

private Button cancel

imageHeight

private int imageHeight

imageWidth

private int imageWidth

newWidthLabel

private Label newWidthLabel

ok

private Button ok

pressedOk

private boolean pressedOk

result

private Double result

Constructor Details

ShearDialog

public ShearDialog(Frame owner,
                   Strings strings,
                   double initialValue,
                   int imageWidth,
                   int imageHeight)
Creates a ShearDialog.
Parameters:
owner - the Frame this dialog will belong to

Method Details

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).

getValue

public Double getValue()

getValue

private Double getValue(TextField tf)

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)