List of usage examples for com.google.gwt.user.client.ui Button Button
protected Button(com.google.gwt.dom.client.Element element)
From source file:com.audata.client.record.RecordPropertiesDialog.java
License:Open Source License
public RecordPropertiesDialog(UpdateListener parent, String rType, String record, String checkedOutTo) { this.parent = parent; this.recorduuid = record; this.recordType = rType; this.checkedOutTo = checkedOutTo; this.fields = new ArrayList(); this.properties = new RecordProperties(this, this.checkedOutTo); this.revisions = new Revisions(this.recorduuid); this.main = new VerticalPanel(); TabBar tabs = new TabBar(); tabs.addTab(LANG.props_Text()); tabs.addTab("Revisions"); tabs.addTabListener(this); tabs.selectTab(0);//from w w w .java 2s . c o m this.main.add(tabs); this.main.add(this.properties); this.main.add(this.revisions); this.revisions.setVisible(false); HorizontalPanel buttonPanel = new HorizontalPanel(); buttonPanel.setSpacing(4); this.okButton = new Button(LANG.ok_Text()); this.okButton.addClickListener(this); buttonPanel.add(this.okButton); this.cancelButton = new Button(LANG.cancel_Text()); this.cancelButton.addClickListener(this); buttonPanel.add(this.cancelButton); this.main.add(buttonPanel); this.addFields(); this.getFields(); this.getRecord(); this.setWidget(this.main); }
From source file:com.audata.client.reporting.ReportDialog.java
License:Open Source License
public ReportDialog(String report) { this.setText(LANG.report_Text()); this.setSize("600px", "400px"); this.main = new VerticalPanel(); this.main.setSize("100%", "100%"); this.main.setSpacing(5); ScrollPanel sp = new ScrollPanel(); sp.setStyleName("audoc-report"); this.report = new HTML(report); this.report.addStyleName("audoc-report-content"); sp.add(this.report); sp.setWidth("586px"); sp.setHeight("300px"); this.main.add(sp); HorizontalPanel butPanel = new HorizontalPanel(); butPanel.setSpacing(5);// w w w . j a va 2 s. c o m this.print = new Button(LANG.print_Text()); this.print.addClickListener(this); this.close = new Button(LANG.close_Text()); this.close.addClickListener(this); butPanel.add(this.print); butPanel.add(this.close); this.main.add(butPanel); this.setWidget(this.main); }
From source file:com.audata.client.reporting.ReportPanel.java
License:Open Source License
public ReportPanel() { this.setSpacing(5); Label title = new Label(LANG.reports_Text()); title.addStyleName("audoc-sectionTitle"); this.add(title); String template = "<span class=\"audoc-report-title\">#0</span><br/><span class=\"audoc-report-template\">#1</span>"; this.reports = new HTMLButtonList("images/48x48/reports.gif", template, false); this.reports.addClickListener(this); this.reports.addStyleName("audoc-udfs"); this.reports.setPixelSize(300, 300); this.add(this.reports); this.run = new Button(LANG.run_report_Text()); this.run.addClickListener(this); this.add(this.run); this.getReports(); }
From source file:com.audata.client.search.SavedSearchDialog.java
License:Open Source License
public SavedSearchDialog(ArrayList criteria) { this.criteria = criteria; this.setText(LANG.save_search_Text()); VerticalPanel main = new VerticalPanel(); main.setSpacing(4);/*from w w w. ja v a 2 s . com*/ HorizontalPanel titlePanel = new HorizontalPanel(); Label tLabel = new Label(LANG.title_Text()); titlePanel.add(tLabel); this.title = new TextBox(); titlePanel.add(this.title); titlePanel.setCellWidth(tLabel, "100px"); main.add(titlePanel); HorizontalPanel descPanel = new HorizontalPanel(); Label dLabel = new Label(LANG.description_Text()); descPanel.add(dLabel); this.description = new TextArea(); descPanel.add(this.description); descPanel.setCellWidth(dLabel, "100px"); main.add(descPanel); HorizontalPanel butPanel = new HorizontalPanel(); butPanel.setSpacing(4); this.ok = new Button(LANG.save_Text()); this.ok.addClickListener(this); butPanel.add(this.ok); this.cancel = new Button(LANG.cancel_Text()); this.cancel.addClickListener(this); butPanel.add(this.cancel); main.add(butPanel); this.setWidget(main); }
From source file:com.audata.client.search.SearchPanel.java
License:Open Source License
public SearchPanel(AuDoc audoc, ArrayList criteria) { this.audoc = audoc; if (criteria != null) { this.searchTerms = criteria; } else {//from w w w . ja va 2s . c o m if (AuDoc.state.containsKey("Search")) { this.searchTerms = (ArrayList) AuDoc.state.getItem("Search"); } else { this.searchTerms = new ArrayList(); } } this.setSize("100%", "100%"); this.setSpacing(4); Label title = new Label(LANG.search_Text()); title.addStyleName("audoc-sectionTitle"); this.add(title); HorizontalPanel hp = new HorizontalPanel(); hp.setSpacing(4); hp.setSize("100%", "100%"); this.fieldsTree = new Tree(); this.fieldsTree.addTreeListener(this); //this.fieldsTree.setSize("100%", "100%"); this.fieldsTree.setHeight("90%"); this.fieldsTree.addStyleName("audoc-fieldTree"); hp.add(this.fieldsTree); this.buildSections(); this.getUDFs(); this.addStdFields(); VerticalPanel form = new VerticalPanel(); form.addStyleName("audoc-searchForm"); //form.setSize("100%","100%"); form.setWidth("250px"); form.setSpacing(4); HorizontalPanel fieldRow = new HorizontalPanel(); fieldRow.setSpacing(4); Label fieldLabel = new Label(LANG.field_Text()); this.fieldName = new Label(); this.fieldName.addStyleName("bold"); fieldRow.add(fieldLabel); fieldRow.add(this.fieldName); fieldRow.setCellWidth(fieldLabel, "100px"); fieldRow.setCellHorizontalAlignment(fieldLabel, HasAlignment.ALIGN_LEFT); form.add(fieldRow); this.valuePanel = new HorizontalPanel(); this.valuePanel.setSpacing(4); Label valueLabel = new Label(LANG.criteria_Text()); TextBox value = new TextBox(); this.valuePanel.add(valueLabel); this.valuePanel.add(value); this.valuePanel.setCellWidth(valueLabel, "100px"); this.valuePanel.setCellHorizontalAlignment(valueLabel, HasAlignment.ALIGN_LEFT); form.add(this.valuePanel); HorizontalPanel andOr = new HorizontalPanel(); andOr.setSpacing(4); this.and = new RadioButton("andOr", LANG.and_Text()); this.and.setChecked(true); this.or = new RadioButton("andOr", LANG.or_Text()); andOr.add(this.and); andOr.add(this.or); form.add(andOr); HorizontalPanel buttons = new HorizontalPanel(); buttons.setSpacing(4); this.add = new Button(LANG.add_Text()); this.add.addClickListener(this); buttons.add(this.add); this.clear = new Button(LANG.clear_Text()); this.clear.addClickListener(this); buttons.add(this.clear); form.add(buttons); this.criteria = new ListBox(); this.criteria.setVisibleItemCount(10); this.criteria.setWidth("100%"); form.add(this.criteria); HorizontalPanel buttons2 = new HorizontalPanel(); buttons2.setSpacing(4); this.search = new Button(LANG.search_Text()); this.search.addClickListener(this); buttons2.add(this.search); this.save = new Button(LANG.save_Text()); this.save.addClickListener(this); buttons2.add(this.save); form.add(buttons2); hp.add(form); hp.setCellHeight(this.fieldsTree, "100%"); this.add(hp); this.paintCriteria(); }
From source file:com.audata.client.trays.TrayDialog.java
License:Open Source License
public TrayDialog(ArrayList records) { this.setText(LANG.add_to_tray_Text()); this.records = records; String template = "<span class=\"traylist-title\">#0</span>"; this.trays = new HTMLButtonList("images/48x48/tray.gif", template, false); this.trays.addStyleName("audoc-trays"); this.addBut = new Button(LANG.add_Text()); this.addBut.addClickListener(this); this.cancel = new Button(LANG.cancel_Text()); this.cancel.addClickListener(this); this.newText = new TextBox(); this.newBut = new Button(LANG.new_Text()); this.newBut.addClickListener(this); this.getTrays(); VerticalPanel main = new VerticalPanel(); main.setSpacing(3);//from w w w . j a v a 2 s. c om main.add(this.trays); HorizontalPanel p = new HorizontalPanel(); p.add(new Label("New tray:")); p.setSpacing(3); p.add(this.newText); p.add(this.newBut); p.setCellHorizontalAlignment(this.addBut, HasAlignment.ALIGN_RIGHT); main.add(p); HorizontalPanel p2 = new HorizontalPanel(); p2.setSpacing(3); p2.add(this.addBut); p2.add(this.cancel); main.add(p2); main.setCellHorizontalAlignment(p2, HasAlignment.ALIGN_RIGHT); this.setWidget(main); }
From source file:com.audata.client.widgets.ClassField.java
License:Open Source License
public ClassField() { HorizontalPanel main = new HorizontalPanel(); main.setSpacing(2);//from w w w . j a v a 2 s . c o m this.tb = new ClassTextBox(); this.tb.setEnabled(false); this.select = new Button("..."); this.select.addClickListener(this); main.add(this.tb); main.add(this.select); this.initWidget(main); }
From source file:com.audata.client.widgets.KeywordField.java
License:Open Source License
public KeywordField(String hierarchy, String title) { this.hierarchy = hierarchy; HorizontalPanel main = new HorizontalPanel(); main.setSpacing(2);//from www . j av a 2s . c o m this.tb = new KeywordTextBox(this.hierarchy, title); this.tb.setEnabled(false); this.select = new Button("..."); this.select.addClickListener(this); main.add(this.tb); main.add(this.select); this.initWidget(main); }
From source file:com.audata.client.widgets.Wizard.java
License:Open Source License
public Wizard(String title, WizardListener listener) { this.listener = listener; this.values = new HashMap(); this.main = new VerticalPanel(); this.main.setHeight("100%"); this.main.setWidth("100%"); this.main.setSpacing(5); Label titleLabel = new Label(title); titleLabel.addStyleName("audoc-sectionTitle"); this.main.add(titleLabel); this.pages = new DeckPanel(); this.pages.setSize("100%", "100%"); this.main.add(this.pages); this.control = new HorizontalPanel(); this.control.setSpacing(5); this.control.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT); this.control.setVerticalAlignment(HasAlignment.ALIGN_BOTTOM); this.prev = new Button(LANG.previous_Text()); this.prev.addClickListener(this); this.prev.setVisible(false); this.next = new Button(LANG.next_Text()); this.next.addClickListener(this); this.finish = new Button(LANG.finish_Text()); this.finish.addClickListener(this); this.finish.setVisible(false); this.control.add(this.prev); this.control.add(this.next); this.control.add(this.finish); this.main.add(this.control); this.initWidget(this.main); this.setSize("100%", "100%"); }
From source file:com.axlight.gbrain.client.MainPane.java
License:Apache License
private void showAlertDialog(String message) { if (GBrain.isIPhone) { Window.alert(message);//from w w w. j a v a2 s. c om } else { final DialogBox dialog = new DialogBox(); dialog.setModal(true); dialog.setGlassEnabled(true); dialog.setText("Alert"); Label label = new Label(message); Button close = new Button("Close"); VerticalPanel basePanel = new VerticalPanel(); basePanel.setSpacing(10); basePanel.add(label); basePanel.add(close); dialog.add(basePanel); close.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { dialog.hide(); } }); dialog.center(); close.setFocus(true); } }