Revision 4915 trunk/extensions/extWMS/src/com/iver/cit/gvsig/gui/panels/WebMapContextSettingsPanel.java
WebMapContextSettingsPanel.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.2 2006-04-20 17:11:54 jaume |
|
46 |
* Revision 1.3 2006-04-21 10:27:32 jaume |
|
47 |
* exporting now supported |
|
48 |
* |
|
49 |
* Revision 1.2 2006/04/20 17:11:54 jaume |
|
47 | 50 |
* Attempting to export |
48 | 51 |
* |
49 | 52 |
* Revision 1.1 2006/04/19 07:57:29 jaume |
... | ... | |
956 | 959 |
if (advanced) { |
957 | 960 |
if (getRdBtnUseViewSize().isSelected()) { |
958 | 961 |
// View's size |
959 |
Dimension sz = new Dimension(mc.getViewPort().getImageSize()); |
|
962 |
Dimension sz = null; |
|
963 |
if (mc.getViewPort().getImageSize()!=null) |
|
964 |
sz = new Dimension(mc.getViewPort().getImageSize()); |
|
960 | 965 |
if (sz == null || (int) sz.getHeight()==0 || (int) sz.getWidth()==0) |
961 | 966 |
// View's size is not initialized, will use default size. |
962 | 967 |
sz = new Dimension(defaultWidth, defaultHeight); |
... | ... | |
1004 | 1009 |
// Keyword list |
1005 | 1010 |
str = getTxtKeyWords().getText(); |
1006 | 1011 |
if (str!=null && !str.equals("")) { |
1007 |
String[] ss = str.split("[, ;:]");
|
|
1012 |
String[] ss = str.split("[, ;:]+"); // sequence of spaces, commas, colons or semicolons will be treated as word separator
|
|
1008 | 1013 |
for (int i = 0; i < ss.length; i++) { |
1009 | 1014 |
if (wmc.keywordList==null) wmc.keywordList = new ArrayList(); |
1010 | 1015 |
wmc.keywordList.add(ss[i]); |
... | ... | |
1027 | 1032 |
|
1028 | 1033 |
// Contact Person |
1029 | 1034 |
str = getTxtContactPerson().getText(); |
1030 |
if (str!=null && !str.equals("")) |
|
1035 |
if (str!=null && !str.equals("")) {
|
|
1031 | 1036 |
wmc.contactPerson = str; |
1037 |
wmc.contactInfo = true; |
|
1038 |
} |
|
1032 | 1039 |
|
1033 | 1040 |
// Contact Organization |
1034 | 1041 |
str = getTxtOrganization().getText(); |
1035 |
if (str!=null && !str.equals("")) |
|
1042 |
if (str!=null && !str.equals("")) {
|
|
1036 | 1043 |
wmc.contactOrganization = str; |
1044 |
wmc.contactInfo = true; |
|
1045 |
} |
|
1037 | 1046 |
|
1038 | 1047 |
// Contact Position |
1039 | 1048 |
str = getTxtContactPosition().getText(); |
1040 |
if (str!=null && !str.equals("")) |
|
1049 |
if (str!=null && !str.equals("")) {
|
|
1041 | 1050 |
wmc.contactPosition = str; |
1051 |
wmc.contactInfo = true; |
|
1052 |
} |
|
1042 | 1053 |
|
1043 | 1054 |
// Address |
1044 | 1055 |
str = getTxtAddress().getText(); |
1045 |
if (str!=null && !str.equals("")) |
|
1056 |
if (str!=null && !str.equals("")) {
|
|
1046 | 1057 |
wmc.address = str; |
1047 |
|
|
1058 |
wmc.contactInfo = true; |
|
1059 |
} |
|
1060 |
|
|
1048 | 1061 |
// City |
1049 | 1062 |
str = getTxtCity().getText(); |
1050 |
if (str!=null && !str.equals("")) |
|
1063 |
if (str!=null && !str.equals("")) {
|
|
1051 | 1064 |
wmc.city = str; |
1052 |
|
|
1065 |
wmc.contactInfo = true; |
|
1066 |
} |
|
1067 |
|
|
1053 | 1068 |
// State/Province |
1054 | 1069 |
str = getTxtStateOrProvince().getText(); |
1055 |
if (str!=null && !str.equals("")) |
|
1070 |
if (str!=null && !str.equals("")) {
|
|
1056 | 1071 |
wmc.stateOrProvince = str; |
1072 |
wmc.contactInfo = true; |
|
1073 |
} |
|
1057 | 1074 |
|
1058 | 1075 |
// Postcode |
1059 | 1076 |
str = getTxtPostCode().getText(); |
1060 |
if (str!=null && !str.equals("")) |
|
1077 |
if (str!=null && !str.equals("")) {
|
|
1061 | 1078 |
wmc.postCode = str; |
1079 |
wmc.contactInfo = true; |
|
1080 |
} |
|
1062 | 1081 |
|
1063 | 1082 |
// Country |
1064 | 1083 |
str = (String) getCmbCountries().getSelectedItem(); |
1065 |
if (str!=null && !str.equals("")) |
|
1084 |
if (str!=null && !str.equals("")) {
|
|
1066 | 1085 |
wmc.country = str; |
1086 |
wmc.contactInfo = true; |
|
1087 |
} |
|
1067 | 1088 |
|
1068 | 1089 |
// Telephone |
1069 | 1090 |
str = getTxtTelephone().getText(); |
1070 |
if (str!=null && !str.equals("")) |
|
1091 |
if (str!=null && !str.equals("")) {
|
|
1071 | 1092 |
wmc.telephone = str; |
1093 |
wmc.contactInfo = true; |
|
1094 |
} |
|
1072 | 1095 |
|
1073 | 1096 |
// Fax |
1074 | 1097 |
str = getTxtFax().getText(); |
1075 |
if (str!=null && !str.equals("")) |
|
1098 |
if (str!=null && !str.equals("")) {
|
|
1076 | 1099 |
wmc.fax = str; |
1100 |
wmc.contactInfo = true; |
|
1101 |
} |
|
1077 | 1102 |
|
1078 | 1103 |
|
1079 | 1104 |
str = getTxtEMail().getText(); |
1080 |
if (str!=null && !str.equals("")) |
|
1105 |
if (str!=null && !str.equals("")) {
|
|
1081 | 1106 |
wmc.email = str; |
1107 |
wmc.contactInfo = true; |
|
1108 |
} |
|
1082 | 1109 |
|
1083 | 1110 |
ExportWebMapContextExtension exp = (ExportWebMapContextExtension) |
1084 |
PluginServices.
|
|
1085 |
getExtension(ExportWebMapContextExtension.class);
|
|
1111 |
PluginServices. |
|
1112 |
getExtension(ExportWebMapContextExtension.class); |
|
1086 | 1113 |
exp.execute("DO_EXPORT"); |
1087 | 1114 |
PluginServices.getMDIManager().closeView(this); |
1088 | 1115 |
} else if ("CANCEL".equals(actionCommand)) { |
Also available in: Unified diff