protected boolean onPersonalinfoDone() { TextField t = (TextField) findByName("thispass", perosnl); TextField t2 = (TextField) findByName("nowpass", perosnl); TextField l = (TextField) findByName("path11", perosnl); int indecate = 0; Label l2 = (Label) findByName("Label32", perosnl); if (!t2.getText().equals("")) { if (t.getText().equals(password.getText())) { checkpass = t2.getText(); } else { l2.setText("error password miss match"); indecate = 1; } } if (l.getText() != null) { imgpath = l.getText(); } if (indecate == 0) { Myprofile.show(); // showForm("MyProfile", null); } boolean val = super.onPersonalinfoDone(); return val; }
public void startApp() { Display.init(this); installTheme(); createUI(); mHomeForm.show(); }
public Container startApp(Resources res, String resPath, boolean loadTheme) { initVars(); UIBuilder.registerCustomComponent("Button", com.codename1.ui.Button.class); UIBuilder.registerCustomComponent("ComponentGroup", com.codename1.ui.ComponentGroup.class); UIBuilder.registerCustomComponent("MapComponent", com.codename1.maps.MapComponent.class); UIBuilder.registerCustomComponent("Tabs", com.codename1.ui.Tabs.class); UIBuilder.registerCustomComponent("MultiButton", com.codename1.components.MultiButton.class); UIBuilder.registerCustomComponent("Form", com.codename1.ui.Form.class); UIBuilder.registerCustomComponent("Label", com.codename1.ui.Label.class); UIBuilder.registerCustomComponent("TextArea", com.codename1.ui.TextArea.class); UIBuilder.registerCustomComponent("Container", com.codename1.ui.Container.class); if (loadTheme) { if (res == null) { try { if (resPath.endsWith(".res")) { res = Resources.open(resPath); System.out.println( "Warning: you should construct the state machine without the .res extension to allow theme overlays"); } else { res = Resources.openLayered(resPath); } } catch (java.io.IOException err) { err.printStackTrace(); } } initTheme(res); } if (res != null) { setResourceFilePath(resPath); setResourceFile(res); initVars(res); return showForm("Main", null); } else { Form f = (Form) createContainer(resPath, "Main"); initVars(fetchResourceFile()); beforeShow(f); f.show(); postShow(f); return f; } }
public void actionPerformed(ActionEvent ae) { if (ae.getSource() == btnSurveysFrm) { frmSurveys.setTransitionInAnimator(Transition3D.createCube(300, false)); frmSurveys.setTransitionOutAnimator(Transition3D.createCube(300, true)); frmSurveys.show(); } else if (ae.getSource() == btnChallengesFrm) { frmChallenges.show(); } else if (ae.getSource() == btnCalendarFrm) { frmCalendar.show(); } else if (ae.getSource() == btnContactsFrm) { frmContacts.show(); } else if (ae.getSource() == btnToDoFrm) { frmToDoList.show(); } else if (ae.getSource() == btnTorch) { frmTorch.show(); } else if (ae.getSource() == btnResourceFrm) { frmResources.setTransitionInAnimator(Transition3D.createCube(300, false)); frmResources.setTransitionOutAnimator(Transition3D.createCube(300, true)); frmResources.show(); } else if (ae.getSource() == mCubeButton) { frmMessages.setTransitionInAnimator(Transition3D.createCube(300, false)); frmMessages.setTransitionOutAnimator(Transition3D.createCube(300, true)); frmMessages.show(); } else if (ae.getSource() == btnSupportFrm) { frmSupportMe.setTransitionInAnimator(Transition3D.createCube(300, false)); frmSupportMe.setTransitionOutAnimator(Transition3D.createCube(300, true)); frmSupportMe.show(); } else if (ae.getSource() == btnAboutUs) { frmAboutUs.setTransitionInAnimator(Transition3D.createCube(300, false)); frmAboutUs.setTransitionOutAnimator(Transition3D.createCube(300, true)); frmAboutUs.show(); } else if (ae.getSource() == btnAboutYou) { frmAboutYou.setTransitionInAnimator(Transition3D.createCube(300, false)); frmAboutYou.setTransitionOutAnimator(Transition3D.createCube(300, true)); frmAboutYou.show(); } else if (ae.getSource() == mFilesButton) { mAwayForm.setTransitionInAnimator(Transition3D.createCube(300, false)); mAwayForm.setTransitionOutAnimator(Transition3D.createCube(300, true)); mAwayForm.show(); } else if (ae.getSource() == mRotateButton) { mAwayForm.setTransitionInAnimator(Transition3D.createRotation(300, true)); mAwayForm.setTransitionOutAnimator(Transition3D.createRotation(300, false)); mAwayForm.show(); } else if (ae.getSource() == mBackCommand) { mHomeForm.show(); } else if (ae.getCommand() == mExitCommand) { notifyDestroyed(); } }