ItEr14S13RFComportamentoGraficoPlanificador: When you are in the last taskdetail you can create a new task using down arrow.

This commit is contained in:
Óscar González Fernández 2009-06-29 14:36:12 +02:00 committed by Javier Moran Rua
parent 9f7024b9d8
commit b546bda82a

View file

@ -149,9 +149,20 @@ public class TaskDetail extends HtmlMacroComponent implements AfterCompose {
TaskDetail belowDetail = getBelowDetail();
if (belowDetail != null) {
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) {
Navigation navigation = Navigation.getIntentFrom(keyEvent);
List<Textbox> textBoxSiblingsIncludedItself = getTextBoxSiblingsIncludedItself(textbox);