Class JDPDate
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----JDPDate
- public class JDPDate
- extends Panel
Class JDPDate represents a date textfield with pulldown ability.
-
JDPDate(JDPUser)
-
-
JDPDate(JDPUser, int)
-
-
JDPDate(JDPUser, String, int)
-
-
format(Date)
- Format a given date to the default format
-
format(Date, String)
- Format a given date to a given format
-
format(long)
- Format a given date to the default format
-
format(String)
- Format a given date to the default format
-
format(String, String)
- Format a given date to the default format
-
formatForSql(Date, String)
- Format a given date string create the SQL to update it to the database
-
formatForSql(String, String)
- Format a given date string create the SQL to update it to the database
-
formatSystem(long)
- Format a given date to the default system format yyyy/mm/dd.
-
getBackground()
-
-
getColumns()
- Get the number of columns for the date box
-
getDate()
- Get the value of the date box
-
getDefaultFormat()
- Get the value of the date box
-
getEditable()
- Get the editable setting of the date box
-
getEnabled()
- Get the enabled setting of the date box
-
getFont()
-
-
getForeground()
-
-
getText()
- Get the value of the date box
-
handleEvent(Event)
-
-
minimumSize()
-
-
preferredSize()
-
-
setBackground(Color)
-
-
setDate(Date)
- Set the value of the date box
-
setDefaultFormat(String)
- Set the default date format
-
setEditable(boolean)
- Set the editable setting of the date box
-
setEnabled(boolean)
- Set the enabled setting of the date box
-
setFont(Font)
-
-
setForeground(Color)
-
-
setText(String)
- Set the value of the date box
-
unformat(String)
- Format a given date string create a date using the default format
-
unformat(String, String)
- Format a given date string create a date given the format
-
unformattedDateValid()
- Check whether the last date unformatted was invalid.
JDPDate
public JDPDate(JDPUser user)
JDPDate
public JDPDate(JDPUser user,
int width)
JDPDate
public JDPDate(JDPUser user,
String initValue,
int width)
setText
public void setText(String newText)
- Set the value of the date box
- Parameters:
- newValue - the new value for the date box
setDate
public void setDate(Date date)
- Set the value of the date box
- Parameters:
- date - the new value for the date box
getDate
public Date getDate()
- Get the value of the date box
- Returns:
- the value for the date box
getText
public String getText()
- Get the value of the date box
- Returns:
- the current value for the date box
getColumns
public int getColumns()
- Get the number of columns for the date box
- Returns:
- the number of columns for the date box
setDefaultFormat
public static void setDefaultFormat(String dateFormat)
- Set the default date format
- Parameters:
- dateFormat - the default date format
getDefaultFormat
public static String getDefaultFormat()
- Get the value of the date box
- Returns:
- the default date format
format
public static String format(String thisDate)
- Format a given date to the default format
- Parameters:
- date - the date to format
- Returns:
- the new newly formatted date
format
public static String format(long thisDate)
- Format a given date to the default format
- Parameters:
- date - the date to format
- Returns:
- the new newly formatted date
formatSystem
public static String formatSystem(long thisDate)
- Format a given date to the default system format yyyy/mm/dd.
- Parameters:
- date - the date to format
- Returns:
- the new newly formatted date
format
public static String format(String thisDate,
String format)
- Format a given date to the default format
- Parameters:
- date - the date to format
- format - the format of the date (eg: "mm/dd/yy")
- Returns:
- the new newly formatted date
format
public static String format(Date thisDate)
- Format a given date to the default format
- Parameters:
- date - the date to format
- Returns:
- the new newly formatted date
format
public static String format(Date thisDate,
String format)
- Format a given date to a given format
- Parameters:
- date - the date to format
- format - the format of the date (eg: "mm/dd/yy")
- Returns:
- the new newly formatted date
formatForSql
public static String formatForSql(String thisDate,
String datasourceType)
- Format a given date string create the SQL to update it to the database
- Parameters:
- date - the date to parse
- datasourceType - the type of datasource we are writing to
- Returns:
- the SQL subclause
formatForSql
public static String formatForSql(Date thisDate,
String datasourceType)
- Format a given date string create the SQL to update it to the database
- Parameters:
- date - the date to parse
- datasourceType - the type of datasource we are writing to
- Returns:
- the SQL subclause
unformat
public static Date unformat(String thisDate)
- Format a given date string create a date using the default format
- Parameters:
- date - the date to parse
- Returns:
- the new date
unformat
public static Date unformat(String thisDate,
String format)
- Format a given date string create a date given the format
- Parameters:
- date - the date to parse
- format - the format of the date (eg: "mm/dd/yy")
- Returns:
- the new date
unformattedDateValid
public static boolean unformattedDateValid()
- Check whether the last date unformatted was invalid.
- Returns:
- whether the last date unformatted was invalid.
setBackground
public void setBackground(Color thisColor)
- Overrides:
- setBackground in class Component
getBackground
public Color getBackground()
- Overrides:
- getBackground in class Component
setForeground
public void setForeground(Color thisColor)
- Overrides:
- setForeground in class Component
getForeground
public Color getForeground()
- Overrides:
- getForeground in class Component
setFont
public void setFont(Font thisFont)
- Overrides:
- setFont in class Component
getFont
public Font getFont()
- Overrides:
- getFont in class Component
setEditable
public void setEditable(boolean editable)
- Set the editable setting of the date box
- Parameters:
- editable - the editable setting for the date box
getEditable
public boolean getEditable()
- Get the editable setting of the date box
- Returns:
- the editable setting for the date box
setEnabled
public void setEnabled(boolean enabled)
- Set the enabled setting of the date box
- Parameters:
- enabled - the enabled setting for the date box
- Overrides:
- setEnabled in class Component
getEnabled
public boolean getEnabled()
- Get the enabled setting of the date box
- Returns:
- the enabled setting for the date box
handleEvent
public boolean handleEvent(Event e)
- Overrides:
- handleEvent in class Component
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Container
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Container