Revision 46176 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/visibility/LayerScaleVisibilityUtils.java
LayerScaleVisibilityUtils.java | ||
---|---|---|
26 | 26 |
import org.gvsig.tools.dynobject.DynObject; |
27 | 27 |
import org.gvsig.tools.i18n.I18nManager; |
28 | 28 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
29 |
import org.gvsig.tools.swing.api.reminder.DialogReminderManager; |
|
29 | 30 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
30 | 31 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
31 | 32 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
... | ... | |
58 | 59 |
} |
59 | 60 |
|
60 | 61 |
public static void checkForVisibilityScale(FLayer layer) throws DataException, ValidateDataParametersException { |
62 |
checkForVisibilityScale(layer, true); |
|
63 |
} |
|
61 | 64 |
|
65 |
public static void checkForVisibilityScale(FLayer layer, boolean checkScale) throws DataException, ValidateDataParametersException { |
|
66 |
|
|
62 | 67 |
if( layer.getMaxScale()>=0 && layer.getMinScale()>=0 ) { |
63 | 68 |
return; |
64 | 69 |
} |
... | ... | |
79 | 84 |
return; |
80 | 85 |
} |
81 | 86 |
} |
82 |
|
|
87 |
if( !checkScale ) { |
|
88 |
return; |
|
89 |
} |
|
90 |
DialogReminderManager dialogReminder = ToolsSwingLocator.getDialogReminderManager(); |
|
91 |
if( dialogReminder.exists("_Do_not_ask_the_scale_again") ) { |
|
92 |
return; |
|
93 |
} |
|
83 | 94 |
if (layer instanceof FLyrVect) { |
84 | 95 |
FLyrVect lyrVect = (FLyrVect) layer; |
85 | 96 |
FeatureStore store = lyrVect.getFeatureStore(); |
... | ... | |
105 | 116 |
} |
106 | 117 |
return; |
107 | 118 |
} |
119 |
DialogReminderManager dialogReminder = ToolsSwingLocator.getDialogReminderManager(); |
|
120 |
if( dialogReminder.exists("_Do_not_ask_the_scale_again") ) { |
|
121 |
return; |
|
122 |
} |
|
108 | 123 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
109 | 124 |
WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
110 | 125 |
|
... | ... | |
135 | 150 |
} |
136 | 151 |
} |
137 | 152 |
} |
153 |
if( visibilityScaleSelector.getDoNotAskScaleAgain() ) { |
|
154 |
dialogReminder.add("_Do_not_ask_the_scale_again", 1); |
|
155 |
} |
|
138 | 156 |
}); |
139 | 157 |
dialog.show(WindowManager.MODE.DIALOG); |
140 | 158 |
} |
Also available in: Unified diff