Пример #1
0
 public void renameContext(Context c) {
   for (AbstractParamPanel panel : contextPanels) {
     if (panel instanceof ContextGeneralPanel) {
       ContextGeneralPanel ctxPanel = (ContextGeneralPanel) panel;
       if (ctxPanel.getContextIndex() == c.getIndex()) {
         getSessionDialog().renamePanel(ctxPanel, c.getName());
         break;
       }
     }
   }
 }
Пример #2
0
  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);
    }
  }