Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.ide.todo
Interface ToDoItem

All Superinterfaces:
Copyable, Displayable, Element, Locatable, LocatableItem
All Known Implementing Classes:
AbstractToDoItem

public interface ToDoItem
extends Copyable, LocatableItem, Element

The ToDoItem interface provides the API for dealing with ToDoItems. A ToDoItem represents some task that the user wants to track.

The interface defines a set of common data elements that will be displayed in the log page that displays ToDoItems. Special care should be taken with the data element priorityId. Priority id is an integer used to look up a priority object. The priority object contains a description, an integer used for ordering the priorities (so that ordering is not tied to the alphabetic description, consider ordering High, Medium, and Low if only ordered alphabetically), and an optional icon. Constants which can be used to represent pre-defined priorities of High, Medium, and Low can be found in ToDoManager.

The simplest way to create a ToDoItem is to extend the AbstractToDoItem and use the methods in ToDoManager to manipulate the list of ToDoItems.

The Copyable interface is used as the to do item is copied before an editor to modify the to do item is opened. This allows the user to cancel the editor after making changes without affecting the base object.


Method Summary
 boolean canGoTo()
          Called to determine if the to do item allows the goTo() action
 void dispose()
          Called when the to do item is being deleted.
 java.util.Date getDate()
          Gets the Date associated with the to do item
 int getPriorityId()
          Gets the priority id.
 java.lang.String getText()
          Gets the descriptive text of the to do item
 java.lang.Object getUserData()
          Gets the user-specified data object
 void goTo()
          Called when the to do item is double-clicked in the ToDoLogPage
 boolean isDone()
          Gets whether the to do item has been marked as complete or not
 boolean isEditable()
          Determines whether the to do item can be edited.
 void setDate(java.util.Date date)
          Sets the Date associated with the to do item
 void setDone(boolean done)
          Sets whether the to do item is completed or not
 void setPriorityId(int priorityId)
          Sets the priority id.
 void setText(java.lang.String text)
          Sets the descriptive text of the to do item
 void setUserData(java.lang.Object userData)
          Sets the user-specified data object
 boolean shouldPersist()
          Determines whether the IDE should persist the ToDoItem in it's data file.
 void stateChanged()
          Called when the state of the ToDoItem has changed

 

Methods inherited from interface oracle.javatools.util.Copyable
copyTo

 

Methods inherited from interface oracle.ide.model.LocatableItem
getColumn, getLine, setLine

 

Methods inherited from interface oracle.ide.model.Locatable
getURL, setURL

 

Methods inherited from interface oracle.ide.model.Element
getAttributes, getChildren, getData, mayHaveChildren

 

Methods inherited from interface oracle.ide.model.Displayable
getIcon, getLongLabel, getShortLabel, getToolTipText, toString

 

Method Detail

getText

java.lang.String getText()
Gets the descriptive text of the to do item
Returns:
the description of the to do item

setText

void setText(java.lang.String text)
Sets the descriptive text of the to do item
Parameters:
text - the description of the to do item

isDone

boolean isDone()
Gets whether the to do item has been marked as complete or not
Returns:
true if the to do item is marked as completed; false otherwise

setDone

void setDone(boolean done)
Sets whether the to do item is completed or not
Parameters:
done - true if the to do item is completed; false otherwise

getDate

java.util.Date getDate()
Gets the Date associated with the to do item
Returns:
the Date associated with the to do item

setDate

void setDate(java.util.Date date)
Sets the Date associated with the to do item
Parameters:
date - the Date to associate this to do item with

getUserData

java.lang.Object getUserData()
Gets the user-specified data object
Returns:

setUserData

void setUserData(java.lang.Object userData)
Sets the user-specified data object
Parameters:
userData -

getPriorityId

int getPriorityId()
Gets the priority id. Typically this is not used by anything but code used to persist the data.
Returns:
the priority id of the ToDoItem

setPriorityId

void setPriorityId(int priorityId)
Sets the priority id. Since the priority id is an integer it will default to 0 which is also the NO_PRIORITY setting from ToDoManager. ToDoManager provides constants for pre-defined High, Medium, and Low priorities.
Parameters:
priorityId - the priority id to set on the ToDoItem

isEditable

boolean isEditable()
Determines whether the to do item can be edited. To do items that are created from to do tags in source code are not editable. To remove them or change them you must change the source code and add or edit the to do tag there. To do items not created from tags in source code are editable.
Returns:
true if the to do item can be edited; false otherwise

shouldPersist

boolean shouldPersist()
Determines whether the IDE should persist the ToDoItem in it's data file. The IDE will use Object2Dom to save the ToDoItem
Returns:
true if the IDE should persist the item in it's data file; false otherwise

goTo

void goTo()
Called when the to do item is double-clicked in the ToDoLogPage

canGoTo

boolean canGoTo()
Called to determine if the to do item allows the goTo() action

dispose

void dispose()
Called when the to do item is being deleted.

stateChanged

void stateChanged()
Called when the state of the ToDoItem has changed

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.