/*
* 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 java.awt.event.ActionListener;
import javax.swing.event.ChangeListener;
import org.geoforge.guillc.panel.PnlDspRowComboColorPushpinDft;
import org.geoforge.guillc.panel.PnlDspRowChoiceBlnYesNo;
import org.geoforge.mdldspecl.render.wwd.GfrMdlDspRndWwdEarthShpDimOnePointEclPlc;
import org.geoforge.wrpbasprsdsp.render.wwd.GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.KindColorPushpin;
import org.geoforge.wrpbasprsdspecl.render.wwd.GfrWrpRndDftWwdEarthShpDimOnePushpinPlc;
/**
*
* @author Amadeus.Sowerby
*
* email: Amadeus.Sowerby_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*/
public class GfrPnlTabsSettingsDspWwdEarthPntPushpinTopPlc extends GfrPnlTabsSettingsDspWwdEarthPntPushpinAbs
{
public GfrPnlTabsSettingsDspWwdEarthPntPushpinTopPlc(
ActionListener alrParent,
ChangeListener clrParent)
throws Exception
{
super();
boolean blnHasTootip = GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().isTooltip();
boolean blnIsVisibleLabel = GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().isVisibleLabel();
String strValueInitAnnotation = GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().getKindColorPushpinKey();
// end get values
super._pnlColorPushpin = new PnlDspRowComboColorPushpinDft(
alrParent,
strValueInitAnnotation);
super._pnlTooltip = new PnlDspRowChoiceBlnYesNo(
alrParent,
blnHasTootip,
"tooltip");
super._pnlVisibleLabel = new PnlDspRowChoiceBlnYesNo(
alrParent,
blnIsVisibleLabel,
"visible label");
}
@Override
public void doTaskTabDialog() throws Exception
{
if (super._pnlColorPushpin.hasChangedValue())
{
String strKey = ((PnlDspRowComboColorPushpinDft) super._pnlColorPushpin).getValue();
boolean bln = super._pnlColorPushpin.isApplyToAll();
String strValue = KindColorPushpin.s_getValue(strKey);
GfrMdlDspRndWwdEarthShpDimOnePointEclPlc.getInstance().setKindColorPushpinDefault(strValue, bln);
}
if (super._pnlTooltip.hasChangedValue())
{
boolean blnValue = ((PnlDspRowChoiceBlnYesNo) super._pnlTooltip).getValue();
boolean bln = super._pnlTooltip.isApplyToAll();
GfrMdlDspRndWwdEarthShpDimOnePointEclPlc.getInstance().setTooltipDefault(blnValue, bln);
}
if (super._pnlVisibleLabel.hasChangedValue())
{
boolean blnValue = ((PnlDspRowChoiceBlnYesNo) super._pnlVisibleLabel).getValue();
boolean bln = super._pnlVisibleLabel.isApplyToAll();
GfrMdlDspRndWwdEarthShpDimOnePointEclPlc.getInstance().setVisibleLabelDefault(blnValue, bln);
}
// ending
super.doTaskTabDialog();
}
}