/* THIS FILE IS AUTOMATICALLY GENERATED-- DO NOT MODIFY IT*/ package ca.weblite.codename1.cn1ml.demos; import com.codename1.ui.*; import com.codename1.ui.layouts.*; import com.codename1.ui.table.*; import com.codename1.ui.util.*; class MyOldForm { private Container rootContainer; private Resources resources; public Container getRoot() { if (rootContainer == null) { try { rootContainer = buildUI(); } catch (Exception ex) { ex.printStackTrace(); throw new RuntimeException(ex.getMessage()); } } return rootContainer; } private java.util.Map<String, Component> _nameIndex = new java.util.HashMap<String, Component>(); public Component get(String name) { getRoot(); return _nameIndex.get(name); } public MyOldForm(java.util.Map context) { for (Object o : context.values()) { if (o instanceof Resources) { resources = (Resources) o; } } } private Container buildUI() throws Exception { Container root = new Container(); BoxLayout rootLayout = new BoxLayout(BoxLayout.Y_AXIS); root.setLayout(rootLayout); Label node1 = new Label(); node1.setUIID("Title"); node1.setText("Hello World"); if (node1.getClientProperty("__CN1ML_NO_ADD__") == null && root != node1.getParent()) { root.addComponent(node1); } Button node2 = new Button(); node2.setText("Click Me"); if (node2.getClientProperty("__CN1ML_NO_ADD__") == null && root != node2.getParent()) { root.addComponent(node2); } TextField node3 = new TextField(); if (node3.getClientProperty("__CN1ML_NO_ADD__") == null && root != node3.getParent()) { root.addComponent(node3); } return root; } }