@Override public void initContextData(Session session, Context uiSharedContext) { selectedMethod = uiSharedContext.getSessionManagementMethod(); if (log.isDebugEnabled()) log.debug( "Initializing configuration panel for session management method: " + selectedMethod + " for context " + uiSharedContext.getName()); // If something was already configured, find the type and set the UI accordingly if (selectedMethod != null) { // If the proper type is already selected, just rebind the data if (shownMethodType != null && shownMethodType.isTypeForMethod(selectedMethod)) { if (shownMethodType.hasOptionsPanel()) shownConfigPanel.bindMethod(selectedMethod); return; } // Select what needs to be selected for (SessionManagementMethodType type : extension.getSessionManagementMethodTypes()) if (type.isTypeForMethod(selectedMethod)) { // Selecting the type here will also force the selection listener to run and // change the config panel accordingly getSessionManagementMethodsComboBox().setSelectedItem(type); break; } } }
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; } } } }
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); } }
public PopupMenuItemIncludeInContext(Context context) { super(context.getName(), true); this.context = context; }