summaryrefslogtreecommitdiff
path: root/sources/client/inputforms/InputForm.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2009-02-18 23:01:21 +0000
committerPaul Buetow <paul@buetow.org>2009-02-18 23:01:21 +0000
commit89c679eb813611a2ede208b4c8e27c7f596b3be7 (patch)
treef44c19435286e78b9e8002990e1b55183a4fbc49 /sources/client/inputforms/InputForm.java
parent177f346a9bbe455dc12fd26dfa2c586585c28c1e (diff)
added copyright to header
Diffstat (limited to 'sources/client/inputforms/InputForm.java')
-rw-r--r--sources/client/inputforms/InputForm.java134
1 files changed, 69 insertions, 65 deletions
diff --git a/sources/client/inputforms/InputForm.java b/sources/client/inputforms/InputForm.java
index 41004fa..0c507f8 100644
--- a/sources/client/inputforms/InputForm.java
+++ b/sources/client/inputforms/InputForm.java
@@ -1,3 +1,7 @@
+/* NetCalendar 2006, 2009 (c) Dipl.-Inform. (FH) Paul C. Buetow
+ * http://netcalendar.buetow.org - netcalendar@dev.buetow.org
+ */
+
package client.inputforms;
import java.awt.event.ActionEvent;
@@ -14,80 +18,80 @@ import client.*;
*
*/
public abstract class InputForm extends SubWindow {
- protected final static long serialVersionUID = 1L;
- protected Vector vecFields;
- protected JPanel jPanelButtons;
- protected JButton jButtonClear;
- protected JButton jButtonApply;
- protected JButton jButtonCancel;
- protected JButton jButtonOK;
- private boolean bApplyHasBeenPressed = false;
+ protected final static long serialVersionUID = 1L;
+ protected Vector vecFields;
+ protected JPanel jPanelButtons;
+ protected JButton jButtonClear;
+ protected JButton jButtonApply;
+ protected JButton jButtonCancel;
+ protected JButton jButtonOK;
+ private boolean bApplyHasBeenPressed = false;
- protected final static String BUTTON_CANCEL = "Cancel";
- protected final static String BUTTON_CLEAR = "Clear";
- protected final static String BUTTON_APPLY = "Apply";
- protected final static String BUTTON_OK = "OK";
+ protected final static String BUTTON_CANCEL = "Cancel";
+ protected final static String BUTTON_CLEAR = "Clear";
+ protected final static String BUTTON_APPLY = "Apply";
+ protected final static String BUTTON_OK = "OK";
- protected final static int TEXTFIELD_LENGTH = 20;
+ protected final static int TEXTFIELD_LENGTH = 20;
- /**
- * Creates the input form window and show it.
- * @param sTitleText Specifies the title text of this JFrame.
- * @param netCalendarClient Specifies the calendar client session object to use.
- */
- public InputForm(String sTitleText, NetCalendarClient netCalendarClient) {
- super(sTitleText, netCalendarClient);
- }
+ /**
+ * Creates the input form window and show it.
+ * @param sTitleText Specifies the title text of this JFrame.
+ * @param netCalendarClient Specifies the calendar client session object to use.
+ */
+ public InputForm(String sTitleText, NetCalendarClient netCalendarClient) {
+ super(sTitleText, netCalendarClient);
+ }
- /**
- * Initializes the input form
- * @param sTitleText Specifies the title text of this JFrame.
- * @param netCalendarClient Specifies the calendar client session object to use.
- */
- public void init(String sTitleText, NetCalendarClient netCalendarClient) {
- super.init(sTitleText, netCalendarClient);
- }
+ /**
+ * Initializes the input form
+ * @param sTitleText Specifies the title text of this JFrame.
+ * @param netCalendarClient Specifies the calendar client session object to use.
+ */
+ public void init(String sTitleText, NetCalendarClient netCalendarClient) {
+ super.init(sTitleText, netCalendarClient);
+ }
- /**
- * Initializes all the GUI components of the implementating class.
- */
- protected void initComponents() {
- jButtonClear = new JButton(BUTTON_CLEAR);
- jButtonApply = new JButton(BUTTON_APPLY);
- jButtonCancel = new JButton(BUTTON_CANCEL);
- jButtonOK = new JButton(BUTTON_OK);
+ /**
+ * Initializes all the GUI components of the implementating class.
+ */
+ protected void initComponents() {
+ jButtonClear = new JButton(BUTTON_CLEAR);
+ jButtonApply = new JButton(BUTTON_APPLY);
+ jButtonCancel = new JButton(BUTTON_CANCEL);
+ jButtonOK = new JButton(BUTTON_OK);
- ActionListener actionListenerButtons = new ActionListener() {
- public void actionPerformed(ActionEvent event) {
- if (event.getActionCommand().equals(BUTTON_CANCEL)) {
- dispose();
+ ActionListener actionListenerButtons = new ActionListener() {
+ public void actionPerformed(ActionEvent event) {
+ if (event.getActionCommand().equals(BUTTON_CANCEL)) {
+ dispose();
- } else if (event.getActionCommand().equals(BUTTON_APPLY)) {
- bApplyHasBeenPressed = true;
- submit();
+ } else if (event.getActionCommand().equals(BUTTON_APPLY)) {
+ bApplyHasBeenPressed = true;
+ submit();
- } else if (event.getActionCommand().equals(BUTTON_OK)) {
- if (!bApplyHasBeenPressed)
- submit();
- dispose();
- }
- }
- };
+ } else if (event.getActionCommand().equals(BUTTON_OK)) {
+ if (!bApplyHasBeenPressed)
+ submit();
+ dispose();
+ }
+ }
+ };
- jButtonCancel.addActionListener(actionListenerButtons);
- jButtonClear.addActionListener(actionListenerButtons);
- jButtonApply.addActionListener(actionListenerButtons);
- jButtonOK.addActionListener(actionListenerButtons);
+ jButtonCancel.addActionListener(actionListenerButtons);
+ jButtonClear.addActionListener(actionListenerButtons);
+ jButtonApply.addActionListener(actionListenerButtons);
+ jButtonOK.addActionListener(actionListenerButtons);
- jPanelButtons = new JPanel();
- jPanelButtons.add(jButtonOK);
- jPanelButtons.add(jButtonCancel);
- jPanelButtons.add(jButtonApply);
- jPanelButtons.add(jButtonClear);
- }
+ jPanelButtons = new JPanel();
+ jPanelButtons.add(jButtonOK);
+ jPanelButtons.add(jButtonCancel);
+ jPanelButtons.add(jButtonApply);
+ jPanelButtons.add(jButtonClear);
+ }
- /**
- * Submits the input form of the implementating class.
- */
- protected abstract void submit();
+ /**
+ * Submits the input form of the implementating class.
+ */
+ protected abstract void submit();
}