KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > monitorenter > gui > chart > dialogs > DialogRange


1 /*
2  * DialogRange.java of project jchart2d
3  * Copyright 2006 (C) Achim Westermann, created on 09:31:15.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * If you modify or optimize the code in a useful way please let me know.
20  * Achim.Westermann@gmx.de
21  *
22  */

23 package info.monitorenter.gui.chart.dialogs;
24
25 import info.monitorenter.gui.chart.layout.controls.RangeChooserPanel;
26 import info.monitorenter.util.Range;
27
28 import java.awt.Component JavaDoc;
29
30
31 /**
32  * A dialog for choosing a range.
33  * <p>
34  *
35  * @author <a HREF="mailto:Achim.Westermann@gmx.de">Achim Westermann </a>
36  *
37  *
38  * @version $Revision: 1.2 $
39  */

40 public class DialogRange extends ADialog {
41
42   /**
43    * Generated <code>serialVersionUID</code>.
44    */

45   private static final long serialVersionUID = 3256718472674621488L;
46
47   /**
48    * Creates and returns a new dialog containing the specified
49    * <code>RangeChooserPanel</code> pane along with "OK", "Cancel", and
50    * "Reset" buttons.
51    * <p>
52    *
53    * If the "OK" or "Cancel" buttons are pressed, the dialog is automatically
54    * hidden (but not disposed). If the "Reset" button is pressed, the
55    * color-chooser's color will be reset to the color which was set the last
56    * time <code>show</code> was invoked on the dialog and the dialog will
57    * remain showing.
58    *
59    * @param c
60    * the parent component for the dialog.
61    *
62    * @param title
63    * the title for the dialog.
64    *
65    * @param modal
66    * if true, the remainder of the program is inactive until the dialog
67    * is closed.
68    *
69    * @param range
70    * the bounds for the displayed range chooser: values within these
71    * bounds will be selectable.
72    *
73    * @param chooserPane
74    * the range chooser to be placed inside the dialog: Result of choice
75    * has to be obtained there.
76    *
77    * @return the dialog for selection of the range (undisplayed yet).
78    */

79   public static DialogRange createRangeDialog(final Component JavaDoc c, final Range range,
80       final String JavaDoc title, final boolean modal, final RangeChooserPanel chooserPane) {
81
82     DialogRange dialog = new DialogRange(c, title, modal, chooserPane);
83     return dialog;
84   }
85
86   /**
87    * Creates a range-chooser dialog.
88    * <p>
89    *
90    * @param component
91    * the parent <code>Component</code> for the dialog.
92    *
93    * @param title
94    * the String containing the dialog's title.
95    *
96    * @param modal
97    * if true this will be a modal dialog (blocking actions on component
98    * until closed.
99    *
100    * @param chooserPane
101    * the UI control for choosing the range.
102    */

103   public DialogRange(final Component JavaDoc component, final String JavaDoc title, final boolean modal,
104       final RangeChooserPanel chooserPane) {
105     super(component, title, modal, chooserPane);
106
107   }
108 }
109
Popular Tags