CodenameOne
CodenameOne copied to clipboard
Dialog is not modifiable
The class com.ui.Dialog is impossible to subclass, and is not written in a way that it can be copied and modified - it uses non-public methods of other classes in com.ui , which overall makes it's functionality difficult to replicate.
Short of a major rewrite, just making a factory method for the class would help a lot. Also, making all the private variables public would be extremely useful.
Something like: public static makeNewDialog(String name) { return new Dialog(name); } public static Command show(String title, Component body, Command defaultCommand, Command[] cmds, int type, Image icon, long timeout, Transition transition) { Dialog dialog = makeNewDialog(title); ...