/* THIS FILE IS AUTOMATICALLY GENERATED-- DO NOT MODIFY IT*/
package ca.weblite.codename1.cn1ml.demos;
import com.codename1.ui.*;
import com.codename1.components.*;
import com.codename1.ui.layouts.*;
import com.codename1.ui.table.*;
import com.codename1.ui.util.*;
class LoginPanel {
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 LoginPanel(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();
BorderLayout rootLayout = new BorderLayout();
root.setLayout(rootLayout);
Container node1 = new Container();
FlowLayout node1Layout = new FlowLayout();
node1.setLayout(node1Layout);
node1.addComponent(new Label("Login"));
if (node1.getClientProperty("__CN1ML_NO_ADD__") == null && root != node1.getParent()){
root.addComponent(BorderLayout.NORTH, node1);
}
Container node2 = new Container();
FlowLayout node2Layout = new FlowLayout();
node2.setLayout(node2Layout);
Container node3 = new Container();
TableLayout node3Layout = new TableLayout(4,2);
node3.setLayout(node3Layout);
Container node4 = new Container();
FlowLayout node4Layout = new FlowLayout();
node4.setLayout(node4Layout);
init1_node4(node4, node3);
node4.addComponent(new Label("Username"));
if (node4.getClientProperty("__CN1ML_NO_ADD__") == null && node3 != node4.getParent()){
node3.addComponent(node4);
}
Container node5 = new Container();
FlowLayout node5Layout = new FlowLayout();
node5.setLayout(node5Layout);
init2_node5(node5, node3);
TextField node6 = new TextField();
node6.setName("nameField");
_nameIndex.put("nameField", node6);
if (node6.getClientProperty("__CN1ML_NO_ADD__") == null && node5 != node6.getParent()){
node5.addComponent(node6);
}
if (node5.getClientProperty("__CN1ML_NO_ADD__") == null && node3 != node5.getParent()){
node3.addComponent(node5);
}
Container node7 = new Container();
FlowLayout node7Layout = new FlowLayout();
node7.setLayout(node7Layout);
init3_node7(node7, node3);
node7.addComponent(new Label("Password"));
if (node7.getClientProperty("__CN1ML_NO_ADD__") == null && node3 != node7.getParent()){
node3.addComponent(node7);
}
Container node8 = new Container();
FlowLayout node8Layout = new FlowLayout();
node8.setLayout(node8Layout);
init4_node8(node8, node3);
TextField node9 = new TextField();
node9.setOverwriteMode(true);
node9.setName("passwordField");
_nameIndex.put("passwordField", node9);
if (node9.getClientProperty("__CN1ML_NO_ADD__") == null && node8 != node9.getParent()){
node8.addComponent(node9);
}
if (node8.getClientProperty("__CN1ML_NO_ADD__") == null && node3 != node8.getParent()){
node3.addComponent(node8);
}
Container node10 = new Container();
FlowLayout node10Layout = new FlowLayout();
node10.setLayout(node10Layout);
init5_node10(node10, node3);
SpanLabel node11 = new SpanLabel();
node11.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
if (node11.getClientProperty("__CN1ML_NO_ADD__") == null && node10 != node11.getParent()){
node10.addComponent(node11);
}
if (node10.getClientProperty("__CN1ML_NO_ADD__") == null && node3 != node10.getParent()){
node3.addComponent(node10);
}
Container node12 = new Container();
FlowLayout node12Layout = new FlowLayout();
node12.setLayout(node12Layout);
init6_node12(node12, node3);
Button node13 = new Button();
node13.setName("submit");
_nameIndex.put("submit", node13);
node13.setText("Submit");
if (node13.getClientProperty("__CN1ML_NO_ADD__") == null && node12 != node13.getParent()){
node12.addComponent(node13);
}
if (node12.getClientProperty("__CN1ML_NO_ADD__") == null && node3 != node12.getParent()){
node3.addComponent(node12);
}
if (node3.getClientProperty("__CN1ML_NO_ADD__") == null && node2 != node3.getParent()){
node2.addComponent(node3);
}
if (node2.getClientProperty("__CN1ML_NO_ADD__") == null && root != node2.getParent()){
root.addComponent(BorderLayout.CENTER, node2);
}
Container node14 = new Container();
FlowLayout node14Layout = new FlowLayout();
node14.setLayout(node14Layout);
node14.addComponent(new Label("Good Bye World"));
if (node14.getClientProperty("__CN1ML_NO_ADD__") == null && root != node14.getParent()){
root.addComponent(BorderLayout.SOUTH, node14);
}
return root;
}
private void init1_node4(Container self, Container parent){
TableLayout l = (TableLayout)parent.getLayout(); TableLayout.Constraint c = l.createConstraint(0,0); c.setVerticalSpan(1); c.setHorizontalSpan(1); parent.addComponent(c, self);
}
private void init2_node5(Container self, Container parent){
TableLayout l = (TableLayout)parent.getLayout(); TableLayout.Constraint c = l.createConstraint(0,1); c.setVerticalSpan(1); c.setHorizontalSpan(1); parent.addComponent(c, self);
}
public TextField getNameField(){
return (TextField)get("nameField");
}
private void init3_node7(Container self, Container parent){
TableLayout l = (TableLayout)parent.getLayout(); TableLayout.Constraint c = l.createConstraint(1,0); c.setVerticalSpan(1); c.setHorizontalSpan(1); parent.addComponent(c, self);
}
private void init4_node8(Container self, Container parent){
TableLayout l = (TableLayout)parent.getLayout(); TableLayout.Constraint c = l.createConstraint(1,1); c.setVerticalSpan(1); c.setHorizontalSpan(1); parent.addComponent(c, self);
}
public TextField getPasswordField(){
return (TextField)get("passwordField");
}
private void init5_node10(Container self, Container parent){
TableLayout l = (TableLayout)parent.getLayout(); TableLayout.Constraint c = l.createConstraint(2,0); c.setVerticalSpan(1); c.setHorizontalSpan(2); parent.addComponent(c, self);
}
private void init6_node12(Container self, Container parent){
TableLayout l = (TableLayout)parent.getLayout(); TableLayout.Constraint c = l.createConstraint(3,0); c.setVerticalSpan(1); c.setHorizontalSpan(2); parent.addComponent(c, self);
}
public Button getSubmit(){
return (Button)get("submit");
}
}