/*
* 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.internalframe;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.event.InternalFrameListener;
import org.geoforge.guillc.menubar.GfrMbrWinViewerIfrRunPlgSng;
import org.geoforge.guillc.panel.GfrPnlCntWinViewerSimplePlg;
import org.geoforge.guillc.panel.PnlAbs;
import org.geoforge.awt.image.GfrFactoryIconAbs;
import org.geoforge.io.awt.image.GfrFactoryIconAppGfr;
import org.geoforge.java.util.logging.filehandler.FileHandlerLogger;
import org.geoforge.wrpbasprsdsp.viewer.GfrWrpBasPrsDspPrjViewersExisting;
/**
*
* @author robert
*
* !!!
*/
public class GfrIfrWinViewRunIdRegSerSimplePlg extends GfrIfrWinViewRunIdRegSerAbs
{
final static private long serialVersionUID = 1L;
final static private int _INT_DIM_W_ = 500;
final static private int _INT_DIM_H_ = 400;
// ----
// begin: instantiate logger for this class
final private static Logger _LOGGER_ = Logger.getLogger(GfrIfrWinViewRunIdRegSerSimplePlg.class.getName());
static
{
GfrIfrWinViewRunIdRegSerSimplePlg._LOGGER_.addHandler(FileHandlerLogger.s_getInstance());
}
// end: instantiate logger for this class
// ----
@Override
protected void _saveDisplay() throws Exception {}
public PnlAbs getPanelContents() { return super._pnlContents; }
public GfrIfrWinViewRunIdRegSerSimplePlg(
InternalFrameListener ifrListenerController,
ActionListener alr,
String strUniqueId) throws Exception
{
this(
ifrListenerController,
alr,
strUniqueId,
GfrWrpBasPrsDspPrjViewersExisting.s_getInstance().getName(strUniqueId));
_saveDisplay();
}
public GfrIfrWinViewRunIdRegSerSimplePlg(
InternalFrameListener ifrListenerController,
ActionListener lstActionPlgIfrRun,
String strUniqueId,
String strUniqueName)
throws Exception
{
super( _INT_DIM_W_,
_INT_DIM_H_,
ifrListenerController,
strUniqueId,
strUniqueName);
super._mbr = new GfrMbrWinViewerIfrRunPlgSng(
lstActionPlgIfrRun
);
super._pnlContents = new GfrPnlCntWinViewerSimplePlg();
}
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException
{
stream.defaultReadObject();
}
// memo: hidden source call
private void writeObject(ObjectOutputStream out) throws IOException
{
out.defaultWriteObject();
}
@Override
public boolean init()
{
if (! super.init())
return false;
return true;
}
@Override
public void loadUnserializedObject() throws Exception
{
super.loadUnserializedObject();
}
@Override
public void loadTransient() throws Exception
{
super.loadTransient();
ImageIcon iin = GfrFactoryIconAppGfr.s_getPlugin(GfrFactoryIconAbs.INT_SIZE_XXSMALL);
if (iin == null)
{
String str = "nil iin";
GfrIfrWinViewRunIdRegSerSimplePlg._LOGGER_.severe(str);
throw new Exception(str);
}
super.setFrameIcon(iin);
}
}