Java tutorial
// Description: Java 8 Swing Element JTabbedPane implementation for Tenant. /* * CF FreeSwitch Configuration Model * * Copyright (c) 2014-2015 Mark Sobkow * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchSwing; import java.math.*; import java.sql.*; import java.text.*; import java.util.*; import java.util.List; import java.awt.*; import java.awt.event.*; import javax.swing.*; import net.sourceforge.msscodefactory.cflib.v2_3.CFLib.*; import net.sourceforge.msscodefactory.cflib.v2_3.CFLib.Swing.*; import org.apache.commons.codec.binary.Base64; import net.sourceforge.msscodefactory.cfsecurity.v2_4.CFSecurity.*; import net.sourceforge.msscodefactory.cfinternet.v2_4.CFInternet.*; import net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitch.*; import net.sourceforge.msscodefactory.cfsecurity.v2_4.CFSecurityObj.*; import net.sourceforge.msscodefactory.cfinternet.v2_4.CFInternetObj.*; import net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchObj.*; /** * CFFreeSwitchSwingTenantEltJTabbedPane Swing Element JTabbedPane implementation * for Tenant. */ public class CFFreeSwitchSwingTenantEltJTabbedPane extends CFJTabbedPane implements ICFFreeSwitchSwingTenantJPanelCommon { protected ICFFreeSwitchSwingSchema swingSchema = null; protected boolean swingIsInitializing = true; public final String LABEL_TabComponentsTSecGroupList = "Optional Components Tenant Security Group"; public final String LABEL_TabComponentsDomainBaseList = "Optional Components Domain Base Objects"; public final String LABEL_TabComponentsTldList = "Optional Components Top Level Domains"; public final String LABEL_TabComponentsFSSofiaList = "Optional Components FreeSwitch Sofia configuration"; public final String LABEL_TabComponentsFSSFDialerList = "Optional Components FreeSwitch Sofia Dialer configuration"; public final String LABEL_TabComponentsFSSFDialplanList = "Optional Components FreeSwitch Sofia Dial Plan configuration"; public final String LABEL_TabComponentsFSSFProfileList = "Optional Components FreeSwitch Sofia Profile configuration"; public final String LABEL_TabComponentsFSSFProfileDomList = "Optional Components FreeSwitch Sofia Profile Domain configuration"; public final String LABEL_TabComponentsFSSFProfileAlsList = "Optional Components FreeSwitch Sofia Profile Alias configuration"; public final String LABEL_TabComponentsFSSFGatewayList = "Optional Components FreeSwitch Sofia Gateway configuration"; public final String LABEL_TabComponentsFSSFConferenceList = "Optional Components FreeSwitch Sofia Conference configuration"; public final String LABEL_TabComponentsFSSFConferencePFList = "Optional Components FreeSwitch Sofia Conference Profile configuration"; public final String LABEL_TabComponentsFSSFDirectoryList = "Optional Components FreeSwitch Sofia Directory configuration"; public final String LABEL_TabComponentsFSSFExtensionList = "Optional Components FreeSwitch Sofia Extension configuration"; public final String LABEL_TabComponentsFSSFVMailList = "Optional Components FreeSwitch Sofia Voice Mail configuration"; public final String LABEL_TabComponentsPbxIvrMenuList = "Optional Components PBX IVR Menu"; public final String LABEL_TabComponentsPbxIvrMenuEntryList = "Optional Components PBX IVR Menu Entry"; protected JPanel tabViewComponentsTSecGroupListJPanel = null; protected JPanel tabViewComponentsDomainBaseListJPanel = null; protected JPanel tabViewComponentsTldListJPanel = null; protected JPanel tabViewComponentsFSSofiaListJPanel = null; protected JPanel tabViewComponentsFSSFDialerListJPanel = null; protected JPanel tabViewComponentsFSSFDialplanListJPanel = null; protected JPanel tabViewComponentsFSSFProfileListJPanel = null; protected JPanel tabViewComponentsFSSFProfileDomListJPanel = null; protected JPanel tabViewComponentsFSSFProfileAlsListJPanel = null; protected JPanel tabViewComponentsFSSFGatewayListJPanel = null; protected JPanel tabViewComponentsFSSFConferenceListJPanel = null; protected JPanel tabViewComponentsFSSFConferencePFListJPanel = null; protected JPanel tabViewComponentsFSSFDirectoryListJPanel = null; protected JPanel tabViewComponentsFSSFExtensionListJPanel = null; protected JPanel tabViewComponentsFSSFVMailListJPanel = null; protected JPanel tabViewComponentsPbxIvrMenuListJPanel = null; protected JPanel tabViewComponentsPbxIvrMenuEntryListJPanel = null; public CFFreeSwitchSwingTenantEltJTabbedPane(ICFFreeSwitchSwingSchema argSchema, ICFSecurityTenantObj argFocus) { super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; setSwingFocusAsTenant(argFocus); // Wire the newly constructed JPanels/Tabs to this JTabbedPane addTab(LABEL_TabComponentsTSecGroupList, getTabViewComponentsTSecGroupListJPanel()); addTab(LABEL_TabComponentsDomainBaseList, getTabViewComponentsDomainBaseListJPanel()); addTab(LABEL_TabComponentsTldList, getTabViewComponentsTldListJPanel()); addTab(LABEL_TabComponentsFSSofiaList, getTabViewComponentsFSSofiaListJPanel()); addTab(LABEL_TabComponentsFSSFDialerList, getTabViewComponentsFSSFDialerListJPanel()); addTab(LABEL_TabComponentsFSSFDialplanList, getTabViewComponentsFSSFDialplanListJPanel()); addTab(LABEL_TabComponentsFSSFProfileList, getTabViewComponentsFSSFProfileListJPanel()); addTab(LABEL_TabComponentsFSSFProfileDomList, getTabViewComponentsFSSFProfileDomListJPanel()); addTab(LABEL_TabComponentsFSSFProfileAlsList, getTabViewComponentsFSSFProfileAlsListJPanel()); addTab(LABEL_TabComponentsFSSFGatewayList, getTabViewComponentsFSSFGatewayListJPanel()); addTab(LABEL_TabComponentsFSSFConferenceList, getTabViewComponentsFSSFConferenceListJPanel()); addTab(LABEL_TabComponentsFSSFConferencePFList, getTabViewComponentsFSSFConferencePFListJPanel()); addTab(LABEL_TabComponentsFSSFDirectoryList, getTabViewComponentsFSSFDirectoryListJPanel()); addTab(LABEL_TabComponentsFSSFExtensionList, getTabViewComponentsFSSFExtensionListJPanel()); addTab(LABEL_TabComponentsFSSFVMailList, getTabViewComponentsFSSFVMailListJPanel()); addTab(LABEL_TabComponentsPbxIvrMenuList, getTabViewComponentsPbxIvrMenuListJPanel()); addTab(LABEL_TabComponentsPbxIvrMenuEntryList, getTabViewComponentsPbxIvrMenuEntryListJPanel()); swingIsInitializing = false; } public ICFFreeSwitchSwingSchema getSwingSchema() { return (swingSchema); } public void setSwingFocus(ICFLibAnyObj value) { final String S_ProcName = "setSwingFocus"; if ((value == null) || (value instanceof ICFSecurityTenantObj)) { super.setSwingFocus(value); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "value", value, "ICFSecurityTenantObj"); } } public void setSwingFocusAsTenant(ICFSecurityTenantObj value) { setSwingFocus(value); } public ICFSecurityTenantObj getSwingFocusAsTenant() { return ((ICFSecurityTenantObj) getSwingFocus()); } protected class RefreshComponentsTSecGroupList implements ICFJRefreshCallback { public RefreshComponentsTSecGroupList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFSecurityTSecGroupObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsTSecGroup(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsTSecGroupListJPanel(); ICFFreeSwitchSwingTSecGroupJPanelList jpList = (ICFFreeSwitchSwingTSecGroupJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsTSecGroupListJPanel() { if (tabViewComponentsTSecGroupListJPanel == null) { Collection<ICFSecurityTSecGroupObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsTSecGroup(swingIsInitializing); } else { dataCollection = null; } ICFSecurityTenantObj swingContainer; if ((focus != null) && (focus instanceof ICFSecurityTenantObj)) { swingContainer = (ICFSecurityTenantObj) focus; } else { swingContainer = null; } tabViewComponentsTSecGroupListJPanel = swingSchema.getTSecGroupFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsTSecGroupList(), false); } return (tabViewComponentsTSecGroupListJPanel); } protected class RefreshComponentsDomainBaseList implements ICFJRefreshCallback { public RefreshComponentsDomainBaseList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFInternetDomainBaseObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsDomainBase(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsDomainBaseListJPanel(); ICFFreeSwitchSwingDomainBaseJPanelList jpList = (ICFFreeSwitchSwingDomainBaseJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsDomainBaseListJPanel() { if (tabViewComponentsDomainBaseListJPanel == null) { Collection<ICFInternetDomainBaseObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsDomainBase(swingIsInitializing); } else { dataCollection = null; } ICFLibAnyObj swingContainer; swingContainer = null; tabViewComponentsDomainBaseListJPanel = swingSchema.getDomainBaseFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsDomainBaseList(), false); } return (tabViewComponentsDomainBaseListJPanel); } protected class RefreshComponentsTldList implements ICFJRefreshCallback { public RefreshComponentsTldList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFInternetTldObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsTld(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsTldListJPanel(); ICFFreeSwitchSwingTldJPanelList jpList = (ICFFreeSwitchSwingTldJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsTldListJPanel() { if (tabViewComponentsTldListJPanel == null) { Collection<ICFInternetTldObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsTld(swingIsInitializing); } else { dataCollection = null; } ICFSecurityTenantObj swingContainer; if ((focus != null) && (focus instanceof ICFSecurityTenantObj)) { swingContainer = (ICFSecurityTenantObj) focus; } else { swingContainer = null; } tabViewComponentsTldListJPanel = swingSchema.getTldFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsTldList(), false); } return (tabViewComponentsTldListJPanel); } protected class RefreshComponentsFSSofiaList implements ICFJRefreshCallback { public RefreshComponentsFSSofiaList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSofiaObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSofia(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSofiaListJPanel(); ICFFreeSwitchSwingFSSofiaJPanelList jpList = (ICFFreeSwitchSwingFSSofiaJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSofiaListJPanel() { if (tabViewComponentsFSSofiaListJPanel == null) { Collection<ICFFreeSwitchFSSofiaObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSofia(swingIsInitializing); } else { dataCollection = null; } ICFSecurityTenantObj swingContainer; if ((focus != null) && (focus instanceof ICFSecurityTenantObj)) { swingContainer = (ICFSecurityTenantObj) focus; } else { swingContainer = null; } tabViewComponentsFSSofiaListJPanel = swingSchema.getFSSofiaFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSofiaList(), false); } return (tabViewComponentsFSSofiaListJPanel); } protected class RefreshComponentsFSSFDialerList implements ICFJRefreshCallback { public RefreshComponentsFSSFDialerList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFDialerObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFDialer(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFDialerListJPanel(); ICFFreeSwitchSwingFSSFDialerJPanelList jpList = (ICFFreeSwitchSwingFSSFDialerJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFDialerListJPanel() { if (tabViewComponentsFSSFDialerListJPanel == null) { Collection<ICFFreeSwitchFSSFDialerObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFDialer(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSofiaObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSofiaObj)) { swingContainer = (ICFFreeSwitchFSSofiaObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFDialerListJPanel = swingSchema.getFSSFDialerFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFDialerList(), false); } return (tabViewComponentsFSSFDialerListJPanel); } protected class RefreshComponentsFSSFDialplanList implements ICFJRefreshCallback { public RefreshComponentsFSSFDialplanList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFDialplanObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFDialplan(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFDialplanListJPanel(); ICFFreeSwitchSwingFSSFDialplanJPanelList jpList = (ICFFreeSwitchSwingFSSFDialplanJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFDialplanListJPanel() { if (tabViewComponentsFSSFDialplanListJPanel == null) { Collection<ICFFreeSwitchFSSFDialplanObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFDialplan(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSofiaObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSofiaObj)) { swingContainer = (ICFFreeSwitchFSSofiaObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFDialplanListJPanel = swingSchema.getFSSFDialplanFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFDialplanList(), false); } return (tabViewComponentsFSSFDialplanListJPanel); } protected class RefreshComponentsFSSFProfileList implements ICFJRefreshCallback { public RefreshComponentsFSSFProfileList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFProfileObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFProfile(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFProfileListJPanel(); ICFFreeSwitchSwingFSSFProfileJPanelList jpList = (ICFFreeSwitchSwingFSSFProfileJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFProfileListJPanel() { if (tabViewComponentsFSSFProfileListJPanel == null) { Collection<ICFFreeSwitchFSSFProfileObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFProfile(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSofiaObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSofiaObj)) { swingContainer = (ICFFreeSwitchFSSofiaObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFProfileListJPanel = swingSchema.getFSSFProfileFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFProfileList(), false); } return (tabViewComponentsFSSFProfileListJPanel); } protected class RefreshComponentsFSSFProfileDomList implements ICFJRefreshCallback { public RefreshComponentsFSSFProfileDomList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFProfileDomainObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFProfileDom(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFProfileDomListJPanel(); ICFFreeSwitchSwingFSSFProfileDomainJPanelList jpList = (ICFFreeSwitchSwingFSSFProfileDomainJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFProfileDomListJPanel() { if (tabViewComponentsFSSFProfileDomListJPanel == null) { Collection<ICFFreeSwitchFSSFProfileDomainObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFProfileDom(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSFProfileObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSFProfileObj)) { swingContainer = (ICFFreeSwitchFSSFProfileObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFProfileDomListJPanel = swingSchema.getFSSFProfileDomainFactory().newListJPanel( null, swingContainer, dataCollection, new RefreshComponentsFSSFProfileDomList(), false); } return (tabViewComponentsFSSFProfileDomListJPanel); } protected class RefreshComponentsFSSFProfileAlsList implements ICFJRefreshCallback { public RefreshComponentsFSSFProfileAlsList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFProfileAliasObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFProfileAls(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFProfileAlsListJPanel(); ICFFreeSwitchSwingFSSFProfileAliasJPanelList jpList = (ICFFreeSwitchSwingFSSFProfileAliasJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFProfileAlsListJPanel() { if (tabViewComponentsFSSFProfileAlsListJPanel == null) { Collection<ICFFreeSwitchFSSFProfileAliasObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFProfileAls(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSFProfileObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSFProfileObj)) { swingContainer = (ICFFreeSwitchFSSFProfileObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFProfileAlsListJPanel = swingSchema.getFSSFProfileAliasFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFProfileAlsList(), false); } return (tabViewComponentsFSSFProfileAlsListJPanel); } protected class RefreshComponentsFSSFGatewayList implements ICFJRefreshCallback { public RefreshComponentsFSSFGatewayList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFGatewayObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFGateway(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFGatewayListJPanel(); ICFFreeSwitchSwingFSSFGatewayJPanelList jpList = (ICFFreeSwitchSwingFSSFGatewayJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFGatewayListJPanel() { if (tabViewComponentsFSSFGatewayListJPanel == null) { Collection<ICFFreeSwitchFSSFGatewayObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFGateway(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSofiaObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSofiaObj)) { swingContainer = (ICFFreeSwitchFSSofiaObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFGatewayListJPanel = swingSchema.getFSSFGatewayFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFGatewayList(), false); } return (tabViewComponentsFSSFGatewayListJPanel); } protected class RefreshComponentsFSSFConferenceList implements ICFJRefreshCallback { public RefreshComponentsFSSFConferenceList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFConferenceObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFConference(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFConferenceListJPanel(); ICFFreeSwitchSwingFSSFConferenceJPanelList jpList = (ICFFreeSwitchSwingFSSFConferenceJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFConferenceListJPanel() { if (tabViewComponentsFSSFConferenceListJPanel == null) { Collection<ICFFreeSwitchFSSFConferenceObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFConference(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSofiaObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSofiaObj)) { swingContainer = (ICFFreeSwitchFSSofiaObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFConferenceListJPanel = swingSchema.getFSSFConferenceFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFConferenceList(), false); } return (tabViewComponentsFSSFConferenceListJPanel); } protected class RefreshComponentsFSSFConferencePFList implements ICFJRefreshCallback { public RefreshComponentsFSSFConferencePFList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFConferenceProfileObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFConferencePF(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFConferencePFListJPanel(); ICFFreeSwitchSwingFSSFConferenceProfileJPanelList jpList = (ICFFreeSwitchSwingFSSFConferenceProfileJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFConferencePFListJPanel() { if (tabViewComponentsFSSFConferencePFListJPanel == null) { Collection<ICFFreeSwitchFSSFConferenceProfileObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFConferencePF(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSFConferenceObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSFConferenceObj)) { swingContainer = (ICFFreeSwitchFSSFConferenceObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFConferencePFListJPanel = swingSchema.getFSSFConferenceProfileFactory() .newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFConferencePFList(), false); } return (tabViewComponentsFSSFConferencePFListJPanel); } protected class RefreshComponentsFSSFDirectoryList implements ICFJRefreshCallback { public RefreshComponentsFSSFDirectoryList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFDirectoryObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFDirectory(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFDirectoryListJPanel(); ICFFreeSwitchSwingFSSFDirectoryJPanelList jpList = (ICFFreeSwitchSwingFSSFDirectoryJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFDirectoryListJPanel() { if (tabViewComponentsFSSFDirectoryListJPanel == null) { Collection<ICFFreeSwitchFSSFDirectoryObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFDirectory(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSofiaObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSofiaObj)) { swingContainer = (ICFFreeSwitchFSSofiaObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFDirectoryListJPanel = swingSchema.getFSSFDirectoryFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFDirectoryList(), false); } return (tabViewComponentsFSSFDirectoryListJPanel); } protected class RefreshComponentsFSSFExtensionList implements ICFJRefreshCallback { public RefreshComponentsFSSFExtensionList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFExtensionObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFExtension(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFExtensionListJPanel(); ICFFreeSwitchSwingFSSFExtensionJPanelList jpList = (ICFFreeSwitchSwingFSSFExtensionJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFExtensionListJPanel() { if (tabViewComponentsFSSFExtensionListJPanel == null) { Collection<ICFFreeSwitchFSSFExtensionObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFExtension(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSFDirectoryObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSFDirectoryObj)) { swingContainer = (ICFFreeSwitchFSSFDirectoryObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFExtensionListJPanel = swingSchema.getFSSFExtensionFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFExtensionList(), false); } return (tabViewComponentsFSSFExtensionListJPanel); } protected class RefreshComponentsFSSFVMailList implements ICFJRefreshCallback { public RefreshComponentsFSSFVMailList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchFSSFVMailObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFVMail(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsFSSFVMailListJPanel(); ICFFreeSwitchSwingFSSFVMailJPanelList jpList = (ICFFreeSwitchSwingFSSFVMailJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsFSSFVMailListJPanel() { if (tabViewComponentsFSSFVMailListJPanel == null) { Collection<ICFFreeSwitchFSSFVMailObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsFSSFVMail(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchFSSofiaObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchFSSofiaObj)) { swingContainer = (ICFFreeSwitchFSSofiaObj) focus; } else { swingContainer = null; } tabViewComponentsFSSFVMailListJPanel = swingSchema.getFSSFVMailFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsFSSFVMailList(), false); } return (tabViewComponentsFSSFVMailListJPanel); } protected class RefreshComponentsPbxIvrMenuList implements ICFJRefreshCallback { public RefreshComponentsPbxIvrMenuList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchPbxIvrMenuObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsPbxIvrMenu(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsPbxIvrMenuListJPanel(); ICFFreeSwitchSwingPbxIvrMenuJPanelList jpList = (ICFFreeSwitchSwingPbxIvrMenuJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsPbxIvrMenuListJPanel() { if (tabViewComponentsPbxIvrMenuListJPanel == null) { Collection<ICFFreeSwitchPbxIvrMenuObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsPbxIvrMenu(swingIsInitializing); } else { dataCollection = null; } ICFSecurityTenantObj swingContainer; if ((focus != null) && (focus instanceof ICFSecurityTenantObj)) { swingContainer = (ICFSecurityTenantObj) focus; } else { swingContainer = null; } tabViewComponentsPbxIvrMenuListJPanel = swingSchema.getPbxIvrMenuFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsPbxIvrMenuList(), false); } return (tabViewComponentsPbxIvrMenuListJPanel); } protected class RefreshComponentsPbxIvrMenuEntryList implements ICFJRefreshCallback { public RefreshComponentsPbxIvrMenuEntryList() { } public void refreshMe() { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { Collection<ICFFreeSwitchPbxIvrMenuEntryObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsPbxIvrMenuEntry(swingIsInitializing); } else { dataCollection = null; } JPanel panel = getTabViewComponentsPbxIvrMenuEntryListJPanel(); ICFFreeSwitchSwingPbxIvrMenuEntryJPanelList jpList = (ICFFreeSwitchSwingPbxIvrMenuEntryJPanelList) panel; jpList.setSwingDataCollection(dataCollection); } } } } public JPanel getTabViewComponentsPbxIvrMenuEntryListJPanel() { if (tabViewComponentsPbxIvrMenuEntryListJPanel == null) { Collection<ICFFreeSwitchPbxIvrMenuEntryObj> dataCollection; ICFFreeSwitchTenantObj focus = (ICFFreeSwitchTenantObj) getSwingFocusAsTenant(); if (focus != null) { dataCollection = focus.getOptionalComponentsPbxIvrMenuEntry(swingIsInitializing); } else { dataCollection = null; } ICFFreeSwitchPbxIvrMenuObj swingContainer; if ((focus != null) && (focus instanceof ICFFreeSwitchPbxIvrMenuObj)) { swingContainer = (ICFFreeSwitchPbxIvrMenuObj) focus; } else { swingContainer = null; } tabViewComponentsPbxIvrMenuEntryListJPanel = swingSchema.getPbxIvrMenuEntryFactory().newListJPanel(null, swingContainer, dataCollection, new RefreshComponentsPbxIvrMenuEntryList(), false); } return (tabViewComponentsPbxIvrMenuEntryListJPanel); } public void setPanelMode(CFJPanel.PanelMode value) { CFJPanel.PanelMode oldMode = getPanelMode(); super.setPanelMode(value); if (tabViewComponentsTSecGroupListJPanel != null) { ((ICFFreeSwitchSwingTSecGroupJPanelCommon) tabViewComponentsTSecGroupListJPanel).setPanelMode(value); } if (tabViewComponentsDomainBaseListJPanel != null) { ((ICFFreeSwitchSwingDomainBaseJPanelCommon) tabViewComponentsDomainBaseListJPanel).setPanelMode(value); } if (tabViewComponentsTldListJPanel != null) { ((ICFFreeSwitchSwingTldJPanelCommon) tabViewComponentsTldListJPanel).setPanelMode(value); } if (tabViewComponentsFSSofiaListJPanel != null) { ((ICFFreeSwitchSwingFSSofiaJPanelCommon) tabViewComponentsFSSofiaListJPanel).setPanelMode(value); } if (tabViewComponentsFSSFDialerListJPanel != null) { ((ICFFreeSwitchSwingFSSFDialerJPanelCommon) tabViewComponentsFSSFDialerListJPanel).setPanelMode(value); } if (tabViewComponentsFSSFDialplanListJPanel != null) { ((ICFFreeSwitchSwingFSSFDialplanJPanelCommon) tabViewComponentsFSSFDialplanListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFProfileListJPanel != null) { ((ICFFreeSwitchSwingFSSFProfileJPanelCommon) tabViewComponentsFSSFProfileListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFProfileDomListJPanel != null) { ((ICFFreeSwitchSwingFSSFProfileDomainJPanelCommon) tabViewComponentsFSSFProfileDomListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFProfileAlsListJPanel != null) { ((ICFFreeSwitchSwingFSSFProfileAliasJPanelCommon) tabViewComponentsFSSFProfileAlsListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFGatewayListJPanel != null) { ((ICFFreeSwitchSwingFSSFGatewayJPanelCommon) tabViewComponentsFSSFGatewayListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFConferenceListJPanel != null) { ((ICFFreeSwitchSwingFSSFConferenceJPanelCommon) tabViewComponentsFSSFConferenceListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFConferencePFListJPanel != null) { ((ICFFreeSwitchSwingFSSFConferenceProfileJPanelCommon) tabViewComponentsFSSFConferencePFListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFDirectoryListJPanel != null) { ((ICFFreeSwitchSwingFSSFDirectoryJPanelCommon) tabViewComponentsFSSFDirectoryListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFExtensionListJPanel != null) { ((ICFFreeSwitchSwingFSSFExtensionJPanelCommon) tabViewComponentsFSSFExtensionListJPanel) .setPanelMode(value); } if (tabViewComponentsFSSFVMailListJPanel != null) { ((ICFFreeSwitchSwingFSSFVMailJPanelCommon) tabViewComponentsFSSFVMailListJPanel).setPanelMode(value); } if (tabViewComponentsPbxIvrMenuListJPanel != null) { ((ICFFreeSwitchSwingPbxIvrMenuJPanelCommon) tabViewComponentsPbxIvrMenuListJPanel).setPanelMode(value); } if (tabViewComponentsPbxIvrMenuEntryListJPanel != null) { ((ICFFreeSwitchSwingPbxIvrMenuEntryJPanelCommon) tabViewComponentsPbxIvrMenuEntryListJPanel) .setPanelMode(value); } } }