Package org.geoforge.guillc.dialog

Source Code of org.geoforge.guillc.dialog.GfrDlgCmdCancelAboutPlgLicYes

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.geoforge.guillc.dialog;

import java.util.logging.Logger;
import org.geoforge.guillc.optionpane.GfrOptionPaneAbs;
import org.geoforge.guillc.panel.*;
import org.geoforge.java.util.logging.filehandler.FileHandlerLogger;
import org.geoforge.mgrplg.handler.IGfrHandlerLicensingPlugin;
import org.geoforge.mgrplg.impl.GfrPlgImplAbs;
import org.geoforge.wrpbasusr.GfrWrpUsrSpcDspPrtAppRoot;

/**
*
* @author bill
*/
public class GfrDlgCmdCancelAboutPlgLicYes extends GfrDlgCmdCancelAboutPlgLicAbs
{
    final static private int _INT_HEIGHT_ = 310;
   
   
    // ----
    // begin: instantiate logger for this class
    final private static Logger _LOGGER_ = Logger.getLogger(GfrDlgCmdCancelAboutPlgLicYes.class.getName());

    static
    {
        GfrDlgCmdCancelAboutPlgLicYes._LOGGER_.addHandler(FileHandlerLogger.s_getInstance());
    }

    // end: instantiate logger for this class
    // ----
   
    // ---
   
    private GfrPnl _pnlLicense_ = null;
   
    public GfrDlgCmdCancelAboutPlgLicYes(GfrPlgImplAbs plg, String strPathAbsBlackBox)
    {
        super(_INT_HEIGHT_, plg, strPathAbsBlackBox);
       
        String strPathAbsLicense = "";
       
        try
        {
           strPathAbsLicense = GfrWrpUsrSpcDspPrtAppRoot.getInstance().getPathAbsoluteLicPlugin(
                plg.getNamePlugin(), plg.getVersionThisPlugin());
        }
       
        catch(Exception exc)
        {
            exc.printStackTrace();
            String strSevere = exc.getMessage();
            GfrDlgCmdCancelAboutPlgLicYes._LOGGER_.severe(strSevere);
            GfrOptionPaneAbs.s_showDialogError(null, strSevere);
        }
       
        IGfrHandlerLicensingPlugin hndLicense = (IGfrHandlerLicensingPlugin) super._plgImpl;
       
        this._pnlLicense_ = new GfrPnlAboutLicense(
             strPathAbsLicense,
            hndLicense.getMapPropertiesLicensedPlugin()
           );
     
    }
   
    @Override
   public void destroy()
   {
      super.destroy();
     
      if (this._pnlLicense_ != null)
      {
         this._pnlLicense_.destroy();
         this._pnlLicense_ = null;
      }
   }
  
   @Override
   public boolean init()
   {
      if (! super.init())
         return false;

      if (! this._pnlLicense_.init())
         return false;

      super._tab.add(GfrPnlAboutLicense.STR_TITLE_THIS, this._pnlLicense_);
     
      return true;
   }
}
TOP

Related Classes of org.geoforge.guillc.dialog.GfrDlgCmdCancelAboutPlgLicYes

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.