Example #1
0
  public void loadData(ArrayList<NameValuePair> params, String action) {

    if (loaded) {
      return;
    }

    if (LOG.isDebugEnabled()) {
      LOG.debug(name + Messages.getString(BUNDLE_NAME, "Folder.26")); // $NON-NLS-1$
    }
    // tell the tabs in this folder to load their data
    for (int i = 0; i < dataItems.size(); i++) {
      DataItem item = (DataItem) dataItems.elementAt(i);

      if (item == null) {
        LOG.error(name + Messages.getString(BUNDLE_NAME, "Folder.27") + getTitle()); // $NON-NLS-1$
        continue;
      }
      if (LOG.isDebugEnabled()) {
        LOG.debug(
            name + Messages.getString(BUNDLE_NAME, "Folder.28") + item.getTitle()); // $NON-NLS-1$
      }
      item.loadData(params, action);
    }

    loaded = true;
  }
Example #2
0
 /**
  * Add a component to the tabbed pane.
  *
  * @param item the component to add.
  */
 protected void addDataItem(DataItem item) {
   if (LOG.isDebugEnabled()) {
     LOG.debug(
         name
             + Messages.getString(BUNDLE_NAME, "Folder.20")
             + item.getDataItemName()
             + Messages.getString(BUNDLE_NAME, "Folder.21")); // $NON-NLS-1$ //$NON-NLS-2$
   }
   item.setBorder(new EmptyBorder(5, 5, 5, 5));
   dataItems.add(item);
   String title = item.getTitle();
   if (title == null || title.length() == 0) {
     title = item.toString();
   }
   tabbedPane.addTab(title, item);
 }