com.ibm.calendar
Class ToDoPlugin

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by com.ibm.calendar.ToDoPlugin
All Implemented Interfaces:
Plugin, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class ToDoPlugin
extends java.awt.Panel
implements Plugin, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.io.Serializable

ToDoPlugin bean let the user to determin the date and time of a taske and return it to the user in the form of (date + time + todoitem).

See Also:
Vector, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ToDoPlugin()
          Constructor to ToDoPlugin.
ToDoPlugin(java.awt.LayoutManager layout)
          NotePlugin constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Method to handle events for the ActionListener interface.
 void addActionCanceledEventListener(ActionCanceledEventListener newListener)
          Adds an ActionCanceledEventListener to the listener list.
 void addActionDiscardEventListener(ActionDiscardEventListener newListener)
          Adds an ActionDiscardEventListener to the listener list.
 void addActionPerformedEventListener(ActionPerformedEventListener newListener)
          Adds an ActionPerformedEventListener to the listener list.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds an PropertyChangeListener to the listener list.
 void cancelButton_ActionEvents()
          The cancelButton_ActionEvents method excuted when cancelButton is pressed
 void changeTimeButton_ActionPerformed(java.awt.event.ActionEvent actionEvent)
          The changeTimeButton_ActionPerformed method excuted when cancelButton is pressed
 void choice1_ItemEvent()
          The choice1_ItemEvent method excuted when item selected
 void choice2_ItemEvent()
          The choice2_ItemEvent method excuted when item selected
 void discardButton_ActionPerformed(java.awt.event.ActionEvent actionEvent)
          Clear ToDo Plugin and Delete the Note From allToDoItems
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          The firePropertyChange method was generated to support the propertyChange field.
 void focusGained(java.awt.event.FocusEvent e)
          Method to handle events for the FocusListener interface.
 void focusLost(java.awt.event.FocusEvent e)
          Method to handle events for the FocusListener interface.
 java.lang.String getAboutThisBean()
          Gets the aboutThisBean property (java.lang.String) value.
 java.util.Vector getAllToDoItems()
          Gets the allNoteItems property (java.util.Vector) value.
 java.lang.String getSelectedDate()
          Gets the selectedDate property (java.lang.String) value.
 java.lang.String getText()
          Gets the text property (java.lang.String) value.
 void initPlugin()
          Initialize The Plugin
 void itemStateChanged(java.awt.event.ItemEvent e)
          Method to handle events for the ItemListener interface.
 void newToDoButton_ActionPerformed(java.awt.event.ActionEvent actionEvent)
          Clears The ToDo Plugin
 void noteText_FocusGained(java.awt.event.FocusEvent focusEvent)
          Set the Time Choice boxes To Enabled False
 void paint(java.awt.Graphics g)
          Draw The ToDo Plugin
 void removeActionCanceledEventListener(ActionCanceledEventListener newListener)
          Removes an ActionCanceledEventListener to the listener list.
 void removeActionDiscardEventListener(ActionDiscardEventListener newListener)
          Removes an ActionDiscardEventListener to the listener list.
 void removeActionPerformedEventListener(ActionPerformedEventListener newListener)
          Removes an ActionPerformedEventListener to the listener list.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes an PropertyChangeListener to the listener list.
 void setAboutThisBean(java.lang.String aboutThisBean)
          Sets the aboutThisBean property (java.lang.String) value.
 void setAllToDoItems(java.util.Vector allToDoItems)
          Sets the allToDoItems property (java.util.Vector) value.
 void setInfo(java.util.Calendar c, java.awt.Image i, int x, int y)
          initialize the plugin data.
 void setSelectedDate(java.lang.String selectedDate)
          Sets the selectedDate property (java.lang.String) value.
 void setText(java.lang.String text)
          Sets the text property (java.lang.String) value.
 void updateButton_ActionPerformed(java.awt.event.ActionEvent actionEvent)
          This method calls doOperation function to set the dayPlugin resultSelectedIntervalAsString property
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToDoPlugin

public ToDoPlugin()
Constructor to ToDoPlugin.


ToDoPlugin

public ToDoPlugin(java.awt.LayoutManager layout)
NotePlugin constructor.

Parameters:
layout - java.awt.LayoutManager
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Method to handle events for the ActionListener interface.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - java.awt.event.ActionEvent

addActionCanceledEventListener

public void addActionCanceledEventListener(ActionCanceledEventListener newListener)
Adds an ActionCanceledEventListener to the listener list.

Parameters:
newListener - The ActionCanceledEventListener to be added
See Also:
ActionCanceledEventListener, removeActionCanceledEventListener(com.ibm.calendar.events.ActionCanceledEventListener)

addActionDiscardEventListener

public void addActionDiscardEventListener(ActionDiscardEventListener newListener)
Adds an ActionDiscardEventListener to the listener list.

Parameters:
newListener - The ActionDiscardEventListener to be added
See Also:
ActionDiscardEventListener, removeActionDiscardEventListener(com.ibm.calendar.events.ActionDiscardEventListener)

addActionPerformedEventListener

public void addActionPerformedEventListener(ActionPerformedEventListener newListener)
Adds an ActionPerformedEventListener to the listener list.

Parameters:
newListener - The ActionPerformedEventListener to be added
See Also:
ActionPerformedEventListener, removeActionPerformedEventListener(com.ibm.calendar.events.ActionPerformedEventListener)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds an PropertyChangeListener to the listener list.

Overrides:
addPropertyChangeListener in class java.awt.Container
Parameters:
newListener - The PropertyChangeListener to be added
See Also:
com.ibm.calendar.events.PropertyChangeListener, removePropertyChangeListener(java.beans.PropertyChangeListener)

cancelButton_ActionEvents

