コード例 #1
0
ファイル: View.java プロジェクト: raufbutt/zappy
  public void discardContexts() {
    for (AbstractParamPanel panel : contextPanels) {
      getSessionDialog().removeParamPanel(panel);
    }
    for (ContextPanelFactory cpf : this.contextPanelFactories) {
      cpf.discardContexts();
    }

    contextPanels.clear();
  }
コード例 #2
0
ファイル: View.java プロジェクト: raufbutt/zappy
  public void addContext(Context c) {
    ContextGeneralPanel contextGenPanel = new ContextGeneralPanel(c.getName(), c.getIndex());
    getSessionDialog()
        .addParamPanel(
            new String[] {Constant.messages.getString("context.list")}, contextGenPanel, false);
    this.contextPanels.add(contextGenPanel);

    ContextIncludePanel contextIncPanel = new ContextIncludePanel(c);
    getSessionDialog()
        .addParamPanel(
            new String[] {Constant.messages.getString("context.list"), contextGenPanel.getName()},
            contextIncPanel,
            false);
    this.contextPanels.add(contextIncPanel);

    ContextExcludePanel contextExcPanel = new ContextExcludePanel(c);
    getSessionDialog()
        .addParamPanel(
            new String[] {Constant.messages.getString("context.list"), contextGenPanel.getName()},
            contextExcPanel,
            false);
    this.contextPanels.add(contextExcPanel);

    ContextTechnologyPanel contextTechPanel = new ContextTechnologyPanel(c);
    getSessionDialog()
        .addParamPanel(
            new String[] {Constant.messages.getString("context.list"), contextGenPanel.getName()},
            contextTechPanel,
            false);
    this.contextPanels.add(contextTechPanel);

    for (ContextPanelFactory cpf : this.contextPanelFactories) {
      AbstractParamPanel panel = cpf.getContextPanel(c);
      getSessionDialog()
          .addParamPanel(
              new String[] {Constant.messages.getString("context.list"), contextGenPanel.getName()},
              panel,
              false);
      this.contextPanels.add(panel);
    }
  }