summaryrefslogtreecommitdiff
path: root/client/helper/DateSpinner.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2009-02-18 17:33:22 +0000
committerPaul Buetow <paul@buetow.org>2009-02-18 17:33:22 +0000
commit4722100cba287b164957c658c2e035783e20c963 (patch)
tree35733fd3e50aeeb493e38ceaea83521a4710f0ac /client/helper/DateSpinner.java
parent61f7175cc3e51c0afaf63e380d03824a77464ba8 (diff)
moved sources
Diffstat (limited to 'client/helper/DateSpinner.java')
-rw-r--r--client/helper/DateSpinner.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/client/helper/DateSpinner.java b/client/helper/DateSpinner.java
deleted file mode 100644
index e374107..0000000
--- a/client/helper/DateSpinner.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package client.helper;
-
-
-import java.awt.FlowLayout;
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.swing.*;
-
-/**
- * This helper class helps to create a date spinner to edit Date objects.
- * @author buetow
- */
-public class DateSpinner extends JComponent {
- private final static long serialVersionUID = 1L;
- private Date date;
- private SpinnerDateModel spinnerDateModel;
-
- /**
- * Creates a date spinner to set/edit a given date. This constructor uses the
- * current date!
- */
- public DateSpinner() {
- this.date = new Date();
- initComponents();
- }
-
- /**
- * Creates a date spinner to set/edit a given date.
- * @param date The date to be used for the date spinner!
- */
- public DateSpinner(Date date) {
- this.date = date;
- initComponents();
- }
-
- /**
- * Initializes all the date spinner GUI components.
- */
- private void initComponents() {
- setLayout(new FlowLayout(FlowLayout.LEFT, 4, 4));
-
- spinnerDateModel = new SpinnerDateModel(date, null, null, Calendar.MONTH);
- JSpinner jSpinner = new JSpinner(spinnerDateModel);
- new JSpinner.DateEditor(jSpinner, "MM/yy");
-
- add(jSpinner);
- }
-
- /**
- * Returns the date which is represented by this spinner.
- * @return Returns the date which is represented by this spinner.
- */
- public Date getDate() {
- return spinnerDateModel.getDate();
- }
-}