Revision 38564 branches/v2_0_0_prep/libraries/libCorePlugin/src/org/gvsig/coreplugin/mdiManager/NewSkin.java
NewSkin.java | ||
---|---|---|
147 | 147 |
private Cursor lastCursor = null; |
148 | 148 |
private ImageIcon image; |
149 | 149 |
private String typeDesktop; |
150 |
|
|
151 |
|
|
152 |
private List<UIActionTool>actionTools = new ArrayList<UIActionTool>(); |
|
153 | 150 |
|
154 |
private class MyActionTool implements UIActionTool { |
|
155 |
private String extensionName; |
|
156 |
private String name; |
|
157 |
private String text; |
|
158 |
private String command; |
|
159 |
private String iconName; |
|
160 |
private String enableText; |
|
161 |
private int position; |
|
162 |
private String tip; |
|
163 |
|
|
164 |
MyActionTool(String extensionName, ActionTool action) { |
|
165 |
this.extensionName = extensionName; |
|
166 |
this.name = action.getName(); |
|
167 |
this.text = action.getText(); |
|
168 |
this.command = action.getActionCommand(); |
|
169 |
this.iconName = action.getIcon(); |
|
170 |
this.enableText = action.getEnableText(); |
|
171 |
this.position = action.getPosition(); |
|
172 |
this.tip = action.getTooltip(); |
|
173 |
} |
|
174 |
|
|
175 |
public MyActionTool(String extensionName, Menu action) { |
|
176 |
this.extensionName = extensionName; |
|
177 |
this.name = null; |
|
178 |
this.text = action.getText(); |
|
179 |
this.command = action.getActionCommand(); |
|
180 |
this.iconName = action.getIcon(); |
|
181 |
this.enableText = action.getEnableText(); |
|
182 |
this.position = action.getPosition(); |
|
183 |
this.tip = action.getTooltip(); |
|
184 |
} |
|
185 |
|
|
186 |
public MyActionTool(String extensionName, SelectableTool action) { |
|
187 |
this.extensionName = extensionName; |
|
188 |
this.name = action.getName(); |
|
189 |
this.text = action.getText(); |
|
190 |
this.command = action.getActionCommand(); |
|
191 |
this.iconName = action.getIcon(); |
|
192 |
this.enableText = action.getEnableText(); |
|
193 |
this.position = action.getPosition(); |
|
194 |
this.tip = action.getTooltip(); |
|
195 |
} |
|
196 |
|
|
197 |
public String getExtensionName() { |
|
198 |
return this.extensionName; |
|
199 |
} |
|
200 |
|
|
201 |
public String getName() { |
|
202 |
return this.name; |
|
203 |
} |
|
204 |
|
|
205 |
public String getText() { |
|
206 |
return this.text; |
|
207 |
} |
|
208 |
|
|
209 |
public String getCommand() { |
|
210 |
return this.command; |
|
211 |
} |
|
212 |
|
|
213 |
public String getIconName() { |
|
214 |
return this.iconName; |
|
215 |
} |
|
216 |
|
|
217 |
public String getEnableText() { |
|
218 |
return this.enableText; |
|
219 |
} |
|
220 |
|
|
221 |
public int getPosition() { |
|
222 |
return this.position; |
|
223 |
} |
|
224 |
public String getTooptip() { |
|
225 |
return this.tip; |
|
226 |
} |
|
227 |
} |
|
228 |
|
|
229 | 151 |
//Anyade barras de scroll |
230 | 152 |
private void addScrolledDesktopPanel( JFrame parent, MyDesktopPane desktopPane) { |
231 | 153 |
JPanel toppanel; |
... | ... | |
851 | 773 |
* @see com.iver.andami.plugins.IExtension#execute(java.lang.String) |
852 | 774 |
*/ |
853 | 775 |
public void execute(String actionCommand) { |
854 |
if (actionCommand.equals("cascada")) { |
|
855 |
} else if (actionCommand.equals("mosaico")) { |
|
776 |
if ("window-cascade".equalsIgnoreCase(actionCommand)) { |
|
777 |
logger.info("action window-cascade not implemented."); |
|
778 |
|
|
779 |
} else if ("window-tile".equalsIgnoreCase(actionCommand)) { |
|
780 |
logger.info("action window-tile not implemented."); |
|
856 | 781 |
} |
857 | 782 |
} |
858 | 783 |
|
... | ... | |
1322 | 1247 |
ToolsSwingLocator.getWindowManager().showWindow(panel, title, mode); |
1323 | 1248 |
} |
1324 | 1249 |
|
1325 |
public void registerAction(String extensionName, ActionTool action) { |
|
1326 |
this.actionTools.add(new MyActionTool(extensionName, action)); |
|
1327 |
} |
|
1328 |
|
|
1329 |
public void registerAction(String extensionName, Menu action) { |
|
1330 |
this.actionTools.add(new MyActionTool(extensionName, action)); |
|
1331 |
} |
|
1332 |
|
|
1333 |
public void registerAction(String extensionName, SelectableTool action) { |
|
1334 |
this.actionTools.add(new MyActionTool(extensionName, action)); |
|
1335 |
} |
|
1336 |
|
|
1337 |
public Iterator<UIActionTool> getActionTools() { |
|
1338 |
return this.actionTools.iterator(); |
|
1339 |
} |
|
1340 | 1250 |
} |
Also available in: Unified diff