103 |
103 |
import org.apache.commons.cli.ParseException;
|
104 |
104 |
import org.apache.commons.cli.PosixParser;
|
105 |
105 |
import org.apache.commons.io.FileUtils;
|
106 |
|
import org.apache.commons.io.FilenameUtils;
|
107 |
106 |
import org.apache.log4j.AppenderSkeleton;
|
108 |
107 |
import org.apache.log4j.PatternLayout;
|
109 |
108 |
import org.apache.log4j.PropertyConfigurator;
|
... | ... | |
111 |
110 |
import org.apache.log4j.spi.LoggingEvent;
|
112 |
111 |
import org.exolab.castor.xml.MarshalException;
|
113 |
112 |
import org.exolab.castor.xml.ValidationException;
|
|
113 |
import org.slf4j.Logger;
|
|
114 |
import org.slf4j.LoggerFactory;
|
|
115 |
|
114 |
116 |
import org.gvsig.andami.actioninfo.ActionInfo;
|
115 |
117 |
import org.gvsig.andami.actioninfo.ActionInfoManager;
|
116 |
118 |
import org.gvsig.andami.authentication.IAuthentication;
|
... | ... | |
147 |
149 |
import org.gvsig.andami.ui.ToolsWindowManager;
|
148 |
150 |
import org.gvsig.andami.ui.fonts.FontUtils;
|
149 |
151 |
import org.gvsig.andami.ui.mdiFrame.MDIFrame;
|
|
152 |
import org.gvsig.andami.ui.mdiFrame.MainFrame;
|
150 |
153 |
import org.gvsig.andami.ui.mdiManager.MDIManagerFactory;
|
151 |
154 |
import org.gvsig.andami.ui.splash.MultiSplashWindow;
|
152 |
155 |
import org.gvsig.andami.ui.theme.Theme;
|
... | ... | |
154 |
157 |
import org.gvsig.installer.lib.api.InstallerLocator;
|
155 |
158 |
import org.gvsig.installer.lib.api.InstallerManager;
|
156 |
159 |
import org.gvsig.installer.lib.api.PackageInfo;
|
157 |
|
import org.gvsig.installer.lib.api.Version;
|
158 |
160 |
import org.gvsig.installer.swing.api.SwingInstallerLocator;
|
159 |
161 |
import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
|
160 |
162 |
import org.gvsig.installer.swing.api.wizard.InstallerWizardActionListener;
|
161 |
163 |
import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel;
|
162 |
|
import org.gvsig.tools.exception.BaseException;
|
163 |
164 |
import org.gvsig.tools.exception.ListBaseException;
|
164 |
165 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
|
165 |
166 |
import org.gvsig.tools.swing.api.ToolsSwingLocator;
|
... | ... | |
171 |
172 |
import org.gvsig.utils.XMLEntity;
|
172 |
173 |
import org.gvsig.utils.xml.XMLEncodingUtils;
|
173 |
174 |
import org.gvsig.utils.xmlEntity.generate.XmlTag;
|
174 |
|
import org.slf4j.Logger;
|
175 |
|
import org.slf4j.LoggerFactory;
|
176 |
175 |
|
177 |
176 |
/**
|
178 |
177 |
* <p>
|
... | ... | |
901 |
900 |
if (xml == null) {
|
902 |
901 |
xml = new XMLEntity();
|
903 |
902 |
}
|
904 |
|
// restore frame size
|
905 |
|
Dimension sz = new Dimension(700, 580);
|
906 |
|
if (xml.contains("MDIFrameSize")) {
|
907 |
|
int[] wh = xml.getIntArrayProperty("MDIFrameSize");
|
908 |
|
sz = new Dimension(wh[0], wh[1]);
|
909 |
|
}
|
910 |
|
frame.setSize(sz);
|
911 |
|
// restore frame location
|
912 |
|
Point pos = new Point(10, 10);
|
913 |
|
if (xml.contains("MDIFramePos")) {
|
914 |
|
int[] xy = xml.getIntArrayProperty("MDIFramePos");
|
915 |
|
pos = new Point(xy[0], xy[1]);
|
916 |
|
}
|
917 |
|
frame.setLocation(pos);
|
918 |
|
|
919 |
|
// restore frame status (Maximized, minimized, etc);
|
920 |
|
int state = java.awt.Frame.MAXIMIZED_BOTH;
|
921 |
|
if (xml.contains("MDIFrameState")) {
|
922 |
|
state = xml.getIntProperty("MDIFrameState");
|
923 |
|
}
|
924 |
|
frame.setExtendedState(state);
|
|
903 |
// ====================================
|
|
904 |
// restore frame size
|
|
905 |
Dimension sz = new Dimension(
|
|
906 |
MainFrame.MAIN_FRAME_SIZE_DEFAULT[0],
|
|
907 |
MainFrame.MAIN_FRAME_SIZE_DEFAULT[1]);
|
|
908 |
if (xml.contains(MainFrame.MAIN_FRAME_SIZE)) {
|
|
909 |
int[] wh = xml.getIntArrayProperty(MainFrame.MAIN_FRAME_SIZE);
|
|
910 |
sz = new Dimension(wh[0], wh[1]);
|
|
911 |
}
|
|
912 |
frame.setSize(sz);
|
|
913 |
// ==========================================
|
|
914 |
// restore frame location
|
|
915 |
Point pos = new Point(
|
|
916 |
MainFrame.MAIN_FRAME_POS_DEFAULT[0],
|
|
917 |
MainFrame.MAIN_FRAME_POS_DEFAULT[1]);
|
|
918 |
if (xml.contains(MainFrame.MAIN_FRAME_POS)) {
|
|
919 |
int[] xy = xml.getIntArrayProperty(MainFrame.MAIN_FRAME_POS);
|
|
920 |
pos = new Point(xy[0], xy[1]);
|
|
921 |
}
|
|
922 |
frame.setLocation(pos);
|
|
923 |
// =============================================
|
|
924 |
// restore frame state (Maximized, minimized, etc);
|
|
925 |
int state = MainFrame.MAIN_FRAME_EXT_STATE_DEFAULT;
|
|
926 |
if (xml.contains(MainFrame.MAIN_FRAME_EXT_STATE)) {
|
|
927 |
state = xml.getIntProperty(MainFrame.MAIN_FRAME_EXT_STATE);
|
|
928 |
}
|
|
929 |
frame.setExtendedState(state);
|
925 |
930 |
}
|
926 |
931 |
|
927 |
932 |
private XMLEntity saveMDIStatus() {
|
... | ... | |
930 |
935 |
int[] wh = new int[2];
|
931 |
936 |
wh[0] = frame.getWidth();
|
932 |
937 |
wh[1] = frame.getHeight();
|
933 |
|
xml.putProperty("MDIFrameSize", wh);
|
|
938 |
xml.putProperty(MainFrame.MAIN_FRAME_SIZE, wh);
|
934 |
939 |
// save frame location
|
935 |
940 |
int[] xy = new int[2];
|
936 |
941 |
xy[0] = frame.getX();
|
937 |
942 |
xy[1] = frame.getY();
|
938 |
|
xml.putProperty("MDIFramePos", xy);
|
|
943 |
xml.putProperty(MainFrame.MAIN_FRAME_POS, xy);
|
939 |
944 |
// save frame status
|
940 |
|
xml.putProperty("MDIFrameState", frame.getExtendedState());
|
|
945 |
xml.putProperty(MainFrame.MAIN_FRAME_EXT_STATE,
|
|
946 |
frame.getExtendedState());
|
941 |
947 |
return xml;
|
942 |
948 |
}
|
943 |
949 |
|