/*
* 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.guillc.toolbar;
import java.awt.event.ActionListener;
import java.awt.event.MouseListener;
import javax.swing.AbstractButton;
import javax.swing.JToolBar;
import org.geoforge.guillc.button.BtnTransienMovObjsWwdEarthAbs;
import org.geoforge.guillc.button.GfrBcnJhpOflOthXSmall;
import org.geoforge.guillc.handler.IGfrHandlerOpenSpaceAny;
import org.geoforge.awt.image.GfrFactoryIconAbs;
import org.geoforge.guillc.handler.IGfrHandlerListenerPerspectiveRun;
/**
*
* @author bantchao
*
* email: bantchao_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*
*/
abstract public class GfrTbrHlpSubDspWwdEarthRunSecAbs extends GfrTbrHlpSubDspWwdEarthAbs implements
IGfrHandlerOpenSpaceAny, // should be: project instead of any! memo same mecanism as deleteAllTlos/struff
IGfrHandlerListenerPerspectiveRun
{
protected BtnTransienMovObjsWwdEarthAbs _btnMoveObjects = null;
protected GfrTbrHlpSubDspWwdEarthRunSecAbs(
ActionListener alrParent,
MouseListener mlrEffectsBorder) throws Exception
{
super(GfrFactoryIconAbs.INT_SIZE_XSMALL,
1, // insets for radiobuttons
AbstractButton.TOP, // text location for radiobuttons
alrParent,
JToolBar.VERTICAL,
false // blnLocationToolTipTop
);
super._btnHelpPartThisFrame = new GfrBcnJhpOflOthXSmall(
mlrEffectsBorder, "_shr_win_view_earth_dsp_");
}
@Override
public void removeActionListenerPerspectiveRun(ActionListener actListenerController)
{
// void
}
@Override
public void addActionListenerPerspectiveRun(ActionListener actListenerController)
{
// void
}
@Override
public void setEnabledButtons(boolean bln)
{
super.setEnabledButtons(bln);
}
@Override
public void openSpaceAny(ActionListener alrControllerSpcPrj)
throws Exception
{
this._btnMoveObjects.openSpaceAny(alrControllerSpcPrj);
}
@Override
public void close()
throws Exception
{
super.close();
this._btnMoveObjects.closeSpace();
}
@Override
public boolean init()
{
if (! super.init())
return false;
if (! this._btnMoveObjects.init())
return false;
int intPos = 0; // !!!!
if (super._btnPlugins != null)
intPos += 2;
super.add(this._btnMoveObjects, intPos++);
return true;
}
@Override
public void destroy()
{
super.destroy();
if (this._btnMoveObjects != null)
{
this._btnMoveObjects.destroy();
this._btnMoveObjects = null;
}
}
@Override
public void loadTransient() throws Exception
{
super.loadTransient();
this._btnMoveObjects.loadTransient();
}
@Override
public void releaseTransient() throws Exception
{
super.releaseTransient();
this._btnMoveObjects.releaseTransient();
}
}