/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.geoforge.guillc.dialog;
import java.awt.Dimension;
import java.awt.event.ActionListener;
import javax.swing.BoxLayout;
import org.geoforge.guillc.frame.GfrFrmAbs;
import org.geoforge.guillc.panel.GfrPnl;
import org.geoforge.guillc.panel.GfrPnlCmdCancel;
import org.geoforge.guillc.panel.GfrPnlStatusBarMain;
import org.geoforge.guillc.tabbedpane.GfrTab;
/**
*
* @author bill
*/
abstract public class GfrDlgCmdCancelAboutAbs extends GfrDlgCmdCancelAbs
{
final static private int _INT_WIDTH_ = 630;
// ---
protected GfrTab _tab = null;
protected GfrPnl _pnlGeneral = null;
protected GfrPnl _pnlCaches = null;
abstract protected boolean _fillInGeneral();
abstract protected boolean _fillInCaches();
protected GfrDlgCmdCancelAboutAbs(
String strTitle,
int intHeight)
{
super(
GfrFrmAbs.s_getFrameOwner(GfrPnlStatusBarMain.s_getInstance()),
strTitle,
new Dimension(GfrDlgCmdCancelAboutAbs._INT_WIDTH_, intHeight)
);
super._pnlCommand = new GfrPnlCmdCancel(
(ActionListener) this);
this._tab = new GfrTab();
this._pnlGeneral = new GfrPnl();
super.getContentPane().add(this._tab);
this._pnlGeneral.setLayout(new BoxLayout(this._pnlGeneral, BoxLayout.Y_AXIS));
this._pnlCaches = new GfrPnl();
this._pnlCaches.setLayout(new BoxLayout(this._pnlCaches, BoxLayout.Y_AXIS));
}
@Override
public void destroy()
{
super.destroy();
if (this._tab != null)
{
this._tab.destroy();
this._tab = null;
}
if (this._pnlGeneral != null)
{
this._pnlGeneral.destroy();
this._pnlGeneral = null;
}
if (this._pnlCaches != null)
{
this._pnlCaches.destroy();
this._pnlCaches = null;
}
}
@Override
public boolean init()
{
if (! super.init())
return false;
if (! this._tab.init())
return false;
if (! this._pnlGeneral.init())
return false;
if (! this._pnlCaches.init())
return false;
if (! _fillInGeneral())
return false;
if (! _fillInCaches())
return false;
this._tab.add("General", this._pnlGeneral);
this._tab.add("Caches", this._pnlCaches);
return true;
}
}