1    /*
2    Copyright 2000 by Ralph Hartley
3    This software is licenced under the terms of the
4    Gnu Public Licence
5    */
6    import javax.swing.*;
7    import java.awt.*;
8    
9    class ModeButton extends JToggleButton {
10   
11     Class type;
12     int mode;
13   
14     ModeButton(String text,Icon icon,Class c,int m) {
15       super(text,icon);
16       type=c;
17       mode = m;
18     }
19   
20     ModeButton(Icon icon,Class c,int m) {
21       super(icon);
22       type=c;
23       mode = m;
24       setMargin(new Insets(2,2,2,2));
25     }
26   
27     ModeButton(String text,Class c,int m) {
28       super(text);
29       type=c;
30       mode = m;
31     }
32   
33       /*  public Dimension getPreferedSize() {
34       return(new Dimension(150,150));
35     }
36     public Dimension getMinimumSize() {
37       return(new Dimension(150,150));
38       }*/
39   }
40   
41