@SuppressWarnings("deprecation") // GWT 1.x vs 2.x
  private void setData() {

    ListPanel listPanel = new ListPanel();

    listPanel.setHeader(1, "Component Type");
    listPanel.setHeader(2, "Number");
    listPanel.setColumnWidth(1, "100%");

    for (int i = 0; i < componentTypeInfos.length; i++) {
      final ComponentTypeInfo componentTypeInfo = componentTypeInfos[i];

      listPanel.setCell(
          i,
          0,
          new Image("images/components." + componentTypeInfo.getType().toLowerCase() + ".gif"));

      Hyperlink componentTypeLink =
          new Hyperlink(componentTypeInfo.getType(), componentTypeInfo.getType());
      componentTypeLink.addClickHandler(
          new ClickHandler() {
            public void onClick(ClickEvent event) {
              onComponentType(componentTypeInfo);
            }
          });

      listPanel.setCell(i, 1, componentTypeLink);
      listPanel.setCellText(i, 2, "" + componentTypeInfo.getComponentNumber());
    }

    rootPanel.setWidget(0, 0, listPanel);
  }
Example #2
0
  private void refreshSbbPropertiesPanel(SbbInfo sbbInfo) {

    ComponentPropertiesPanel componentPropertiesPanel =
        new ComponentPropertiesPanel(browseContainer, sbbInfo);
    rootPanel.setWidget(ROW_COMPONENT_INFO, 0, componentPropertiesPanel);

    PropertiesPanel sbbPropertiesPanel = new PropertiesPanel();
    sbbPropertiesPanel.add(
        "Event types", ComponentNameLabel.toArray(sbbInfo.getEventTypeIDs(), browseContainer));
    sbbPropertiesPanel.add("RA entity links", sbbInfo.getResourceAdaptorEntityLinks());
    sbbPropertiesPanel.add(
        "Resource adaptors", ComponentNameLabel.toArray(sbbInfo.getResourceAdaptorTypeIDs()));
    sbbPropertiesPanel.add("SBBs", ComponentNameLabel.toArray(sbbInfo.getSbbIDs()));
    sbbPropertiesPanel.add(
        "Address profile",
        new ComponentNameLabel(sbbInfo.getAddressProfileSpecificationID(), browseContainer));
    sbbPropertiesPanel.add(
        "Profile specifications", ComponentNameLabel.toArray(sbbInfo.getProfileSpecificationIDs()));

    rootPanel.setWidget(ROW_SBB_INFO, 0, sbbPropertiesPanel);
  }