/*
* 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.mdldspecl.render.wwd;
import java.awt.Color;
import org.geoforge.mdldsp.event.render.wwd.EnuEvtDspRndWwdEarthShp;
import org.geoforge.mdldsp.event.render.wwd.EnuEvtDspRndWwdEarthShpDimOnePoint;
import org.geoforge.mdldsp.event.render.wwd.EnuEvtDspRndWwdEarthShpDimOnePushpin;
import org.geoforge.mdldsp.event.render.wwd.GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint;
import org.geoforge.mdldsp.render.wwd.GfrMdlDspRndWwdEarthShpDimOnePointAbs;
import org.geoforge.wrpbasprsdsp.render.wwd.GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin;
import org.geoforge.wrpbasprsdspecl.render.wwd.GfrWrpRndDftWwdEarthShpDimOnePushpinPlc;
import org.geoforge.wrpbasprssynecl.GfrWrpBasTopSynEclPlcs;
/**
*
* @author bantchao
*
* ATTN: notion of pushpin
*/
public class GfrMdlDspRndWwdEarthShpDimOnePointEclPlc extends GfrMdlDspRndWwdEarthShpDimOnePointAbs
{
static private GfrMdlDspRndWwdEarthShpDimOnePointEclPlc _INSTANCE_;
static public GfrMdlDspRndWwdEarthShpDimOnePointEclPlc getInstance()
{
if (_INSTANCE_ == null)
{
_INSTANCE_ = new GfrMdlDspRndWwdEarthShpDimOnePointEclPlc();
}
return _INSTANCE_;
}
// beg public
@Override
public void setColor(String strId, Color colValue,
boolean blnApplyToAll, boolean blnSetAsDefault) throws Exception
{
throw new UnsupportedOperationException("Dev coding error");
/*if (colValue == null)
throw new Exception("colValue == null");
if (blnSetAsDefault)
GfrWrpRndDftWwdEarthShpDimOnePointPlc.getInstance().setColor(colValue);
if (blnApplyToAll)
{
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIds();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setColor(strs, colValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdDimOne.COLOR, colValue);
super.notifyObservers(objEvt);
}
}
else
{
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setColor(strId, colValue);
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strId, EnuEvtDspRndWwdDimOne.COLOR, colValue);
super.notifyObservers(objEvt);
}
*/
}
@Override
public void setTransparency(String strId, float fltValue,
boolean blnApplyToAll, boolean blnSetAsDefault) throws Exception
{
throw new UnsupportedOperationException("Dev coding error");
/*if (blnSetAsDefault)
GfrWrpRndDftWwdEarthShpDimOnePointPlc.getInstance().setTransparency(fltValue);
Float flo = new Float(fltValue);
if (blnApplyToAll)
{
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIds();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setTransparency(strs, fltValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdDimOne.TRANSPARENCY, flo);
super.notifyObservers(objEvt);
}
}
else
{
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setTransparency(strId, fltValue);
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strId, EnuEvtDspRndWwdDimOne.TRANSPARENCY, flo);
super.notifyObservers(objEvt);
}
*/
}
@Override
public void setKindAnnotation(String strId, String strValue,
boolean blnApplyToAll, boolean blnSetAsDefault) throws Exception
{
throw new UnsupportedOperationException("Dev coding error");
/*
if (blnSetAsDefault)
GfrWrpRndDftWwdEarthShpDimOnePointPlc.getInstance().setKindAnnotation(strValue);
if (blnApplyToAll)
{
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIds();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setKindAnnotation(strs, strValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdEarthShp.ANNOTATION, strValue);
super.notifyObservers(objEvt);
}
}
else
{
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setKindAnnotation(strId, strValue);
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strId, EnuEvtDspRndWwdEarthShp.ANNOTATION, strValue);
super.notifyObservers(objEvt);
}
*/
}
//@Override
public void setKindColorPushpinDefault(String strValue, boolean blnApplyToAll) throws Exception
{
GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().setKindColorPushpin(strValue);
if (! blnApplyToAll)
return;
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIdsTlo();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setKindColorPushpin(strs, strValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdEarthShpDimOnePoint.COLOR_PUSHPIN, strValue);
super.notifyObservers(objEvt);
}
}
public void setKindColorPushpin(String strId, String strValue,
boolean blnApplyToAll, boolean blnSetAsDefault) throws Exception
{
if (blnSetAsDefault)
GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().setKindColorPushpin(strValue);
if (blnApplyToAll)
{
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIdsTlo();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setKindColorPushpin(strs, strValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdEarthShpDimOnePoint.COLOR_PUSHPIN, strValue);
super.notifyObservers(objEvt);
}
}
else
{
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setKindColorPushpin(strId, strValue);
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strId, EnuEvtDspRndWwdEarthShpDimOnePoint.COLOR_PUSHPIN, strValue);
super.notifyObservers(objEvt);
}
}
public void setVisibleLabel(String strId, boolean blnValue,
boolean blnApplyToAll, boolean blnSetAsDefault) throws Exception
{
if (blnSetAsDefault)
GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().setVisibleLabel(blnValue);
Boolean boo = Boolean.valueOf(blnValue);
if (blnApplyToAll)
{
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIdsTlo();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setVisibleLabel(strs, blnValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdEarthShpDimOnePushpin.VISIBLE_DISPLAY_PUSHPIN, boo);
super.notifyObservers(objEvt);
}
}
else
{
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setVisibleLabel(strId, blnValue);
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strId, EnuEvtDspRndWwdEarthShpDimOnePushpin.VISIBLE_DISPLAY_PUSHPIN, boo);
super.notifyObservers(objEvt);
}
}
@Override
public void setTooltip(String strId, boolean blnValue,
boolean blnApplyToAll, boolean blnSetAsDefault) throws Exception
{
if (blnSetAsDefault)
GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().setTooltip(blnValue);
Boolean boo = Boolean.valueOf(blnValue);
if (blnApplyToAll)
{
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIdsTlo();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setTooltip(strs, blnValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdEarthShp.TOOLTIP, boo);
super.notifyObservers(objEvt);
}
}
else
{
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setTooltip(strId, blnValue);
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strId, EnuEvtDspRndWwdEarthShp.TOOLTIP, boo);
super.notifyObservers(objEvt);
}
}
@Override
public void setColorDefault(Color colValue, boolean blnApplyToAll) throws Exception
{
throw new UnsupportedOperationException("Dev coding error");
/*
GfrWrpRndDftWwdEarthShpDimOnePointPlc.getInstance().setColor(colValue);
if (! blnApplyToAll)
return;
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIds();
if (colValue != null)
{
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setColor(strs, colValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdDimOne.COLOR, colValue);
super.notifyObservers(objEvt);
}
return;
}
// random color
for (int i=0; i<strs.length; i++)
{
Color colCur = GfrColorFactory.s_getRandom();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setColor(strs[i], colCur);
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdDimOne.COLOR, colCur);
super.notifyObservers(objEvt);
}
*/
}
@Override
public void setTransparencyDefault(float fltValue, boolean blnApplyToAll) throws Exception
{
throw new UnsupportedOperationException("Dev coding error");
/*GfrWrpRndDftWwdEarthShpDimOnePointPlc.getInstance().setTransparency(fltValue);
if (! blnApplyToAll)
return;
Float flo = new Float(fltValue);
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIds();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setTransparency(strs, fltValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdDimOne.TRANSPARENCY, flo);
super.notifyObservers(objEvt);
}
*/
}
@Override
public void setKindAnnotationDefault(String strValue, boolean blnApplyToAll) throws Exception
{
throw new UnsupportedOperationException("Dev coding error");
/*
GfrWrpRndDftWwdEarthShpDimOnePointPlc.getInstance().setKindAnnotation(strValue);
if (! blnApplyToAll)
return;
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIds();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePoint.getInstance().setKindAnnotation(strs, strValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new EvtMdlDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdEarthShp.ANNOTATION, strValue);
super.notifyObservers(objEvt);
}
*/
}
public void setVisibleLabelDefault(boolean blnValue, boolean blnApplyToAll) throws Exception
{
GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().setVisibleLabel(blnValue);
if (! blnApplyToAll)
return;
Boolean boo = Boolean.valueOf(blnValue);
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIdsTlo();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setVisibleLabel(strs, blnValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdEarthShpDimOnePushpin.VISIBLE_DISPLAY_PUSHPIN, boo);
super.notifyObservers(objEvt);
}
}
@Override
public void setTooltipDefault(boolean blnValue, boolean blnApplyToAll) throws Exception
{
GfrWrpRndDftWwdEarthShpDimOnePushpinPlc.getInstance().setTooltip(blnValue);
if (! blnApplyToAll)
return;
Boolean boo = Boolean.valueOf(blnValue);
String[] strs = GfrWrpBasTopSynEclPlcs.getInstance().getIdsTlo();
GfrWrpBasPrsDspPrjRndWwdEarthShpDimOnePushpin.getInstance().setTooltip(strs, blnValue);
for (int i=0; i<strs.length; i++)
{
super.setChanged();
Object objEvt = new GfrEvtMdlIdDspRndWwdEarthShpDimOnePoint(strs[i], EnuEvtDspRndWwdEarthShp.TOOLTIP, boo);
super.notifyObservers(objEvt);
}
}
// beg private
private GfrMdlDspRndWwdEarthShpDimOnePointEclPlc()
{
super();
}
}