/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.geoforge.guillcogcecl.panel;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import javax.swing.Box;
import javax.swing.event.DocumentListener;
import org.geoforge.guillc.panel.PnlSelEditTfdMultipleLocationDegrees;
import org.geoforge.guillc.panel.PnlSettingsNewTloUrlAbs;
/**
*
* @author bantchao@gmail.com
*/
abstract public class PnlSettingsNewTloUrlEclSctAbs extends PnlSettingsNewTloUrlAbs
{
protected PnlSelEditTfdMultipleLocationDegrees _pnlLatLonMin = null;
protected PnlSelEditTfdMultipleLocationDegrees _pnlLatLonMax = null;
public ArrayList<Point2D.Double> getGeometry() throws Exception
{
ArrayList<Point2D.Double> altPoint2d = new ArrayList<Point2D.Double>();
altPoint2d.add(this._pnlLatLonMin.getValue());
altPoint2d.add(this._pnlLatLonMax.getValue());
return altPoint2d;
}
protected PnlSettingsNewTloUrlEclSctAbs(DocumentListener lstDocument)
{
super(lstDocument);
this._pnlLatLonMin = new PnlSelEditTfdMultipleLocationDegrees(lstDocument,
"SW Location (LatLon in degrees)");
this._pnlLatLonMax = new PnlSelEditTfdMultipleLocationDegrees(lstDocument,
"NE Location (LatLon in degrees)");
}
@Override
public void destroy()
{
super.destroy();
if (this._pnlLatLonMin != null)
{
this._pnlLatLonMin.destroy();
this._pnlLatLonMin = null;
}
if (this._pnlLatLonMax != null)
{
this._pnlLatLonMax.destroy();
this._pnlLatLonMax = null;
}
}
@Override
public boolean init()
{
if (! super.init())
return false;
if (! this._pnlLatLonMin.init())
return false;
if (! this._pnlLatLonMax.init())
return false;
super.add(_pnlLatLonMin);
super.add(Box.createVerticalStrut(10));
super.add(_pnlLatLonMax);
super.add(Box.createVerticalStrut(10));
return true;
}
}