All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.gui.DateBox

java.lang.Object
   |
   +----com.bulletproof.gui.Component
           |
           +----com.bulletproof.gui.DateBox

public class DateBox
extends Component
implements ActionListener
DateBox is a component that implements a date pulldown.


Variable Index

 o ampm
 o textField
 o time

Constructor Index

 o DateBox()
Constructs a new DateBox.
 o DateBox(String)
Constructs a new DateBox initialized with the specified text date.
 o DateBox(String, int)
Constructs a new DateBox initialized with the specified text date.

Method Index

 o actionPerformed(ActionEvent)
 o addActionListener(ActionListener)
 o displayPopup()
 o getCaretPosition()
Returns the position of the text insertion caret for the DateBox component.
 o getDate()
Get the currently displayed date.
 o getMinimumSize()
Gets the minimum size of this component.
 o getSelectedText()
Returns the current selected text value this DateBox
 o getSelectionEnd()
Returns the selected DateBox's end position.
 o getSelectionStart()
Returns the selected DateBox's end position.
 o getText()
Returns the current text value this TextField
 o getTimeVisible()
Get whether the time is being displayed
 o isEditable()
Returns the boolean indicating whether this DateBox is editable or not.
 o paint(Graphics)
Paints the component.
 o processFocusEvent(FocusEvent)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
 o processKeyEvent(KeyEvent)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
 o processMouseEvent(MouseEvent)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
 o removeActionListener(ActionListener)
 o select(int, int)
Sets the new selected text value this DateBox
 o setCaretPosition(int)
Sets the position of the text insertion caret for the DateBox
 o setDate(Date)
Set the currently displayed date.
 o setEditable(boolean)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.
 o setText(String)
Sets the new text value this TextField
 o setTextNoRepaint(String)
Sets the new text value this TextField
 o setTimeVisible(boolean)
Set whether the time should be displayed along side the date
 o validate()
Ensures that a component has a valid layout.

Variables

 o textField
 public TextField textField
 o time
 public TextField time
 o ampm
 public Choice ampm

Constructors

 o DateBox
 public DateBox()
Constructs a new DateBox.

 o DateBox
 public DateBox(String date)
Constructs a new DateBox initialized with the specified text date.

Parameters:
text - the text to be displayed
 o DateBox
 public DateBox(String date,
                int minWidth)
Constructs a new DateBox initialized with the specified text date.

Parameters:
text - the text to be displayed
minWidth - the minimum width in pixels of this DateBox

Methods

 o addActionListener
 public void addActionListener(ActionListener al)
 o removeActionListener
 public void removeActionListener(ActionListener al)
 o setTimeVisible
 public void setTimeVisible(boolean vis)
Set whether the time should be displayed along side the date

Parameters:
vis - whether the time should be displayed along side the date
 o getTimeVisible
 public boolean getTimeVisible()
Get whether the time is being displayed

Returns:
whether the time is being displayed along side the date
 o getText
 public String getText()
Returns the current text value this TextField

Returns:
the current text value this TextField
 o setText
 public void setText(String s)
Sets the new text value this TextField

Parameters:
the - new text value this TextField
 o setTextNoRepaint
 public void setTextNoRepaint(String s)
Sets the new text value this TextField

Parameters:
the - new text value this TextField
 o setDate
 public void setDate(Date date)
Set the currently displayed date.

Parameters:
date - the current date to select.
 o getDate
 public Date getDate()
Get the currently displayed date.

Returns:
the currently displayed date.
 o getSelectedText
 public String getSelectedText()
Returns the current selected text value this DateBox

Returns:
the current selected text value this DateBox
 o getSelectionStart
 public int getSelectionStart()
Returns the selected DateBox's end position.

 o getSelectionEnd
 public int getSelectionEnd()
Returns the selected DateBox's end position.

 o setCaretPosition
 public void setCaretPosition(int position)
Sets the position of the text insertion caret for the DateBox

Parameters:
position - the position
 o getCaretPosition
 public int getCaretPosition()
Returns the position of the text insertion caret for the DateBox component.

Returns:
the position of the text insertion caret for the text component.
 o select
 public void select(int s0,
                    int s1)
Sets the new selected text value this DateBox

Parameters:
the - new selected text from value this DateBox
the - new selected text to value this DateBox
 o isEditable
 public boolean isEditable()
Returns the boolean indicating whether this DateBox is editable or not.

See Also:
setEditable
 o setEditable
 public synchronized void setEditable(boolean b)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.

Parameters:
b - the boolean to be set
See Also:
isEditable
 o validate
 public void validate()
Ensures that a component has a valid layout.

Overrides:
validate in class Component
 o paint
 public synchronized void paint(Graphics g)
Paints the component.

Overrides:
paint in class Component
 o processKeyEvent
 public synchronized void processKeyEvent(KeyEvent ke)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.

Overrides:
processKeyEvent in class Component
 o processMouseEvent
 public synchronized void processMouseEvent(MouseEvent me)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

Overrides:
processMouseEvent in class Component
 o processFocusEvent
 public synchronized void processFocusEvent(FocusEvent fe)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.

Overrides:
processFocusEvent in class Component
 o actionPerformed
 public void actionPerformed(ActionEvent e)
 o displayPopup
 public void displayPopup()
 o getMinimumSize
 public Dimension getMinimumSize()
Gets the minimum size of this component.

Overrides:
getMinimumSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index