コード例 #1
0
ファイル: Tab.java プロジェクト: damianham/RIBAX
  /* (non-Javadoc)
   * @see org.ribax.swing.ui.TabContainer#updateItemData(java.util.ArrayList, java.lang.String)
   */
  protected void updateItemData(ArrayList<NameValuePair> params, String action) {

    if (params == null) {
      params = new ArrayList<NameValuePair>();
    }

    // collect the parameters from all the data items on this tab
    ArrayList<NameValuePair> tlist = getParameters();

    if (tlist != null) {
      params.addAll(tlist);
    }

    // invalidate all the DataItems on this Tab
    invalidateDataItems();

    if (source != null) {
      // replace the contents of the tab with the data from the source
      readDescriptionFromURL(url, params, action);

      loaded = false;

      // now tell each new data item to load its data
      loadData(params, action);

    } else {

      // tell each data Item to update its data with the collected parameters
      for (int i = 0; i < dataItems.size(); i++) {
        DataItem item = (DataItem) dataItems.elementAt(i);
        item.updateData(params, action);
      }
    }
  }
コード例 #2
0
ファイル: Folder.java プロジェクト: damianham/RIBAX
 /* (non-Javadoc)
  * @see org.ribax.swing.ui.DataItem#updateData(java.util.ArrayList, java.lang.String)
  */
 public void updateData(ArrayList<NameValuePair> params, String action) {
   if (LOG.isDebugEnabled()) {
     LOG.debug(name + Messages.getString(BUNDLE_NAME, "Folder.25")); // $NON-NLS-1$
   }
   // update all the Tabs in this folder
   for (int i = 0; i < dataItems.size(); i++) {
     DataItem item = (DataItem) dataItems.elementAt(i);
     item.updateData(params, action);
   }
 }
コード例 #3
0
ファイル: RootFolder.java プロジェクト: damianham/RIBAX
  /**
   * Handle a user button click from one of the buttons on the ButtonPanel in this RootFolder.
   *
   * @see org.ribax.swing.ui.TabButtonListener#doAction(int, java.lang.String)
   */
  public void doAction(int buttonType, String action) {

    if (nodeInfo == null) {
      return;
    }

    ArrayList params = null;

    if (globalParams != null) {
      params = globalParams.getNameValuePairs();
    }

    // pass the action to the current selected Folder
    if (buttonType == TabButton.REFRESH) {
      ((DataItem) nodeInfo).invalidateData();
      ((DataItem) nodeInfo).refresh(params, action);
    } else if (buttonType == TabButton.UPDATE) {
      ((DataItem) nodeInfo).updateData(params, action);
    } else if (buttonType == TabButton.RELOAD) {
      invalidateItemTree();
      ((DataItem) nodeInfo).refresh(params, action);
    }
  }