/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
package org.geoforge.guillcogcecl.popupmenu;
import java.awt.event.ActionListener;
import java.util.logging.Logger;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrIdCopTlo;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrIdDelObj;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrIdRenTlo;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrIdSetTlo;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrAbs;
import org.geoforge.guillc.popupmenu.GfrPmuCtlDspWwdAbs;
import org.geoforge.java.util.logging.filehandler.FileHandlerLogger;
/**
*
* @author bantchao
*
* email: bantchao_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*
*/
abstract public class GfrPmuCtlDspWwdTloEclAbs extends GfrPmuCtlDspWwdAbs
{
// ----
// begin: instantiate logger for this class
final private static Logger _LOGGER_ = Logger.getLogger(GfrPmuCtlDspWwdTloEclAbs.class.getName());
static
{
GfrPmuCtlDspWwdTloEclAbs._LOGGER_.addHandler(FileHandlerLogger.s_getInstance());
}
// end: instantiate logger for this class
// ----
protected GfrMimTrsAlrAbs _mimUrl = null;
protected GfrMimTrsAlrAbs _mimDelete = null;
transient protected GfrMimTrsAlrAbs _mimSettings = null;
protected GfrMimTrsAlrAbs _mimCopy = null;
protected GfrMimTrsAlrAbs _mimRename = null;
protected GfrPmuCtlDspWwdTloEclAbs(
ActionListener alrController,
String strUniqueId,
String strValueKindTargetWindow,
String strValueKindObject)
{
super();
this._mimCopy = new GfrMimTrsAlrIdCopTlo(
alrController,
strUniqueId,
strValueKindObject);
this._mimRename = new GfrMimTrsAlrIdRenTlo(
alrController,
strUniqueId,
strValueKindObject);
this._mimDelete = new GfrMimTrsAlrIdDelObj(
alrController,
strUniqueId,
strValueKindObject);
this._mimSettings = new GfrMimTrsAlrIdSetTlo(
alrController,
strUniqueId,
strValueKindTargetWindow,
strValueKindObject);
}
@Override
public boolean init()
{
if (!super.init())
return false;
if (!this._mimDelete.init())
return false;
if (!this._mimUrl.init())
return false;
if (!this._mimSettings.init())
return false;
if (!this._mimCopy.init())
return false;
if (!this._mimRename.init())
return false;
super.add(this._mimRename);
super.add(this._mimCopy);
super.add(this._mimDelete);
//super.add(new JPopupMenu.Separator());
super.add(this._mimSettings);
super.add(this._mimUrl);
return true;
}
@Override
public void destroy()
{
super.destroy();
if (this._mimCopy != null)
{
this._mimCopy.destroy();
this._mimCopy = null;
}
if (this._mimRename != null)
{
this._mimRename.destroy();
this._mimRename = null;
}
if (this._mimDelete != null)
{
this._mimDelete.destroy();
this._mimDelete = null;
}
if (this._mimSettings != null)
{
this._mimSettings.destroy();
this._mimSettings = null;
}
if (this._mimUrl != null)
{
this._mimUrl.destroy();
this._mimUrl = null;
}
}
// beg transient stuff
@Override
public void loadTransient() throws Exception
{
super.loadTransient();
this._mimCopy.loadTransient();
this._mimRename.loadTransient();
this._mimDelete.loadTransient();
this._mimSettings.loadTransient();
this._mimUrl.loadTransient();
}
// end transient stuff // beg transient stuff
@Override
public void releaseTransient() throws Exception
{
super.releaseTransient();
this._mimCopy.releaseTransient();
this._mimRename.releaseTransient();
this._mimDelete.releaseTransient();
this._mimSettings.releaseTransient();
this._mimUrl.releaseTransient();
}
}