public class RegularTask extends Task
Modifier and Type | Field and Description |
---|---|
static int |
FREQUENCY_DAILY
Regular task that repeats every day.
|
static int |
FREQUENCY_FRIDAY
Regular task that repeats every Friday.
|
static int |
FREQUENCY_MONDAY
Regular task that repeats every Monday.
|
static int |
FREQUENCY_SATURDAY
Regular task that repeats every Saturday.
|
static int |
FREQUENCY_SUNDAY
Regular task that repeats every Sunday.
|
static int |
FREQUENCY_THURSDAY
Regular task that repeats every Thursday.
|
static int |
FREQUENCY_TUESDAY
Regular task that repeats every Tuesday.
|
static int |
FREQUENCY_WEDNESDAY
Regular task that repeats every Wednesday.
|
static int |
FREQUENCY_WEEKEND
Regular task that repeats every weekend day.
|
static int |
FREQUENCY_WORKDAY
Regular task that repeats every working day.
|
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_MEDIUM, STATE_DONE, STATE_NEW, STATE_STARTED
Constructor and Description |
---|
RegularTask(java.lang.String description,
java.lang.String keyword,
java.lang.String notes,
int priority,
int state,
long duration,
java.util.Date notificationTime,
boolean automaticStart,
boolean privateTask,
int frequency)
Creates a new instance of regular task.
|
Modifier and Type | Method and Description |
---|---|
Task |
cloneTask()
Returns clone of itself with time set to 0 and state set to STATE_NEW.
|
int |
getFrequency()
Returns how often task is repeated.
|
static java.lang.String |
getFrequency(int frequency)
Returns how often task is repeated.
|
boolean |
isPlannedFor(Day day)
Verifies if task is planned for given day.
|
void |
setFrequency(int frequency)
Sets how often task is repeated.
|
void |
writeRepetition(java.io.PrintStream stream)
Writes information about repetition of task.
|
addDuration, addNote, addPropertyChangeListener, automaticStart, compare, getDescription, getDuration, getKeyword, getKeywordIterator, getNotes, getNotificationTime, getPriority, getPriority, getState, getState, isIdleTask, isRunning, privateTask, removePropertyChangeListener, setAutomaticStart, setDescription, setDuration, setKeyword, setNotes, setNotificationTime, setPriority, setPrivateTask, setState, startWork, suspendWork, tick, toString, workDone, write
public static int FREQUENCY_DAILY
public static int FREQUENCY_MONDAY
public static int FREQUENCY_TUESDAY
public static int FREQUENCY_WEDNESDAY
public static int FREQUENCY_THURSDAY
public static int FREQUENCY_FRIDAY
public static int FREQUENCY_SATURDAY
public static int FREQUENCY_SUNDAY
public static int FREQUENCY_WORKDAY
public static int FREQUENCY_WEEKEND
public RegularTask(java.lang.String description, java.lang.String keyword, java.lang.String notes, int priority, int state, long duration, java.util.Date notificationTime, boolean automaticStart, boolean privateTask, int frequency)
description
- Description of task.keyword
- Arbitrary text for grouping tasks etc.notes
- Notes of task.priority
- Priority of task.state
- State of progress of task.duration
- Time in ms that was already spent on task.notificationTime
- Time when system should warn about task.automaticStart
- Should system switch to task automatically ?privateTask
- Is this task private ?frequency
- Frequency of task's repetitions.public void setFrequency(int frequency)
frequency
- Frequency of task's repetitions.public int getFrequency()
public static java.lang.String getFrequency(int frequency)
frequency
- Frequency of task's repetitions as number.public void writeRepetition(java.io.PrintStream stream) throws java.io.IOException
writeRepetition
in class Task
stream
- Print stream where repetition info will be written.java.io.IOException
- Input/output exception thrown when some error during writing repetition information occurs.public boolean isPlannedFor(Day day)
day
- Day to be checked.