Subversion Repositories public

Rev

Rev 96 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 96 Rev 97
Line 31... Line 31...
31
 * This class allows to set various properties of a task. Currently only
31
 * This class allows to set various properties of a task. Currently only
32
 * price per hour can be set.
32
 * price per hour can be set.
33
 *
33
 *
34
 * @author  luk
34
 * @author  luk
35
 */
35
 */
36
public class TaskPropetiesDialog extends javax.swing.JDialog {
36
public class TaskPropertiesDialog extends javax.swing.JDialog {
37
    /** A return status code - returned if Cancel button has been pressed */
37
    /** A return status code - returned if Cancel button has been pressed */
38
    public static final int RET_CANCEL = 0;
38
    public static final int RET_CANCEL = 0;
39
    /** A return status code - returned if OK button has been pressed */
39
    /** A return status code - returned if OK button has been pressed */
40
    public static final int RET_OK = 1;
40
    public static final int RET_OK = 1;
41
   
41
   
42
    private double price = 1;
42
    private double price = 1;
43
43
44
    /** Creates a new TaskPropetiesDialog.
44
    /** Creates a new TaskPropertiesDialog.
45
     * @param parent parent object for this dialog
45
     * @param parent parent object for this dialog
46
     * @param modal modal dialog yes/no
46
     * @param modal modal dialog yes/no
47
     */
47
     */
48
    public TaskPropetiesDialog(java.awt.Frame parent, boolean modal) {
48
    public TaskPropertiesDialog(java.awt.Frame parent, boolean modal) {
49
        super(parent, modal);
49
        super(parent, modal);
50
        initComponents();
50
        initComponents();
51
        priceText.setText(Double.toString(price));
51
        priceText.setText(Double.toString(price));
52
    }
52
    }
53
53
Line 191... Line 191...
191
     * @param args the command line arguments
191
     * @param args the command line arguments
192
     */
192
     */
193
    public static void main(String args[]) {
193
    public static void main(String args[]) {
194
        java.awt.EventQueue.invokeLater(new Runnable() {
194
        java.awt.EventQueue.invokeLater(new Runnable() {
195
            public void run() {
195
            public void run() {
196
                TaskPropetiesDialog dialog = new TaskPropetiesDialog(new javax.swing.JFrame(), true);
196
                TaskPropertiesDialog dialog = new TaskPropertiesDialog(new javax.swing.JFrame(), true);
197
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
197
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
198
                    @Override
198
                    @Override
199
                    public void windowClosing(java.awt.event.WindowEvent e) {
199
                    public void windowClosing(java.awt.event.WindowEvent e) {
200
                        System.exit(0);
200
                        System.exit(0);
201
                    }
201
                    }