public void cancelButton_ActionEvents()
The cancelButton_ActionEvents method excuted when cancelButton is pressed


changeTimeButton_ActionPerformed

public void changeTimeButton_ActionPerformed(java.awt.event.ActionEvent actionEvent)
The changeTimeButton_ActionPerformed method excuted when cancelButton is pressed

Parameters:
actionEvent - java.awt.event.ActionEvent

choice1_ItemEvent

public void choice1_ItemEvent()
The choice1_ItemEvent method excuted when item selected


choice2_ItemEvent

public void choice2_ItemEvent()
The choice2_ItemEvent method excuted when item selected


discardButton_ActionPerformed

public void discardButton_ActionPerformed(java.awt.event.ActionEvent actionEvent)
Clear ToDo Plugin and Delete the Note From allToDoItems

Parameters:
actionEvent - java.awt.event.ActionEvent

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
The firePropertyChange method was generated to support the propertyChange field.

Overrides:
firePropertyChange in class java.awt.Component
Parameters:
propertyName - String
oldValue - Object
newValue - Object

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Method to handle events for the FocusListener interface.

Specified by:
focusGained in interface java.awt.event.FocusListener
Parameters:
e - java.awt.event.FocusEvent

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Method to handle events for the FocusListener interface.

Specified by:
focusLost in interface java.awt.event.FocusListener
Parameters:
e - java.awt.event.FocusEvent

getAboutThisBean

public java.lang.String getAboutThisBean()
Gets the aboutThisBean property (java.lang.String) value.

Returns:
The aboutThisBean property value.
See Also:
setAboutThisBean(java.lang.String)

getAllToDoItems

public java.util.Vector getAllToDoItems()
Gets the allNoteItems property (java.util.Vector) value.

Returns:
The allNoteItems property value.
See Also:
#setAllNoteItems

getSelectedDate

public java.lang.String getSelectedDate()
Gets the selectedDate property (java.lang.String) value.

Returns:
The selectedDate property value.
See Also:
setSelectedDate(java.lang.String)

getText

public java.lang.String getText()
Gets the text property (java.lang.String) value.

Returns:
The text property value.
See Also:
setText(java.lang.String)

initPlugin

public void initPlugin()
Initialize The Plugin

Specified by:
initPlugin in interface Plugin

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Method to handle events for the ItemListener interface.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - java.awt.event.ItemEvent

newToDoButton_ActionPerformed

public void newToDoButton_ActionPerformed(java.awt.event.ActionEvent actionEvent)
Clears The ToDo Plugin

Parameters:
actionEvent - java.awt.event.ActionEvent

noteText_FocusGained

public void noteText_FocusGained(java.awt.event.FocusEvent focusEvent)
Set the Time Choice boxes To Enabled False

Parameters:
focusEvent - java.awt.event.FocusEvent

paint

public void paint(java.awt.Graphics g)
Draw The ToDo Plugin

Overrides:
paint in class java.awt.Container
Parameters:
g - java.awt.Graphics

removeActionCanceledEventListener

public void removeActionCanceledEventListener(ActionCanceledEventListener newListener)
Removes an ActionCanceledEventListener to the listener list.

Parameters:
newListener - The ActionCanceledEventListener to be removed
See Also:
ActionCanceledEventListener, addActionCanceledEventListener(com.ibm.calendar.events.ActionCanceledEventListener)

removeActionDiscardEventListener

public void removeActionDiscardEventListener(ActionDiscardEventListener newListener)
Removes an ActionDiscardEventListener to the listener list.

Parameters:
newListener - The ActionDiscardEventListener to be removed
See Also:
ActionDiscardEventListener, addActionDiscardEventListener(com.ibm.calendar.events.ActionDiscardEventListener)

removeActionPerformedEventListener

public void removeActionPerformedEventListener(ActionPerformedEventListener newListener)
Removes an ActionPerformedEventListener to the listener list.

Parameters:
newListener - The ActionPerformedEventListener to be removed
See Also:
ActionPerformedEventListener, addActionPerformedEventListener(com.ibm.calendar.events.ActionPerformedEventListener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes an PropertyChangeListener to the listener list.

Overrides:
removePropertyChangeListener in class java.awt.Component
Parameters:
newListener - The PropertyChangeListener to be removed
See Also:
com.ibm.calendar.events.PropertyChangeListener, addPropertyChangeListener(java.beans.PropertyChangeListener)

setAboutThisBean

public void setAboutThisBean(java.lang.String aboutThisBean)
Sets the aboutThisBean property (java.lang.String) value.

Parameters:
aboutThisBean - The new value for the property.
See Also:
getAboutThisBean()

setAllToDoItems

public void setAllToDoItems(java.util.Vector allToDoItems)
Sets the allToDoItems property (java.util.Vector) value.

Parameters:
allToDoItems - The new value for the property.
See Also:
getAllToDoItems()

setInfo

public void setInfo(java.util.Calendar c,
                    java.awt.Image i,
                    int x,
                    int y)
initialize the plugin data.

Specified by:
setInfo in interface Plugin
Parameters:
C - java.util.Calendar
i - java.awt.Image
x - int
y - int

setSelectedDate

public void setSelectedDate(java.lang.String selectedDate)
Sets the selectedDate property (java.lang.String) value.

Parameters:
selectedDate - The new value for the property.
See Also:
getSelectedDate()

setText

public void setText(java.lang.String text)
Sets the text property (java.lang.String) value.

Parameters:
text - The new value for the property.
See Also:
getText()

updateButton_ActionPerformed

public void updateButton_ActionPerformed(java.awt.event.ActionEvent actionEvent)
This method calls doOperation function to set the dayPlugin resultSelectedIntervalAsString property