/Users/lyon/j4p/src/ip/gui/dialog/AdaptiveLog.java

1    package ip.gui.dialog; 
2     
3    import ip.gui.frames.NegateFrame; 
4     
5    import java.awt.event.ActionEvent; 
6     
7    public class AdaptiveLog extends DoubleLog { 
8        private NegateFrame parent; 
9     
10       public AdaptiveLog( 
11               NegateFrame _parent, 
12               String title, 
13               String prompts[], 
14               String defaults[], 
15               int fieldSize) { 
16           super(_parent, title, prompts, defaults, fieldSize); 
17           parent = _parent; 
18       } 
19    
20       public static void doit(NegateFrame _parent) { 
21           String title = "Adaptive Histogram Equalization"; 
22           String prompts[] = {"rows=", "cols="}; 
23           String defaults[] = {"2", "2"}; 
24           int fieldSize = 5; 
25           AdaptiveLog al = 
26                   new AdaptiveLog( 
27                           _parent, title, prompts, defaults, fieldSize); 
28       } 
29    
30       public void actionPerformed(ActionEvent e) { 
31           if (e.getSource() == setButton) { 
32               double dui[] = getUserInputAsDouble(); 
33               parent.drawMosaic((int) dui[0], (int) dui[1]); 
34               return; 
35           } 
36           super.actionPerformed(e); 
37       } 
38    
39   }