/*
* 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.MouseListener;
import java.util.logging.Logger;
import org.geoforge.guillc.button.GfrBcnAbs;
import org.geoforge.guillc.button.GfrBcnJhpOflPartSmall;
import org.geoforge.guillc.button.GfrBcnPrintPartFrame;
import org.geoforge.awt.image.GfrFactoryIconAbs;
import org.geoforge.java.util.logging.filehandler.FileHandlerLogger;
/**
*
* @author robert
*/
abstract public class GfrTbrHlpWinViewerRunIfrMainCtrDspPrnAbs extends GfrTbrHlpWinViewerRunIfrMainCtrDspAbs
{
// ----
// begin: instantiate logger for this class
final static private Logger _LOGGER_ = Logger.getLogger(GfrTbrHlpWinViewerRunIfrMainCtrDspPrnAbs.class.getName());
static
{
GfrTbrHlpWinViewerRunIfrMainCtrDspPrnAbs._LOGGER_.addHandler(FileHandlerLogger.s_getInstance());
}
// end: instantiate logger for this class
// ----
protected GfrBcnAbs _btnPrint = null;
protected GfrTbrHlpWinViewerRunIfrMainCtrDspPrnAbs(
MouseListener mlrEffectsBorder,
String strKeyHelp) throws Exception
{
super(GfrFactoryIconAbs.INT_SIZE_SMALL);
super._btnHelpPartThisFrame = new GfrBcnJhpOflPartSmall(mlrEffectsBorder, strKeyHelp);
this._btnPrint = new GfrBcnPrintPartFrame(
mlrEffectsBorder,
GfrFactoryIconAbs.INT_SIZE_SMALL);
}
@Override
public boolean init()
{
if (! super.init())
return false;
if (! this._btnPrint.init())
{
GfrTbrHlpWinViewerRunIfrMainCtrDspPrnAbs._LOGGER_.severe("! this._btnPrint_.init()");
return false;
}
super.add(this._btnPrint, 0);
return true;
}
@Override
public void destroy()
{
super.destroy();
if (this._btnPrint != null)
{
this._btnPrint.destroy();
this._btnPrint = null;
}
}
}