public class ReportView extends org.jdesktop.application.FrameView implements DocumentListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
canSendMail
Can send mail property.
|
protected JCheckBox |
checkIncludesAnnotations
Include annotations on reports
|
protected JCheckBox |
checkIncludesAnnotationsTime
Include annotations time on reports
|
protected TimerCore |
core
Timer core.
|
protected org.jdesktop.swingx.JXDatePicker |
datePickerFrom
Date pickers, from...
|
protected org.jdesktop.swingx.JXDatePicker |
datePickerTo
Date pickers, from...
|
protected static org.apache.commons.logging.Log |
log
Class logger
|
protected JTree |
projectsTree
Project tree (with checkbox)
|
protected JRadioButton |
radioByDay
Report sorting : day
|
protected JRadioButton |
radioByMonth
Report sorting : month
|
protected JRadioButton |
radioByProject
Report sorting : project
|
protected JRadioButton |
radioByWeek
Report sorting : week
|
protected JRadioButton |
radioByYear
Report sorting : year
|
protected JTextArea |
reportArea
Report output
|
protected ReportGenerator |
reportGenerator
Report process generator
|
protected JCheckBox |
showHiddenProjectBox
Show hidden project box.
|
protected Set<TimerTask> |
uncheckedTaskSet
Unselected task set.
|
Constructor and Description |
---|
ReportView(org.jdesktop.application.Application application,
TimerCore core)
Reposts constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
changedUpdate(DocumentEvent e) |
void |
closeView()
Close action.
|
void |
currentWeek()
Select current week in date pickers.
|
protected void |
documentChanged()
Document content changed.
|
protected void |
fillPickerDates(int delay)
Fill picker date with predefined week selection (from current)
and apply a delay (-1 = previous week).
|
void |
generateReport()
Make report.
|
protected JComponent |
getMainComponent()
Get main view component.
|
protected List<TimerProject> |
getSelectedProjects(List<TimerProject> projects,
Collection<TimerTask> uncheckedTaskList)
Get project list without project and task unselected in tree.
|
protected List<TimerTask> |
getSelectedTasks(List<? extends TimerTask> tasks,
Collection<TimerTask> uncheckedTaskList)
Get tasks list without tasks unselected in tree.
|
void |
insertUpdate(DocumentEvent e) |
boolean |
isSendMailEnabled()
Can send mail ?
|
void |
previousWeek()
Display previous week in date pickers.
|
void |
removeUpdate(DocumentEvent e) |
void |
reportAnnotations()
Show annotation checkbox checked.
|
void |
sendMail()
Send report by mail.
|
void |
setSendMailEnabled(boolean enabled)
Change can send mail property.
|
void |
showHiddenProjects()
Update tree, showing hidden projects or not.
|
getApplication, getComponent, getContext, getMenuBar, getResourceMap, getStatusBar, getToolBar, getToolBars, setComponent, setMenuBar, setStatusBar, setToolBar, setToolBars
protected static org.apache.commons.logging.Log log
protected TimerCore core
protected JRadioButton radioByDay
protected JRadioButton radioByMonth
protected JRadioButton radioByWeek
protected JRadioButton radioByYear
protected JRadioButton radioByProject
protected JCheckBox checkIncludesAnnotations
protected JCheckBox checkIncludesAnnotationsTime
protected org.jdesktop.swingx.JXDatePicker datePickerFrom
protected org.jdesktop.swingx.JXDatePicker datePickerTo
protected JTree projectsTree
protected JCheckBox showHiddenProjectBox
protected ReportGenerator reportGenerator
protected JTextArea reportArea
protected boolean canSendMail
public ReportView(org.jdesktop.application.Application application, TimerCore core)
application
- parent referencecore
- core referenceprotected JComponent getMainComponent()
@Action public void currentWeek()
@Action public void previousWeek()
protected void fillPickerDates(int delay)
delay
- delay to add to current week@Action public void closeView()
@Action public void reportAnnotations()
@Action public void generateReport()
reportArea
text area.protected List<TimerProject> getSelectedProjects(List<TimerProject> projects, Collection<TimerTask> uncheckedTaskList)
projects
- original project listuncheckedTaskList
- unselected task listprotected List<TimerTask> getSelectedTasks(List<? extends TimerTask> tasks, Collection<TimerTask> uncheckedTaskList)
tasks
- original project listuncheckedTaskList
- unselected task list@Action public void showHiddenProjects()
@Action(enabledProperty="sendMailEnabled") public void sendMail()
public boolean isSendMailEnabled()
public void setSendMailEnabled(boolean enabled)
enabled
- can send mailpublic void changedUpdate(DocumentEvent e)
changedUpdate
in interface DocumentListener
public void insertUpdate(DocumentEvent e)
insertUpdate
in interface DocumentListener
public void removeUpdate(DocumentEvent e)
removeUpdate
in interface DocumentListener
protected void documentChanged()
Copyright © 2007–2013 CodeLutin. All rights reserved.