Skip to content

Commit

Permalink
Added ability to modify/get the current form
Browse files Browse the repository at this point in the history
  • Loading branch information
shai-almog authored Nov 8, 2022
1 parent 386c102 commit 596beed
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CodenameOne/src/com/codename1/system/Lifecycle.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public void start() {
runApp();
}


/**
* This method is invoked by start to show the first form of the application
*/
Expand All @@ -156,4 +157,20 @@ public void stop() {
*/
public void destroy() {
}

/**
* The current form within the application lifecycle which possibly differs from the one in the implementation
*/
protected Form getCurrentForm() {
return current;
}

/**
* The current form within the application lifecycle which possibly differs from the one in the implementation
*
* @param current the new current Form
*/
protected void setCurrentForm(Form current) {
this.current = current;
}
}

0 comments on commit 596beed

Please sign in to comment.