/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.geoforge.appogceclgsi.actionperformer;
import gov.nasa.worldwind.geom.LatLon;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.logging.Logger;
import javax.swing.JFrame;
import org.geoforge.appogcecl.actionperformer.ActPrfPrjConstructOgcEclAbs;
import org.geoforge.appogceclgsi.dummylocation.GfrGetterListDefaultWmssGsi;
import org.geoforge.guillcogcecl.dialog.GfrDlgCmdCancelBldObjWwdEarthAbs;
import org.geoforge.guillcogcecl.frame.GfrFrmMainAppOgcEclAbs;
import org.geoforge.guillcogcecl.util.GfrResBundleGuiLlcOgcEcl;
import org.geoforge.guillcogceclgsi.dialog.*;
import org.geoforge.io.serial.GfrSerializeStateWwdMan;
import org.geoforge.io.serial.GfrSerializeStateWwdSel;
import org.geoforge.lang.util.GfrResBundleLang;
import org.geoforge.java.util.logging.filehandler.FileHandlerLogger;
/**
*
* @author robert
*/
public class ActPrfPrjConstructOgcEclGsi extends ActPrfPrjConstructOgcEclAbs
{
// ----
// begin: instantiate logger for this class
final private static Logger _LOGGER_ = Logger.getLogger(ActPrfPrjConstructOgcEclGsi.class.getName());
static
{
ActPrfPrjConstructOgcEclGsi._LOGGER_.addHandler(FileHandlerLogger.s_getInstance());
}
// end: instantiate logger for this class
// ----
static private ActPrfPrjConstructOgcEclGsi _INSTANCE_ = null;
static public ActPrfPrjConstructOgcEclGsi getInstance()
{
if (ActPrfPrjConstructOgcEclGsi._INSTANCE_ == null)
ActPrfPrjConstructOgcEclGsi._INSTANCE_ = new ActPrfPrjConstructOgcEclGsi();
return ActPrfPrjConstructOgcEclGsi._INSTANCE_;
}
// ---
@Override
public boolean doneJob(ActionEvent evt) throws Exception
{
if (super.doneJob(evt))
return true;
return false;
}
// ---
@Override
protected void _newMousePickedTloPthEclSec(String strIdViewerSource) throws Exception
{
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpLinOpnSecGsi(
GfrResBundleGuiLlcOgcEcl.s_getInstance().getValue("sentence.newPathByPicking"),
GfrResBundleLang.s_getInstance().getValue("word.path"),
strIdViewerSource);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelled = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelled)
{
alt = (ArrayList<LatLon>) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelled)
return;
super._newMousePickedTloPthStepTwo(
null, // (coz of tbrl serialzing) frmOwner,
alt);
}
@Override
protected void _newMousePickedTloSegWiseYesEclSec(String strIdViewerSource) throws Exception
{
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpSegWiseYesSecGsi(
GfrResBundleGuiLlcOgcEcl.s_getInstance().getValue("sentence.newWiseSegmentByPicking"),
GfrResBundleLang.s_getInstance().getValue("sentence.wiseSegment"),
strIdViewerSource);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelled = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelled)
{
alt = (ArrayList<LatLon>) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelled)
return;
super._newMousePickedTloSegWiseYesStepTwo(
null, // (coz of tbrl serialzing) frmOwner,
alt);
}
@Override
protected void _newMouseDraggedTloSctEclSec(String strIdViewerSource) throws Exception
{
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthDrgShpSctSecGsi(
strIdViewerSource);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelled = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelled)
{
alt = (ArrayList<LatLon>) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelled)
return;
super._newMouseDraggedTloSctStepTwo(
null, // (coz of tbrl serialzing) frmOwner,
alt);
}
@Override
protected void _newMousePickedTloAreEclSec(String strIdViewerSource) throws Exception
{
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpLinClsGsi(
GfrResBundleGuiLlcOgcEcl.s_getInstance().getValue("sentence.newAreaByPicking"),
GfrResBundleLang.s_getInstance().getValue("word.area"),
strIdViewerSource);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelled = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelled)
{
alt = (ArrayList<LatLon>) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelled)
return;
super._newMousePickedTloAreStepTwo(
null, // (coz of tbrl serialzing) frmOwner,
alt);
}
@Override
protected void _newMousePickedTloPthEclMan(JFrame frmOwner) throws Exception
{
GfrFrmMainAppOgcEclAbs frm = (GfrFrmMainAppOgcEclAbs) frmOwner;
String strStateOrbitViewSource = frm.getRestorableStateOrbitViewManage();
if (strStateOrbitViewSource != null)
{
GfrSerializeStateWwdMan.s_write(strStateOrbitViewSource);
}
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpLinOpnManGsi(
GfrResBundleGuiLlcOgcEcl.s_getInstance().getValue("sentence.newPathByPicking"),
GfrResBundleLang.s_getInstance().getValue("word.path"));
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelledPicks)
alt = (ArrayList<LatLon>) dlg.getValue();
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloPthStepTwo(frmOwner, alt);
}
@Override
protected void _newMousePickedTloPthEclSel(JFrame frmOwner) throws Exception
{
GfrFrmMainAppOgcEclAbs frm = (GfrFrmMainAppOgcEclAbs) frmOwner;
String strStateOrbitViewSource = frm.getRestorableStateOrbitViewSelect();
if (strStateOrbitViewSource != null)
{
GfrSerializeStateWwdSel.s_write(strStateOrbitViewSource);
}
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpLinOpnSelGsi(
GfrResBundleGuiLlcOgcEcl.s_getInstance().getValue("sentence.newWiseSegmentByPicking"),
GfrResBundleLang.s_getInstance().getValue("sentence.wiseSegment"));
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelledPicks)
alt = (ArrayList<LatLon>) dlg.getValue();
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloPthStepTwo(frmOwner, alt);
}
@Override
protected void _newMousePickedTloSegWiseYesEclMan(JFrame frmOwner) throws Exception
{
GfrFrmMainAppOgcEclAbs frm = (GfrFrmMainAppOgcEclAbs) frmOwner;
String strStateOrbitViewSource = frm.getRestorableStateOrbitViewManage();
if (strStateOrbitViewSource != null)
{
GfrSerializeStateWwdMan.s_write(strStateOrbitViewSource);
}
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpSegWiseYesManGsi(
GfrResBundleGuiLlcOgcEcl.s_getInstance().getValue("sentence.newWiseSegmentByPicking"),
GfrResBundleLang.s_getInstance().getValue("sentence.wiseSegment"));
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelledPicks)
alt = (ArrayList<LatLon>) dlg.getValue();
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloSegWiseYesStepTwo(frmOwner, alt);
}
@Override
protected void _newMousePickedTloSegWiseYesEclSel(JFrame frmOwner) throws Exception
{
GfrFrmMainAppOgcEclAbs frm = (GfrFrmMainAppOgcEclAbs) frmOwner;
String strStateOrbitViewSource = frm.getRestorableStateOrbitViewSelect();
if (strStateOrbitViewSource != null)
{
GfrSerializeStateWwdSel.s_write(strStateOrbitViewSource);
}
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpSegWiseYesSelGsi(
GfrResBundleGuiLlcOgcEcl.s_getInstance().getValue("sentence.newWiseSegmentByPicking"),
GfrResBundleLang.s_getInstance().getValue("sentence.wiseSegment"));
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelledPicks)
alt = (ArrayList<LatLon>) dlg.getValue();
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloSegWiseYesStepTwo(frmOwner, alt);
}
@Override
protected void _newMousePickedTloAreEclMan(JFrame frmOwner) throws Exception
{
GfrFrmMainAppOgcEclAbs frm = (GfrFrmMainAppOgcEclAbs) frmOwner;
String strStateOrbitViewSource = frm.getRestorableStateOrbitViewManage();
if (strStateOrbitViewSource != null)
{
GfrSerializeStateWwdMan.s_write(strStateOrbitViewSource);
}
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpLinClsManGsi();
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelledPicks)
alt = (ArrayList<LatLon>) dlg.getValue();
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloAreStepTwo(frmOwner, alt);
}
@Override
protected void _newMouseDraggedTloSctEclMan(JFrame frmOwner) throws Exception
{
GfrFrmMainAppOgcEclAbs frm = (GfrFrmMainAppOgcEclAbs) frmOwner;
String strStateOrbitViewSource = frm.getRestorableStateOrbitViewManage();
if (strStateOrbitViewSource != null)
{
GfrSerializeStateWwdMan.s_write(strStateOrbitViewSource);
}
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthDrgShpSctManGsi();
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelledPicks)
alt = (ArrayList<LatLon>) dlg.getValue();
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMouseDraggedTloSctStepTwo(frmOwner, alt);
}
@Override
protected void _newMouseDraggedTloSctEclSel(JFrame frmOwner) throws Exception
{
GfrFrmMainAppOgcEclAbs frm = (GfrFrmMainAppOgcEclAbs) frmOwner;
String strStateOrbitViewSource = frm.getRestorableStateOrbitViewSelect();
if (strStateOrbitViewSource != null)
{
GfrSerializeStateWwdSel.s_write(strStateOrbitViewSource);
}
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthDrgShpSctSelGsi("New sector by mouse-dragging");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelledPicks)
alt = (ArrayList<LatLon>) dlg.getValue();
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMouseDraggedTloSctStepTwo(frmOwner, alt);
}
@Override
protected void _newMousePickedTloAreEclSel(JFrame frmOwner) throws Exception
{
GfrFrmMainAppOgcEclAbs frm = (GfrFrmMainAppOgcEclAbs) frmOwner;
String strStateOrbitViewSource = frm.getRestorableStateOrbitViewSelect();
if (strStateOrbitViewSource != null)
{
GfrSerializeStateWwdSel.s_write(strStateOrbitViewSource);
}
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikShpLinClsSelGsi();
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
ArrayList<LatLon> alt = null;
if (!blnCancelledPicks)
alt = (ArrayList<LatLon>) dlg.getValue();
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloAreStepTwo(frmOwner, alt);
}
// ---
private ActPrfPrjConstructOgcEclGsi()
{
super();
}
@Override
protected void _newMousePickedTloPntEclMan(JFrame frmOwner) throws Exception
{
super._newMousePickedTloPntEclMan(frmOwner);
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikPntCircleManGsi(
"New point",
"Point");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
LatLon lln = null;
if (!blnCancelledPicks)
{
lln = (LatLon) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloPntStepTwo(frmOwner, lln);
}
@Override
protected void _newMousePickedTloPlcEclMan(JFrame frmOwner) throws Exception
{
super._newMousePickedTloPlcEclMan(frmOwner);
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikPntPinManGsi(
"New placemark",
"Placemark");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
LatLon lln = null;
if (!blnCancelledPicks)
{
lln = (LatLon) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloPlcStepTwo(frmOwner, lln);
}
@Override
protected void _newMousePickedTloPntEclSel(JFrame frmOwner) throws Exception
{
super._newMousePickedTloPntEclMan(frmOwner);
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikPntCircleSelGsi(
"New point",
"Point");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
LatLon lln = null;
if (!blnCancelledPicks)
{
lln = (LatLon) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloPntStepTwo(frmOwner, lln);
}
@Override
protected void _newMousePickedTloPlcEclSel(JFrame frmOwner) throws Exception
{
super._newMousePickedTloPlcEclMan(frmOwner);
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikPntPinSelGsi(
"New placemark",
"Placemark");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
LatLon lln = null;
if (!blnCancelledPicks)
{
lln = (LatLon) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloPlcStepTwo(frmOwner, lln);
}
@Override
protected void _newMousePickedTloPntEclSec(String strIdViewerSource) throws Exception
{
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikPntCircleSecGsi(
"New point",
"Point",
strIdViewerSource);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
LatLon lln = null;
if (!blnCancelledPicks)
{
lln = (LatLon) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloPntStepTwo(
null, // coz serialized frmOwner
lln);
}
@Override
protected void _newMousePickedTloPlcEclSec(String strIdViewerSource) throws Exception
{
GfrDlgCmdCancelBldObjWwdEarthAbs dlg = new GfrDlgBldObjWwdEarthPikPntPinSecGsi(
"New placemark",
"Placemark",
strIdViewerSource);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjConstructOgcEclGsi._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
boolean blnCancelledPicks = dlg.isCancelled();
LatLon lln = null;
if (!blnCancelledPicks)
{
lln = (LatLon) dlg.getValue();
}
dlg.destroy();
dlg = null;
if (blnCancelledPicks)
return;
super._newMousePickedTloPlcStepTwo(
null, // coz serialized frmOwner
lln);
}
@Override
protected void _newEditTloOgcWms(JFrame frmOwner) throws Exception
{
super._newEditTloOgcWms(frmOwner, GfrGetterListDefaultWmssGsi.s_getInstance());
}
}