KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > cve > core > elementEEL > CveButton


1 package cve.core.elementEEL;
2
3 import cve.osservatori.*;
4
5 import java.awt.*;
6 import java.awt.event.*;
7 import java.util.*;
8 //swing classes
9
import javax.swing.text.*;
10 import javax.swing.*;
11 import javax.swing.event.*;
12 import javax.swing.border.*;
13 //import javax.swing.tree.*;
14

15 /**
16  * Pulsante CVE.
17  * Oggetto istanziato da comunicazione.Ldl_to_Edl
18  * @author Domenico Ventriglia
19  * @version 1.0
20  *
21  */

22 public class CveButton extends JButton
23 {
24     Action act;
25     
26     /**
27    * Creazione di un pulsante CVE
28      * @param icon icona
29    *
30    */

31     public CveButton(ImageIcon icon)
32     {
33         super(icon);
34         //setSize(new Dimension(30,30));
35
setBorderPainted(true);
36         setMargin(new Insets(1,1,1,1));
37         setToolTipText("Add unita");
38         //addActionListener(this);
39
setEnabled(false);
40         //contr = cont;
41
//contr.registerCveButton(this);
42
//System.out.println("fattop unit button");
43
}
44     
45     /**
46    * Creazione di un pulsante CVE
47    *
48    */

49     public CveButton()
50     {
51         super();
52         //setSize(new Dimension(30,30));
53
setBorderPainted(true);
54         setMargin(new Insets(1,1,1,1));
55         setToolTipText("Add unita");
56         //addActionListener(this);
57
//contr = cont;
58
//contr.registerCveButton(this);
59
//System.out.println("fattop unit button");
60
}
61
62     /**
63    * Return dimensioni impostate
64    *
65    */

66     public Dimension getPreferredSize()
67     {
68         return new Dimension(35,35);
69     }
70     
71  // public void actionPerformed(ActionEvent e)
72
//{
73
// System.out.println("cliccato su bottone"+e.getActionCommand());
74
//devo semplicemente eseguire l'azionea cui il bottone e' collegato
75
//repaint();
76
//}
77

78 }
79
Popular Tags