Package org.geoforge.plghelloworldifrvolgfr.lang.thread

Source Code of org.geoforge.plghelloworldifrvolgfr.lang.thread.GfrThrNewViewerFrmIntVolPlgHelloGfr

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

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionListener;
import java.util.logging.Logger;
import javax.swing.event.InternalFrameListener;
import org.geoforge.appogcecl.lang.thread.GfrThrNewViewerFrmIntVolPlgAbs;
import org.geoforge.awt.java2d.MySurfaceText;
import org.geoforge.guillc.internalframe.GfrIfrWinViewRunAbs;
import org.geoforge.guillc.internalframe.GfrIfrWinViewRunSimplestVolPlg;
import org.geoforge.guillc.optionpane.GfrOptionPaneAbs;
import org.geoforge.guillc.panel.GfrPnl;
import org.geoforge.java.util.logging.filehandler.FileHandlerLogger;

/**
*
* @author bantchao
*/
public class GfrThrNewViewerFrmIntVolPlgHelloGfr extends GfrThrNewViewerFrmIntVolPlgAbs
{
   final static public String STR_WHAT = "Volatile \"Hello Geoforge\" viewer";
  
  
   // ----
   // begin: instantiate logger for this class
   final private static Logger _LOGGER_ = Logger.getLogger(GfrThrNewViewerFrmIntVolPlgHelloGfr.class.getName());

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

   // end: instantiate logger for this class
   // ----

   public GfrThrNewViewerFrmIntVolPlgHelloGfr(
           InternalFrameListener iflPlgRun,
           Container cntDesktopPane
           )
   {
      super(iflPlgRun,
              (ActionListener) null, // alrPlgRun
              (ActionListener) null, // alrPlgThis
              cntDesktopPane
              );
   }
  
   @Override
    public void run()
    {
       try
       {
          super._ifr_ = new GfrIfrWinViewRunSimplestVolPlg(
                  super._iflPlgRun,
                  GfrThrNewViewerFrmIntVolPlgHelloGfr.STR_WHAT // strTitleInternalFrame
                  );

        
         _addContents_(super._ifr_);
        
  
        super._run(super._ifr_);
       }
      
       catch(Exception exc)
       {
          exc.printStackTrace();
          String strError = exc.getMessage();
          GfrThrNewViewerFrmIntVolPlgHelloGfr._LOGGER_.warning(strError);
          GfrOptionPaneAbs.s_showDialogWarning(null, strError);
       }
    }
  
   private void _addContents_(GfrIfrWinViewRunAbs ifr)
   {
      GfrPnl pnl = new GfrPnl();
      pnl.setLayout(new BorderLayout());
      ifr.setContentPane(pnl);
      MySurfaceText mtt = new MySurfaceText("Hello Geoforge!");
      pnl.add(mtt, BorderLayout.CENTER);
   }
}
TOP

Related Classes of org.geoforge.plghelloworldifrvolgfr.lang.thread.GfrThrNewViewerFrmIntVolPlgHelloGfr

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.