List of usage examples for com.google.gwt.user.client.ui HorizontalPanel HorizontalPanel
public HorizontalPanel()
From source file:com.apress.progwt.client.college.gui.ext.AlertDialog.java
License:Apache License
public AlertDialog(String caption, String message) { super(false, true); setText(caption);/*from w w w . j a v a2 s . com*/ VerticalPanel mainP = new VerticalPanel(); mainP.add(new Label(message)); HorizontalPanel buttonP = new HorizontalPanel(); Button okB = new Button("Ok"); okB.addClickListener(new ClickListener() { public void onClick(Widget sender) { hide(); } }); buttonP.add(okB); mainP.add(buttonP); setWidget(mainP); }
From source file:com.apress.progwt.client.college.gui.ext.YesNoDialog.java
License:Apache License
public YesNoDialog(String caption, String question, final Command onYes, final Command onNo, String noText, String yesText) {/*from ww w . j a v a 2 s. c o m*/ super(false, true); setText(caption); VerticalPanel mainP = new VerticalPanel(); mainP.add(new Label(question)); HorizontalPanel buttonP = new HorizontalPanel(); Button yesB = new Button(yesText); yesB.addClickListener(new ClickListener() { public void onClick(Widget sender) { onYes.execute(); hide(); } }); Button noB = new Button(noText); noB.addClickListener(new ClickListener() { public void onClick(Widget sender) { onNo.execute(); hide(); } }); buttonP.add(noB); buttonP.add(yesB); mainP.add(buttonP); setWidget(mainP); }
From source file:com.apress.progwt.client.college.gui.LoginWindow.java
License:Apache License
private Widget getUPTab() { VerticalPanel uptab = new VerticalPanel(); username = new TextBox(); username.setName("j_username"); username.setText(lastNameEntered);//from w w w . j a va 2 s . c o m KeyboardListener enterListener = new KeyboardListenerAdapter() { public void onKeyPress(Widget sender, char keyCode, int modifiers) { if (keyCode == KEY_ENTER) { form.submit(); } } }; final PasswordTextBox password = new PasswordTextBox(); password.setName("j_password"); password.addKeyboardListener(enterListener); username.setText("test"); password.setText("testaroo"); HorizontalPanel userP = new HorizontalPanel(); userP.add(new Label("Username")); userP.add(username); HorizontalPanel passPanel = new HorizontalPanel(); passPanel.add(new Label("Password")); passPanel.add(password); uptab.add(userP); uptab.add(passPanel); uptab.add(new Button("Login", new ClickListener() { public void onClick(Widget sender) { form.submit(); } })); return uptab; }
From source file:com.apress.progwt.client.college.gui.LoginWindow.java
License:Apache License
private Widget getOpenIDTab() { HorizontalPanel hP = new HorizontalPanel(); hP.add(new ExternalLink("Do OpenID login", secureTargetURL, true)); return hP;// w ww . j ava 2 s. c o m }
From source file:com.apress.progwt.client.college.gui.MyApplicationTimeline.java
License:Apache License
public MyApplicationTimeline(ServiceCache serviceCache) { this.serviceCache = serviceCache; HorizontalPanel mainP = new HorizontalPanel(); VerticalPanel chooserP = new VerticalPanel(); timeline = new ProcessTimeline(this); schoolPanel = new AppList(); processTypePanel = new ProcessTypePanel(); chooserP.add(schoolPanel);//from w w w.j a v a 2s .c o m chooserP.add(processTypePanel); mainP.add(timeline); mainP.add(chooserP); initWidget(mainP); }
From source file:com.apress.progwt.client.college.gui.MyDecision.java
License:Apache License
public MyDecision(ServiceCache serviceCache) { this.serviceCache = serviceCache; HorizontalPanel mainPanel = new HorizontalPanel(); priorityPanel = new PriorityPanel(); schoolRanks = new SchoolRanks(); mainPanel.add(priorityPanel);//ww w. j a va 2 s . com mainPanel.add(schoolRanks); initWidget(mainPanel); }
From source file:com.apress.progwt.client.college.gui.MyRankings.java
License:Apache License
public MyRankings(ServiceCache serviceCache) { this.serviceCache = serviceCache; VerticalPanel mainPanel = new VerticalPanel(); rankPanelPanel = new VerticalPanel(); entryDragController = new PickupDragController(RootPanel.get(), false); IndexedDropController rankDropController = new IndexedDropController(rankPanelPanel); entryDragController.registerDropController(rankDropController); entryDragController.addDragHandler(this); HorizontalPanel completerP = new HorizontalPanel(); completer = new SchoolCompleter(serviceCache, new CompleteListener<School>() { public void completed(School result) { addSchool(result);/* w w w. ja va 2s .com*/ } }); completeB = new Button("Add School"); completeB.addClickListener(new ClickListener() { public void onClick(Widget sender) { completer.complete(); } }); completerP.add(completer); completerP.add(completeB); completeB.setEnabled(false); mainPanel.add(rankPanelPanel); mainPanel.add(completerP); initWidget(mainPanel); }
From source file:com.apress.progwt.client.college.gui.ProConDispPanel.java
License:Apache License
public ProConDispPanel(String string, List<String> list, CollegeEntry collegeEntry) { this.collegeEntry = collegeEntry; mainPanel = new VerticalPanel(); mainPanel.add(new Label(string)); for (String str : list) { addRow(str);//from ww w .j a va 2s . com } mainPanel.setStylePrimaryName("ProConPanel"); mainPanel.addStyleDependentName(string); HorizontalPanel addP = new HorizontalPanel(); addTextBox = new TextBox(); Button addB = new Button("Add"); addB.addClickListener(this); addP.add(addTextBox); addP.add(addB); mainPanel.add(addP); initWidget(mainPanel); }
From source file:com.apress.progwt.client.college.gui.ProConPanel.java
License:Apache License
public ProConPanel(User thisUser, Application application, CollegeEntry collegeEntry) { HorizontalPanel mainPanel = new HorizontalPanel(); pros = new ProConDispPanel("Pro", application.getPros(), collegeEntry); cons = new ProConDispPanel("Con", application.getCons(), collegeEntry); mainPanel.add(pros);//from w ww . j av a2s .c om mainPanel.add(cons); initWidget(mainPanel); }
From source file:com.apress.progwt.client.college.gui.SchoolRanks.java
License:Apache License
public void load(User user) { thisUser = user;//from w ww. ja v a 2s .co m rankPanel.clear(); int i = 1; for (ApplicationAndScore aas : thisUser.getPrioritizedRankings()) { double pct = aas.getScore() / (double) aas.getTotal(); SchoolLink link = new SchoolLink(aas.getApplication().getSchool()); Label pctL = new Label(pctFormat.format(pct)); HorizontalPanel hP = new HorizontalPanel(); hP.setStyleName("TC-DecisionRanked"); if (i % 2 == 0) { hP.addStyleName("TC-DecisionRanked-Even"); } Label rankL = new Label(i + ""); rankL.addStyleName("TC-DecisionRanked-Rank"); pctL.addStyleName("TC-DecisionRanked-Pct"); hP.add(rankL); hP.add(link); hP.add(pctL); rankPanel.add(hP); i++; } }