Beispiel #1
0
  /**
   * Loads a dynamic tab as a <code>Layout</code> which is then added to the given TabSheet given
   * <code>TabSheet</code>
   *
   * @param source Layout to add to the tab, the Layout is responsible for implementing any
   *     interactions by itself
   * @param caption String that the tab should have as its name in the TabSheet
   * @param parent TabSheet to add the new tab to
   */
  private static void createDynamicContentTab(Layout source, String caption, TabSheet parent) {

    GeneralMacros.errorIfContainsNull(source, caption, parent); // Check for null arguments

    source.setCaption(caption);
    source.setMargin(true);
    parent.addTab(source);
  }
Beispiel #2
0
  /**
   * Loads a Static tab with {@link #cz.nkp.differ.gui.tabs.TabLoader} and adds it to the given
   * <code>TabSheet</code>
   *
   * @param source String identifying the proper load resource as recognized by <code>TabLoader
   *     </code>
   * @param caption String that the tab should have as its name in the TabSheet
   * @param parent TabSheet to add the new tab to
   */
  private static void createStaticContentTab(String source, String caption, TabSheet parent) {

    GeneralMacros.errorIfContainsNull(source, caption, parent); // Check for null arguments

    try {
      VerticalLayout tab = new TabLoader(source);
      tab.setMargin(true);
      tab.setCaption(caption);
      parent.addTab(tab);
    } catch (IOException e) {
      e.printStackTrace();
    }
  }