ItEr14S13RFComportamentoGraficoPlanificador: When you are in the last taskdetail you can create a new task using down arrow.
This commit is contained in:
parent
9f7024b9d8
commit
b546bda82a
1 changed files with 11 additions and 0 deletions
|
|
@ -149,9 +149,20 @@ public class TaskDetail extends HtmlMacroComponent implements AfterCompose {
|
||||||
TaskDetail belowDetail = getBelowDetail();
|
TaskDetail belowDetail = getBelowDetail();
|
||||||
if (belowDetail != null) {
|
if (belowDetail != null) {
|
||||||
belowDetail.receiveFocus(position);
|
belowDetail.receiveFocus(position);
|
||||||
|
} else {
|
||||||
|
ListDetails listDetails = getListDetails();
|
||||||
|
listDetails.addTask();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ListDetails getListDetails() {
|
||||||
|
Component current = getParent();
|
||||||
|
while (!(current instanceof ListDetails)) {
|
||||||
|
current = current.getParent();
|
||||||
|
}
|
||||||
|
return (ListDetails) current;
|
||||||
|
}
|
||||||
|
|
||||||
public void userWantsToMove(Textbox textbox, KeyEvent keyEvent) {
|
public void userWantsToMove(Textbox textbox, KeyEvent keyEvent) {
|
||||||
Navigation navigation = Navigation.getIntentFrom(keyEvent);
|
Navigation navigation = Navigation.getIntentFrom(keyEvent);
|
||||||
List<Textbox> textBoxSiblingsIncludedItself = getTextBoxSiblingsIncludedItself(textbox);
|
List<Textbox> textBoxSiblingsIncludedItself = getTextBoxSiblingsIncludedItself(textbox);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue