{
// beg display
if (objEvt instanceof GfrEvtMdlIdDspRndWwdEarthShpDimTwo)
{
GfrEvtMdlIdDspRndWwdEarthShpDimTwo evt = (GfrEvtMdlIdDspRndWwdEarthShpDimTwo) objEvt;
String strId = evt.getId();
if (strId.compareTo(this._strId_) != 0)
return;
Object objWhat = evt.getWhat();
if (objWhat == EnuEvtDspRndWwdEarthShp.TOOLTIP)
{
Boolean boo = (Boolean) evt.getValue();
super.setValue(GfrKeysRnd.STR_HAS_TOOLTIP, boo.booleanValue());
// memo: no need to send event to redraw!
return;
}
if (objWhat == EnuEvtDspRndWwdEarthDimTwo.COLOR_IN) // what about transparency?
{
Color col = (Color) evt.getValue();
BasicShapeAttributes bsa = (BasicShapeAttributes) super.getAttributes();
bsa.setInteriorMaterial(new Material(col));
this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
return;
}
if (objWhat == EnuEvtDspRndWwdEarthDimTwo.TRANSPARENCY_IN)
{
Float flo = (Float) evt.getValue();
float fltAlpha = flo.floatValue();
BasicShapeAttributes bsa = (BasicShapeAttributes) super.getAttributes();
bsa.setInteriorOpacity((double) fltAlpha);
this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
return;
}
if (objWhat == EnuEvtDspRndWwdEarthDimTwo.COLOR_OUT) // what about transparency?
{
Color col = (Color) evt.getValue();
BasicShapeAttributes bsa = (BasicShapeAttributes) super.getAttributes();
bsa.setOutlineMaterial(new Material(col));
this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
return;
}
if (objWhat == EnuEvtDspRndWwdEarthDimTwo.TRANSPARENCY_OUT)
{
Float flo = (Float) evt.getValue();
float fltAlpha = flo.floatValue();
BasicShapeAttributes bsa = (BasicShapeAttributes) super.getAttributes();
bsa.setOutlineOpacity((double) fltAlpha);
this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
return;
}
return;
}
// end display
// beg data
GfrEvtMdlIdAbs objId = (GfrEvtMdlIdAbs) objEvt;
String strIdEvt = objId.getId();
if (strIdEvt.compareTo(this._strId_) != 0)
return;
if (objId instanceof GfrEvtMdlIdDatChangedGeometry)
{
/*
* memo:
* altPoint2d:
* . Point2D.Double[0].x ==> latMin
* . Point2D.Double[0].y ==> lonMin
*
* . Point2D.Double[1].x ==> latMax
* . Point2D.Double[1].y ==> lonMax
*/
GfrEvtMdlIdDatChangedGeometry evt = (GfrEvtMdlIdDatChangedGeometry) objEvt;
List<Point2D.Double> lstP2d = (List<Point2D.Double>) evt.getGeometry();
Point2D.Double p2dMin = lstP2d.get(0);
Point2D.Double p2dMax = lstP2d.get(1);
Position posMin = Position.fromDegrees(p2dMin.y, p2dMin.x);
Position posMax = Position.fromDegrees(p2dMax.y, p2dMax.x);