/Users/lyon/j4p/src/j2d/gui/ExponentialStretchToolbox.java
|
1 // Glenn Josefiak
2 // Fairfield University
3 // SW513
4 // Spring 2003
5
6 package j2d.gui;
7
8 import gui.run.ObservableSlider;
9
10 import javax.swing.*;
11 import java.awt.*;
12
13 /**
14 * A JInternalFrame containing controls for performing exponential
15 * stretching of an image's brightness.
16 */
17 public class ExponentialStretchToolbox extends JInternalFrame {
18 private ObservableSlider sliPower;
19
20 /**
21 * Construct a new ExponentialStretchToolbox.
22 */
23 public ExponentialStretchToolbox() {
24 Container c;
25
26 sliPower = new ObservableSlider(0.125f, 8.0f);
27 sliPower.setLabel("power");
28 sliPower.setTickLabel(0.125f, "0.125");
29 sliPower.setTickLabel(1f, "1");
30 sliPower.setTickLabel(8f, "8");
31
32 c = getContentPane();
33 c.setLayout(new FlowLayout());
34 c.add(sliPower);
35
36 setTitle("Exponential Stretch");
37 setMinimumSize(new Dimension(150, 150));
38 pack();
39 setClosable(true);
40 setMaximizable(false);
41 setResizable(false);
42 }
43
44 /**
45 * Return a handle to the Power slider on the control panel.
46 *
47 * @return A reference to an ObservableSlider
48 */
49 public ObservableSlider getSlider() {
50 return sliPower;
51 }
52 }
53