BrightSide Workbench Full Report + Source Code
org.turro.issue.wizard.CommentPanel Class Reference
Inheritance diagram for org.turro.issue.wizard.CommentPanel:
Collaboration diagram for org.turro.issue.wizard.CommentPanel:

Public Member Functions

boolean doEnter ()
 
boolean doLeave (boolean forwards)
 
void onChange $inputexpenses ()
 
void onChange $inputhours ()
 
void onChange $inputprice ()
 
void onChange $startDate ()
 
- Public Member Functions inherited from org.turro.zkoss.wizard.WizardPanelComposer
Object getObjectValue ()
 
void setObjectValue (Object objectValue)
 
boolean doFinish ()
 
boolean doCancel ()
 
void setShouldSkip (boolean shouldSkip)
 
void setFinalSplash (boolean finalSplash)
 
void setAllowPrior (boolean allowPrior)
 
void setAllowNext (boolean allowNext)
 
void setAllowFinish (boolean allowFinish)
 
void setAllowCancel (boolean allowCancel)
 
boolean isShouldSkip ()
 
boolean isFinalSplash ()
 
boolean isAllowPrior ()
 
boolean isAllowNext ()
 
boolean isAllowFinish ()
 
boolean isAllowCancel ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 41 of file CommentPanel.java.

Member Function Documentation

◆ $inputexpenses()

void onChange org.turro.issue.wizard.CommentPanel.$inputexpenses ( )

Definition at line 136 of file CommentPanel.java.

136  {
137  updateWhatsLeft();
138  }

◆ $inputhours()

void onChange org.turro.issue.wizard.CommentPanel.$inputhours ( )

Definition at line 140 of file CommentPanel.java.

140  {
141  updateWhatsLeft();
142  }

◆ $inputprice()

void onChange org.turro.issue.wizard.CommentPanel.$inputprice ( )

Definition at line 144 of file CommentPanel.java.

144  {
145  updateWhatsLeft();
146  }

◆ $startDate()

void onChange org.turro.issue.wizard.CommentPanel.$startDate ( )

Definition at line 148 of file CommentPanel.java.

148  {
149  array.setDisabled(startDate.getValue() == null);
150  count.setDisabled(array.isDisabled());
151  }
Here is the caller graph for this function:

◆ doEnter()

boolean org.turro.issue.wizard.CommentPanel.doEnter ( )

Reimplemented from org.turro.zkoss.wizard.WizardPanelComposer.

Definition at line 55 of file CommentPanel.java.

55  {
56  Application app = Application.getApplication();
57  IssueWizard iw = (IssueWizard) getObjectValue();
58  commentDate.setValue(iw.date);
59  commentDate.setLenient(true);
60  commentDate.setFormat("short+short");
61  commentDate.setDisabled(!app.isInRole("issue:all"));
62  commentDate.setButtonVisible(!commentDate.isDisabled());
63  comment.setValue(iw.comment);
64  control.setValue(iw.issue.getControlDate());
65  control.setLenient(true);
66  control.setFormat("short+short");
67  delivery.setValue(iw.issue.getDelivery());
68  delivery.setLenient(true);
69  delivery.setFormat("short+short");
70  realexpenses.setDouble(iw.getIssue().getSumExpenses());
71  realhours.setDouble(iw.getIssue().getSumHours());
72  realprice.setDouble(iw.getIssue().getSumPrice());
73  inputexpenses.setValue(iw.expenses);
74  inputhours.setValue(iw.hours);
75  inputprice.setValue(iw.price);
76  startDate.setValue(iw.issue.getStartDate());
77  startDate.setLenient(true);
78  startDate.setFormat("short+short");
79  expenses.setValue(iw.issue.getExpenses());
80  hours.setValue(iw.issue.getHours());
81  price.setValue(iw.issue.getPrice());
82  updateWhatsLeft();
83  arrayPanel.setVisible(iw.issue.getId() == null || iw.issue.getId() == 0L);
84  onChange$startDate();
85  return true;
86  }
LabelExtended setDouble(double value)
Here is the call graph for this function:

◆ doLeave()

boolean org.turro.issue.wizard.CommentPanel.doLeave ( boolean  forwards)

Reimplemented from org.turro.zkoss.wizard.WizardPanelComposer.

Definition at line 89 of file CommentPanel.java.

89  {
90  ChangeCategory issueCat = new ChangeCategory(2, I_.get("Changes"));
91  ChangeCategory commentCat = new ChangeCategory(5, I_.get("Comment"));
92  IssueWizard iw = (IssueWizard) getObjectValue();
93  if(commentDate.getValue() != null) iw.date = commentDate.getValue();
94  iw.comment = comment.getValue();
95  iw.changes.addChange(new DateTimeChange(issueCat, I_.get("Control"),
96  iw.issue.getControlDate(), control.getValue()));
97  iw.issue.setControlDate(control.getValue());
98  iw.changes.addChange(new DateTimeChange(issueCat, I_.get("Delivery"),
99  iw.issue.getDelivery(), delivery.getValue()));
100  iw.issue.setDelivery(delivery.getValue());
101  iw.expenses = inputexpenses.getDoubleValue();
102  iw.hours = inputhours.getDoubleValue();
103  iw.price = inputprice.getDoubleValue();
104  if(!Strings.isBlank(iw.comment)) {
105  iw.changes.addComment(commentCat, iw.comment);
106  }
107  if(iw.expenses != 0.0d) {
108  iw.changes.addChange(new UniqueNumber(issueCat, I_.get("Expenses"),
109  iw.expenses));
110  }
111  if(iw.hours != 0.0d) {
112  iw.changes.addChange(new UniqueNumber(issueCat, I_.get("Hours"),
113  iw.hours));
114  }
115  if(iw.price != 0.0d) {
116  iw.changes.addChange(new UniqueNumber(issueCat, I_.get("Price"),
117  iw.price));
118  }
119  iw.changes.addChange(new DateTimeChange(issueCat, I_.get("Start date"),
120  iw.issue.getStartDate(), startDate.getValue()));
121  iw.issue.setStartDate(startDate.getValue());
122  iw.changes.addChange(new NumberChange(issueCat, I_.get("Prevision") + "/" + I_.get("Expenses"),
123  iw.issue.getExpenses(), expenses.getDoubleValue()));
124  iw.issue.setExpenses(expenses.getDoubleValue());
125  iw.changes.addChange(new NumberChange(issueCat, I_.get("Prevision") + "/" + I_.get("Hours"),
126  iw.issue.getHours(), hours.getDoubleValue()));
127  iw.issue.setHours(hours.getDoubleValue());
128  iw.changes.addChange(new NumberChange(issueCat, I_.get("Prevision") + "/" + I_.get("Price"),
129  iw.issue.getPrice(), price.getDoubleValue()));
130  iw.issue.setPrice(price.getDoubleValue());
131  iw.repeat = array.getObjectValue();
132  iw.repeatCount = count.intValue();
133  return !forwards || ( true );
134  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: