Package org.geoforge.plggazetteers.swing.panel

Source Code of org.geoforge.plggazetteers.swing.panel.GfrPnlOptionsGazetteerAbs

/*
* 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;
        }
    }
}
TOP

Related Classes of org.geoforge.plggazetteers.swing.panel.GfrPnlOptionsGazetteerAbs

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.