/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.geoforge.plggazetteers.swing.panel;
import java.awt.event.ItemListener;
import javax.swing.BoxLayout;
import org.geoforge.guillc.panel.GfrPnl;
import org.geoforge.plggazetteers.swing.checkbox.GfrCbxNewPlcGazetteer;
import org.geoforge.plggazetteers.swing.checkbox.GfrCbxSetLabelNewPlcGazetteer;
/**
*
* @author bantchao
*/
abstract public class GfrPnlOptionsGazetteerAbs extends GfrPnl
{
private GfrCbxNewPlcGazetteer _cbxNewPlc_;
private GfrCbxSetLabelNewPlcGazetteer _cbxSetVisibleLabelNewPlc_;
protected GfrPnlOptionsGazetteerAbs(
ItemListener lstItem,
boolean blnDefaultVisibleLabelNewPlc)
{
super();
this._cbxNewPlc_ = new GfrCbxNewPlcGazetteer(lstItem);
this._cbxSetVisibleLabelNewPlc_ = new GfrCbxSetLabelNewPlcGazetteer(lstItem, blnDefaultVisibleLabelNewPlc);
super.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
}
@Override
public boolean init()
{
if (! super.init())
return false;
if (! this._cbxNewPlc_.init())
return false;
if (! this._cbxSetVisibleLabelNewPlc_.init())
return false;
super.add(this._cbxNewPlc_);
super.add(this._cbxSetVisibleLabelNewPlc_);
return true;
}
@Override
public void destroy()
{
super.destroy();
if (this._cbxNewPlc_ != null)
{
this._cbxNewPlc_.destroy();
this._cbxNewPlc_ = null;
}
if (this._cbxSetVisibleLabelNewPlc_ != null)
{
this._cbxSetVisibleLabelNewPlc_.destroy();
this._cbxSetVisibleLabelNewPlc_ = null;
}
}
}