/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.geoforge.appogcecl.actionperformer;
import org.geoforge.guillc.dialog.GfrDlgTabsSettingsDspActionAllObjImg;
import java.awt.event.ActionEvent;
import java.util.logging.Logger;
import javax.swing.JFrame;
import org.geoforge.guillc.dialog.DlgAbs;
import org.geoforge.guillc.enumeration.GfrEnuValuesKindTargetWindow;
import org.geoforge.guillc.frame.GfrFrmAbs;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrIdAbs;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrIdSetLloVar;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrIdSetTlo;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrSetTop;
import org.geoforge.guillcogcecl.dialog.*;
import org.geoforge.guillcogcecl.enumeration.GfrEnuValuesKindObjectLloVarSpcPrjOgcEcl;
import org.geoforge.guillcogcecl.enumeration.GfrEnuValuesKindObjectTloSpcPrjOgcEcl;
import org.geoforge.lang.enumeration.GfrEnuApplicationPropertiesImmutableKeys;
import org.geoforge.java.util.logging.filehandler.FileHandlerLogger;
import org.geoforge.wrpbasprssynecl.*;
/**
*
* @author robert
*/
abstract public class ActPrfPrjSettingsOgcEclAbs extends ActPrfPrjSettingsOgcAbs
{
// ----
// begin: instantiate logger for this class
final private static Logger _LOGGER_ = Logger.getLogger(ActPrfPrjSettingsOgcEclAbs.class.getName());
static
{
ActPrfPrjSettingsOgcEclAbs._LOGGER_.addHandler(FileHandlerLogger.s_getInstance());
}
// end: instantiate logger for this class
// ----
@Override
public boolean doneJob(ActionEvent evt) throws Exception
{
if (super.doneJob(evt))
return true;
// ---
if (evt.getSource() instanceof GfrMimTrsAlrIdSetTlo)
{
GfrMimTrsAlrIdAbs mim = (GfrMimTrsAlrIdAbs) evt.getSource();
JFrame frmOwner = GfrFrmAbs.s_getFrameOwnerTrickForActionController(mim);
String strId = mim.getId();
String strValueKindObject = mim.getPropertyImmutable(
GfrEnuApplicationPropertiesImmutableKeys.KEY_KIND_OBJECT.name());
//-- unused for now coz only wwd earth views =>
String strValueKindTargetWindow = mim.getPropertyImmutable(
GfrEnuApplicationPropertiesImmutableKeys.KEY_KIND_TARGET_WINDOW.name());
//--
if (strValueKindObject == null || strValueKindObject.length() < 1)
return false;
//--
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_SCT.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_SELECT.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdObjEarthSct(
frmOwner, strId);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_ARE.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_SELECT.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdObjEarthAre(
frmOwner, strId);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_PTH.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_SELECT.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdObjEarthPth(
frmOwner, strId);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_PLC.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_SELECT.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdObjEarthPlc(
frmOwner, strId);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_PNT.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_SELECT.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdObjEarthPnt(
frmOwner, strId);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_SPN.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_SELECT.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdObjEarthSpn(
frmOwner, strId);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_SEG_WISE_YES.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_SELECT.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdObjEarthSegWiseYes(
frmOwner, strId);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
}
if (evt.getSource() instanceof GfrMimTrsAlrSetTop)
{
GfrMimTrsAlrSetTop mim = (GfrMimTrsAlrSetTop) evt.getSource();
JFrame frmOwner = GfrFrmAbs.s_getFrameOwnerTrickForActionController(mim);
String strValueKindObject = mim.getPropertyImmutable(
GfrEnuApplicationPropertiesImmutableKeys.KEY_KIND_OBJECT.name());
//-- unused for now coz only wwd earth views , even in run (no jfc in run)
String strValueKindTargetWindow = mim.getPropertyImmutable(
GfrEnuApplicationPropertiesImmutableKeys.KEY_KIND_TARGET_WINDOW.name());
//--
if (strValueKindObject == null || strValueKindObject.length() < 1)
return false;
// ---
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_SEG_WISE_YES.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdTopEarthSegsWiseYes(
frmOwner);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_SPN.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdTopEarthSpns(
frmOwner);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_PTH.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdTopEarthPths(
frmOwner);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_PLC.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdTopEarthPlcs(
frmOwner);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_PNT.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdTopEarthPnts(
frmOwner);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_ARE.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdTopEarthAres(
frmOwner);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectTloSpcPrjOgcEcl.VALUE_TLO_ECL_SCT.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionWwdTopEarthScts(
frmOwner);
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (evt.getSource() instanceof GfrMimTrsAlrIdSetLloVar)
{
GfrMimTrsAlrIdSetLloVar mim = (GfrMimTrsAlrIdSetLloVar) evt.getSource();
JFrame frmOwner = GfrFrmAbs.s_getFrameOwnerTrickForActionController(mim);
String strId = mim.getId();
String strValueKindObject = mim.getPropertyImmutable(
GfrEnuApplicationPropertiesImmutableKeys.KEY_KIND_OBJECT.name());
//-- unused for now coz only wwd earth views =>
String strValueKindTargetWindow = mim.getPropertyImmutable(
GfrEnuApplicationPropertiesImmutableKeys.KEY_KIND_TARGET_WINDOW.name());
//--
if (strValueKindObject == null || strValueKindObject.length() < 1)
return false;
//--
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectLloVarSpcPrjOgcEcl.VALUE_LLO_IMAGE_ECL_SPN.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionAllObjImg(
frmOwner,
GfrWrpBasSynObjNameTloEclSpn.getInstance().getPathAbsoluteImageFile(strId),
"Pointset image");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectLloVarSpcPrjOgcEcl.VALUE_LLO_IMAGE_ECL_SEG_WISE_YES.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionAllObjImg(
frmOwner,
GfrWrpBasSynObjNameTloEclSegWiseYes.getInstance().getPathAbsoluteImageFile(strId),
"Pointset image");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectLloVarSpcPrjOgcEcl.VALUE_LLO_IMAGE_ECL_SCT.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionAllObjImg(
frmOwner,
GfrWrpBasSynObjNameTloEclSct.getInstance().getPathAbsoluteImageFile(strId),
"Sector image");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectLloVarSpcPrjOgcEcl.VALUE_LLO_IMAGE_ECL_PLC.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionAllObjImg(
frmOwner,
GfrWrpBasSynObjNameTloEclPlc.getInstance().getPathAbsoluteImageFile(strId),
"Placemark image");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectLloVarSpcPrjOgcEcl.VALUE_LLO_IMAGE_ECL_PNT.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionAllObjImg(
frmOwner,
GfrWrpBasSynObjNameTloEclPnt.getInstance().getPathAbsoluteImageFile(strId),
"Point image");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectLloVarSpcPrjOgcEcl.VALUE_LLO_IMAGE_ECL_ARE.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionAllObjImg(
frmOwner,
GfrWrpBasSynObjNameTloEclAre.getInstance().getPathAbsoluteImageFile(strId),
"Area image");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
if (strValueKindObject.compareTo(
GfrEnuValuesKindObjectLloVarSpcPrjOgcEcl.VALUE_LLO_IMAGE_ECL_PTH.name()) == 0)
{
if (strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_MANAGE.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.PERSPECTIVE_RUN.name()) == 0
|| strValueKindTargetWindow.compareTo(
GfrEnuValuesKindTargetWindow.VIEWER_TOP_WORLDWIND.name()) == 0)
{
DlgAbs dlg = new GfrDlgTabsSettingsDspActionAllObjImg(
frmOwner,
GfrWrpBasSynObjNameTloEclPth.getInstance().getPathAbsoluteImageFile(strId),
"Path image");
if (!dlg.init())
{
String str = "! dlg.init()";
ActPrfPrjSettingsOgcEclAbs._LOGGER_.severe(str);
throw new Exception(str);
}
dlg.setVisible(true);
return true;
}
}
}
return false;
}
// ---
protected ActPrfPrjSettingsOgcEclAbs()
{
super();
}
}