Package org.geoforge.guillcogc.panel

Source Code of org.geoforge.guillcogc.panel.GfrPnlSelEdtServerEdit

/*
*  Copyright (C) 2011-2014 GeoForge Project
*
*  This program is free software: you can redistribute it and/or modify
*  it under the terms of the GNU Lesser General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU Lesser General Public License for more details.
*
*  You should have received a copy of the GNU Lesser General Public License
*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package org.geoforge.guillcogc.panel;

import org.geoforge.guillc.handler.IGfrHandlerListenerPanelDialog;
import org.geoforge.guillc.event.GfrEvtPanelChange;
import org.geoforge.guillc.panel.GfrPnlGrpTxfFullEditableYes;
import org.geoforge.guillc.panel.GfrPnlSelEdt;
import org.geoforge.lang.util.GfrResBundleLang;

/**
*
* @author Amadeus.Sowerby
*
* email: Amadeus.Sowerby_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*/
public class GfrPnlSelEdtServerEdit extends GfrPnlSelEdt implements IGfrHandlerListenerPanelDialog
{
   //--
   //--beg private fields
   private GfrPnlGrpTxfFullEditableYes _pnlUrlServerWms_;
   private GfrPnlGrpTxfFullEditableYes _pnlUrlHomePage_;
   //--end private fields
   //--

   public GfrPnlSelEdtServerEdit(
           IGfrHandlerListenerPanelDialog pnr)
   {
      super();

      this._pnlUrlServerWms_ = new GfrPnlGrpTxfFullEditableYes(
              GfrResBundleLang.s_getInstance().getValue("sentence.webMapService"));
     
      this._pnlUrlHomePage_ = new GfrPnlGrpTxfFullEditableYes(
              GfrResBundleLang.s_getInstance().getValue("sentence.homePage"));
     
      this._pnlUrlServerWms_.addPanelListener((IGfrHandlerListenerPanelDialog)this);
     
      if (pnr != null)
         this._pnlUrlServerWms_.addPanelListener(pnr);
     
      super.addToListResizable(this._pnlUrlServerWms_);
      super.addToListResizable(this._pnlUrlHomePage_);
   }

   @Override
   public boolean init()
   {
      if (!super.init())
         return false;

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

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

     

      this._pnlUrlServerWms_.setMandatoryIcon(true);

      this.addWithSpace(this._pnlUrlServerWms_);
      this.addWithSpace(this._pnlUrlHomePage_);

      return true;
   }
  
   public String getValue()
   {
      return this._pnlUrlServerWms_.getValue();
   }

   public String getValueDescShort()
   {
      return "_dummy_abstract_";
   }

      public String getValueUrl()
   {
      return this._pnlUrlHomePage_.getValue();
   }

   public void setOkUrlServer(boolean ok)
   {
      this._pnlUrlServerWms_.setValueIsOk(ok);
   }

   public String getWho()
   {
      return "_dummy_who_";
   }

   @Override
   public void somethingHasHappened(GfrEvtPanelChange e)
   {
       // ????
   }

   public void setCorrectInput(boolean bln)
   {
      this._pnlUrlServerWms_.setValueIsOk(bln);
   }

   public Object getUrlObject()
   {
      return this._pnlUrlServerWms_;
   }
     
   @Override
   public void destroy()
   {
      super.destroy();
     
      if (this._pnlUrlServerWms_ != null)
      {
         this._pnlUrlServerWms_.destroy();
         this._pnlUrlServerWms_ = null;
      }
     
      if (this._pnlUrlHomePage_ != null)
      {
         this._pnlUrlHomePage_.destroy();
         this._pnlUrlHomePage_ = null;
      }
   }
}
TOP

Related Classes of org.geoforge.guillcogc.panel.GfrPnlSelEdtServerEdit

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.