CodenameOne icon indicating copy to clipboard operation
CodenameOne copied to clipboard

Dialog is not modifiable

Open ddyer0 opened this issue 3 years ago • 0 comments

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); ...

ddyer0 avatar Jan 20 '22 21:01 ddyer0