/*
* 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.guillc.panel;
import java.awt.event.ActionListener;
import org.geoforge.guillc.combobox.CmbChoiceStringKeyAbs;
import org.geoforge.guillc.combobox.CmbChoiceShapeIcon;
import org.geoforge.guillc.combobox.GfrCmb;
import org.geoforge.wrpbasprsdsp.render.wwd.GfrWrpBasPrsDspPrjAnimTmsAbs;
/**
*
* @author bantchao
*/
public class GfrPnlCustomShapeIconWwd extends GfrPnlCustomAbs
{
//final static private int _INT_WIDTH_ = 60;
//final static private int _INT_HEIGHT_ = 20;
final static private String _STR_DEFAULT_SHAPE_ = GfrWrpBasPrsDspPrjAnimTmsAbs.KindShape.CIRCLE.getKey();
public GfrPnlCustomShapeIconWwd(
ActionListener[] alrsParent,
String strShapeInit) throws Exception
{
super(alrsParent, (Object) strShapeInit);
boolean blnSetSelected = false;
if (strShapeInit != null)
blnSetSelected = true;
String strShape = _STR_DEFAULT_SHAPE_;
if (strShapeInit != null)
strShape = strShapeInit;
super._objCustom = new CmbChoiceShapeIcon(
alrsParent,
strShape);
((GfrCmb) super._objCustom).setEnabled(blnSetSelected);
}
/*
* done in a hurry
*/
public void reset()
{
((CmbChoiceStringKeyAbs) this._objCustom).resetValue();
super._rbn.doClick();
}
public String getChoice()
{
return ((CmbChoiceStringKeyAbs) this._objCustom).getSelectedItem().toString();
}
}