/*
* Copyright (C) 2011-2014 GeoForge Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.geoforge.guillcogc.tabbedpane;
import java.awt.event.ActionListener;
import javax.swing.Icon;
import org.geoforge.guillc.panel.GfrPnlTabsAbs;
import org.geoforge.guillcogc.panel.GfrPnlTabsSettingsInfObjServerWmsContact;
import org.geoforge.guillcogc.panel.GfrPnlTabsSettingsInfObjDatServerWmsGeneral;
import org.geoforge.guillcogc.panel.GfrPnlTabsSettingsInfObjServerWmsService;
/**
*
* @author bantchao
*/
public class GfrTabCntSetInfObjUrlGlbWms extends GfrTabCntSetInfObjUrlAbs
{
final static private int _F_INT_WIDTH_ = 550 + 10;
final static private int _F_INT_HEIGHT_ = 320;
private GfrPnlTabsAbs _pnlService_ = null;
private GfrPnlTabsAbs _pnlContact_ = null;
public GfrTabCntSetInfObjUrlGlbWms(ActionListener alrParent,
String strIdObject)
throws Exception
{
super(alrParent,
GfrTabCntSetInfObjUrlGlbWms._F_INT_WIDTH_,
GfrTabCntSetInfObjUrlGlbWms._F_INT_HEIGHT_);
super._pnlInformation = new GfrPnlTabsSettingsInfObjDatServerWmsGeneral(alrParent, strIdObject);
this._pnlService_ = new GfrPnlTabsSettingsInfObjServerWmsService(alrParent, strIdObject);
this._pnlContact_ = new GfrPnlTabsSettingsInfObjServerWmsContact(alrParent, strIdObject);
}
@Override
public void doTaskTabDialog() throws Exception
{
super.doTaskTabDialog();
this._pnlService_.doTaskTabDialog();
this._pnlContact_.doTaskTabDialog();
}
@Override
public boolean init()
{
if (! super.init())
return false;
super.setTitleAt(0, GfrPnlTabsSettingsInfObjDatServerWmsGeneral.STR_TITLE_THIS);
if (! this._pnlService_.init())
return false;
if (! this._pnlContact_.init())
return false;
super.addTab(GfrPnlTabsSettingsInfObjServerWmsService.STR_TITLE_THIS, (Icon) null, this._pnlService_);
super.addTab(GfrPnlTabsSettingsInfObjServerWmsContact.STR_TITLE_THIS, (Icon) null, this._pnlContact_);
return true;
}
@Override
public void destroy()
{
super.destroy();
if (this._pnlService_ != null)
{
this._pnlService_.destroy();
this._pnlService_ = null;
}
if (this._pnlContact_ != null)
{
this._pnlContact_.destroy();
this._pnlContact_ = null;
}
}
}