Package next.i.view.widgets

Examples of next.i.view.widgets.XLabel


  @Override
  public IsWidget getViewContent() {
    XFlexTable panel = new XFlexTable("100%", null);
    panel.setCellSpacing(10);

    XLabel headline = new XLabel("Headline Title", XLabelType.Header);
    XLabel text = new XLabel("Label text: Neque porro quisquam est qui dolorem ipsum "
        + "quia dolor sit amet, consectetur, adipisci velit...");

    XAnchor link = new XAnchor("Picture Original Link", "images/icons/earth.jpg", "_blank");
    XImage img1 = new XImage("images/icons/earth.jpg");
View Full Code Here


    XCheckbox checkB = new XCheckbox("Green", "Green");
    XCheckbox checkC = new XCheckbox("Blue", "Blue");
    final XCheckboxGroup groupHorizontal = new XCheckboxGroup(false);
    groupHorizontal.add(checkA, checkB, checkC);

    final XLabel label1 = new XLabel("Favorite color", XLabelType.Header);
    final XLabel label2 = new XLabel("Favorite color", XLabelType.Header);

    panel.addWidgets(label2, groupHorizontal, label1, groupVertical, new HTML(" "));

    check0.setValue(true);
    check1.setValue(true);
    checkA.setValue(true);
    checkC.setValue(true);
   
    groupVertical.addSelectionChangedHandler(new SelectionChangedHandler() {
      public void onSelectionChanged(SelectionChangedEvent e) {
        String s = "Favorite color: ";
        for (XCheckbox c : groupVertical.getCheckedWidgets()) {
          s += c.getName() + ", ";
        }
        label1.setText(s);
      }
    });

    groupHorizontal.addSelectionChangedHandler(new SelectionChangedHandler() {
      public void onSelectionChanged(SelectionChangedEvent e) {
        String s = "Favorite color: ";
        for (XCheckbox c : groupHorizontal.getCheckedWidgets()) {
          s += c.getName() + ", ";
        }
        label2.setText(s);
      }
    });

    return panel;
  }
View Full Code Here

    XRadioButton radioC = new XRadioButton("Blue", "Blue");

    final XRadioButtonGroup group2 = new XRadioButtonGroup(false);
    group2.add(radioA, radioB, radioC);

    final XLabel label1 = new XLabel("Favorite color", XLabelType.Header);
    final XLabel label2 = new XLabel("Favorite color", XLabelType.Header);

    radio0.setValue(true);
    radioA.setValue(true);
   
    group1.addSelectionChangedHandler(new SelectionChangedHandler() {
      public void onSelectionChanged(SelectionChangedEvent e) {
        label1.setText("Favorite color: " + group1.getCheckedWidget().getName());
      }
    });

    group2.addSelectionChangedHandler(new SelectionChangedHandler() {
      public void onSelectionChanged(SelectionChangedEvent e) {
        label2.setText("Favorite color: " + group2.getCheckedWidget().getName());
      }
    });

    panel.addWidgets(label2, group2, label1, group1, new HTML(" "));
View Full Code Here

TOP

Related Classes of next.i.view.widgets.XLabel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.