Package org.geoforge.guillcogcecl.panel

Source Code of org.geoforge.guillcogcecl.panel.GfrPnlTabsSettingsDspWwdEarthPntPushpinObjPlc

/*
*  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 2
*  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, write to the Free Software
*  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

package org.geoforge.guillcogcecl.panel;

import org.geoforge.guillc.panel.GfrPnlTabsSettingsDspWwdEarthPntPushpinAbs;
import org.geoforge.guillc.panel.PnlDspRowChoiceBlnYesNoObject;
import org.geoforge.guillc.panel.PnlDspRowComboColorPushpinDft;
import org.geoforge.guillc.panel.PnlDspRowComboColorPushpinDftObject;
import org.geoforge.guillc.panel.PnlDspRowChoiceBlnYesNo;
import java.awt.event.ActionListener;
import javax.swing.event.ChangeListener;
import org.geoforge.mdldspecl.render.wwd.GfrMdlDspRndWwdEarthShpDimOnePointEclPlc;
import org.geoforge.wrpbasprsdsp.render.wwd.GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin;
import org.geoforge.wrpbasprsdsp.render.wwd.GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.KindColorPushpin;

/**
*
* @author Amadeus.Sowerby
*
* email: Amadeus.Sowerby_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*/
public class GfrPnlTabsSettingsDspWwdEarthPntPushpinObjPlc extends GfrPnlTabsSettingsDspWwdEarthPntPushpinAbs
{
   private String _strId_ = null;
  
   public GfrPnlTabsSettingsDspWwdEarthPntPushpinObjPlc(
           ActionListener alrParent,
           ChangeListener clrParent,
           String strId)
           throws Exception
   {
      super();
     
      this._strId_ = strId;
     
      // begin get value
      boolean blnHasTootip = GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().isTooltip(strId);
      boolean blnIsVisibleLabel = GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().isVisibleLabel(strId);
      String strValueInitAnnotation = GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().getKindColorPushpinKey(strId);
      // end get values

      super._pnlColorPushpin = new PnlDspRowComboColorPushpinDftObject(
              alrParent,
              strValueInitAnnotation);
     
      super._pnlTooltip = new PnlDspRowChoiceBlnYesNoObject(
              alrParent,
              blnHasTootip,
              "tooltip");
     
      super._pnlVisibleLabel = new PnlDspRowChoiceBlnYesNoObject(
              alrParent,
              blnIsVisibleLabel,
              "Visible label");
   }


   @Override
   public void doTaskTabDialog() throws Exception
   {
      if (super._pnlColorPushpin.hasChangedValue())
      {
         String strKey = ((PnlDspRowComboColorPushpinDft) super._pnlColorPushpin).getValue();
         boolean blnApplyToAll = super._pnlColorPushpin.isApplyToAll();
         boolean blnSetAsDefault = ((PnlDspRowComboColorPushpinDftObject) super._pnlColorPushpin).isSetDefault();
         String strValue = KindColorPushpin.s_getValue(strKey);
         GfrMdlDspRndWwdEarthShpDimOnePointEclPlc.getInstance().setKindColorPushpin(this._strId_, strValue, blnApplyToAll, blnSetAsDefault);
      }
     
      if (super._pnlTooltip.hasChangedValue())
      {
         boolean blnValue = ((PnlDspRowChoiceBlnYesNo) super._pnlTooltip).getValue();
         boolean blnApplyToAll = super._pnlTooltip.isApplyToAll();
         boolean blnSetAsDefault = ((PnlDspRowChoiceBlnYesNoObject) super._pnlTooltip).isSetDefault();
         GfrMdlDspRndWwdEarthShpDimOnePointEclPlc.getInstance().setTooltip(this._strId_, blnValue, blnApplyToAll, blnSetAsDefault);
      }
     
      if (super._pnlVisibleLabel.hasChangedValue())
      {
         boolean blnValue = ((PnlDspRowChoiceBlnYesNo) super._pnlVisibleLabel).getValue();
         boolean blnApplyToAll = super._pnlVisibleLabel.isApplyToAll();
         boolean blnSetAsDefault = ((PnlDspRowChoiceBlnYesNoObject) super._pnlVisibleLabel).isSetDefault();
         GfrMdlDspRndWwdEarthShpDimOnePointEclPlc.getInstance().setVisibleLabel(this._strId_, blnValue, blnApplyToAll, blnSetAsDefault);
      }
     
      // ending
      super.doTaskTabDialog();
   }
}
TOP

Related Classes of org.geoforge.guillcogcecl.panel.GfrPnlTabsSettingsDspWwdEarthPntPushpinObjPlc

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.