gvsig-raster / org.gvsig.raster.principalcomponents / trunk / org.gvsig.raster.principalcomponents / org.gvsig.raster.principalcomponents.app / org.gvsig.raster.principalcomponents.app.client / src / main / java / org / gvsig / raster / principalcomponents / app / PrincipalComponentsTocMenuEntry.java @ 2125
History | View | Annotate | Download (1.56 KB)
1 |
package org.gvsig.raster.principalcomponents.app; |
---|---|
2 |
|
3 |
import javax.swing.Icon; |
4 |
|
5 |
import org.gvsig.andami.IconThemeHelper; |
6 |
import org.gvsig.andami.plugins.Extension; |
7 |
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction; |
8 |
import org.gvsig.app.project.documents.view.toc.ITocItem; |
9 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
10 |
import org.gvsig.i18n.Messages; |
11 |
import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem; |
12 |
|
13 |
public class PrincipalComponentsTocMenuEntry extends AbstractTocContextMenuAction implements IGenericToolBarMenuItem { |
14 |
static private PrincipalComponentsTocMenuEntry singleton = null; |
15 |
private static Extension extension = null; |
16 |
|
17 |
|
18 |
public static void setExtension(Extension ext) { |
19 |
extension = ext; |
20 |
} |
21 |
|
22 |
private PrincipalComponentsTocMenuEntry() {}
|
23 |
|
24 |
static public PrincipalComponentsTocMenuEntry getSingleton() { |
25 |
if (singleton == null) |
26 |
singleton = new PrincipalComponentsTocMenuEntry();
|
27 |
return singleton;
|
28 |
} |
29 |
|
30 |
public String getGroup() { |
31 |
return "Multispectral"; |
32 |
} |
33 |
|
34 |
public int getGroupOrder() { |
35 |
return 55; |
36 |
} |
37 |
|
38 |
public int getOrder() { |
39 |
return 0; |
40 |
} |
41 |
|
42 |
public String getText() { |
43 |
return Messages.getText("principalcomponents"); |
44 |
} |
45 |
|
46 |
public boolean isEnabled(ITocItem item, FLayer[] selectedItems) { |
47 |
return true; |
48 |
} |
49 |
|
50 |
public boolean isVisible(ITocItem item, FLayer[] selectedItems) { |
51 |
return true; |
52 |
} |
53 |
|
54 |
public void execute(ITocItem item, FLayer[] selectedItems) { |
55 |
extension.execute("PrincipalComponents");
|
56 |
} |
57 |
|
58 |
public Icon getIcon() { |
59 |
return IconThemeHelper.getImageIcon("principal-components"); |
60 |
} |
61 |
|
62 |
} |