Changeset 5687
- Timestamp:
- 10/14/08 12:09:36 (7 weeks ago)
- Location:
- trunk/SRC/org/openmicroscopy/shoola/agents
- Files:
-
- 1 added
- 10 modified
- 1 moved
-
imviewer/view/ImViewerFactory.java (modified) (2 diffs)
-
treeviewer/actions/BrowseContainerAction.java (moved) (moved from trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/ViewAction.java) (10 diffs)
-
treeviewer/actions/RefreshExperimenterData.java (modified) (1 diff)
-
treeviewer/actions/RemoveExperimenterNode.java (modified) (1 diff)
-
treeviewer/actions/SwitchUserAction.java (modified) (1 diff)
-
treeviewer/actions/ViewImageAction.java (added)
-
treeviewer/view/ManagePopupMenu.java (modified) (1 diff)
-
treeviewer/view/PopupMenu.java (modified) (4 diffs)
-
treeviewer/view/ToolBar.java (modified) (1 diff)
-
treeviewer/view/TreeViewerControl.java (modified) (6 diffs)
-
treeviewer/view/TreeViewerFactory.java (modified) (3 diffs)
-
treeviewer/view/TreeViewerWin.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerFactory.java
r5567 r5687 79 79 /** The name associated to the component. */ 80 80 private static final String NAME = "Viewer: "; 81 82 /** The name of the windows menu. */ 83 private static final String MENU_NAME = "Image Viewer"; 84 81 85 82 86 /** The sole instance. */ … … 306 310 viewers = new HashSet<ImViewer>(); 307 311 isAttached = false; 308 windowMenu = new JMenu( "Viewers");312 windowMenu = new JMenu(MENU_NAME); 309 313 } 310 314 -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/BrowseContainerAction.java
r5656 r5687 1 1 /* 2 * org.openmicroscopy.shoola.agents.treeviewer.actions. ViewAction2 * org.openmicroscopy.shoola.agents.treeviewer.actions.BrowseContainerAction 3 3 * 4 4 *------------------------------------------------------------------------------ … … 28 28 import java.awt.event.ActionEvent; 29 29 import java.util.List; 30 31 30 import javax.swing.Action; 32 31 … … 49 48 50 49 /** 51 * Views or browses the selected node depending on the hierarchy object type.50 * Browses the selected node depending on the hierarchy object type. 52 51 * 53 52 * @author Jean-Marie Burel … … 59 58 * @since OME2.2 60 59 */ 61 public class ViewAction60 public class BrowseContainerAction 62 61 extends TreeViewerAction 63 62 { 64 63 65 /** Name of the action when the <code>DataObject</code> is an Image. */66 private static final String VIEW = "View";67 68 64 /** Name of the action when the <code>DataObject</code> isn't an Image. */ 69 private static final String BROWSE = "Browse";65 private static final String NAME = "Browse"; 70 66 71 67 /** Description of the action. */ 72 68 private static final String DESCRIPTION = "Browse the selected nodes"; 73 74 /** Description of the action when the selected node is an image. */75 private static final String DESCRIPTION_IMAGE = "View the selected image";76 69 77 70 /** Convenience reference to the icon manager. */ … … 92 85 } 93 86 if (selectedDisplay.getParentDisplay() == null) { //root 94 name = BROWSE;87 name = NAME; 95 88 setEnabled(false); 96 89 putValue(Action.SMALL_ICON, icons.getIcon(IconManager.BROWSER)); … … 100 93 Browser browser = model.getSelectedBrowser(); 101 94 if (selectedDisplay instanceof TreeImageTimeSet) { 102 name = BROWSE;95 name = NAME; 103 96 putValue(Action.SMALL_ICON, icons.getIcon(IconManager.BROWSER)); 104 97 if (browser.getSelectedDisplays().length > 1) { … … 118 111 } 119 112 if (ho == null || !(ho instanceof DataObject) || 120 ho instanceof ExperimenterData) setEnabled(false); 113 ho instanceof ExperimenterData || ho instanceof ImageData) 114 setEnabled(false); 121 115 else { 122 116 if (browser != null) { … … 125 119 //for this version 126 120 setEnabled(false); 127 name = BROWSE;121 name = NAME; 128 122 putValue(Action.SMALL_ICON, 129 123 icons.getIcon(IconManager.BROWSER)); … … 131 125 } 132 126 } 133 if ((ho instanceof ImageData)) { 134 name = VIEW; 135 description = DESCRIPTION_IMAGE; 136 putValue(Action.SHORT_DESCRIPTION, 137 UIUtilities.formatToolTipText(description)); 138 putValue(Action.SMALL_ICON, icons.getIcon(IconManager.VIEWER)); 139 } else { 140 name = BROWSE; 141 putValue(Action.SMALL_ICON, icons.getIcon(IconManager.BROWSER)); 142 } 127 name = NAME; 128 putValue(Action.SMALL_ICON, icons.getIcon(IconManager.BROWSER)); 143 129 144 130 if (selectedDisplay instanceof TreeImageSet) { … … 158 144 * @param model Reference to the Model. Mustn't be <code>null</code>. 159 145 */ 160 public ViewAction(TreeViewer model)146 public BrowseContainerAction(TreeViewer model) 161 147 { 162 148 super(model); 163 name = BROWSE;149 name = NAME; 164 150 icons = IconManager.getInstance(); 165 151 putValue(Action.SHORT_DESCRIPTION, -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/RefreshExperimenterData.java
r4982 r5687 57 57 58 58 /** Name of the action. */ 59 private static final String NAME = "Refresh Experimenter";59 private static final String NAME = "Refresh User"; 60 60 61 61 /** Description of the action. */ 62 private static final String DESCRIPTION = "Reload the experimenterdata.";62 private static final String DESCRIPTION = "Reload the user's data."; 63 63 64 64 /** -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/RemoveExperimenterNode.java
r5010 r5687 59 59 60 60 /** The name of the action. */ 61 private static final String NAME = "Remove Experimenter";61 private static final String NAME = "Remove User"; 62 62 63 63 /** The description of the action. */ 64 64 private static final String DESCRIPTION = "Remove the data of the" + 65 "selected user from the display ";65 "selected user from the display."; 66 66 67 67 /** -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/SwitchUserAction.java
r5180 r5687 54 54 55 55 /** The name of the action. */ 56 private static final String NAME = "Switch user";56 private static final String NAME = "Switch User..."; 57 57 58 58 /** The description of the action. */ -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ManagePopupMenu.java
r4695 r5687 57 57 58 58 /** Reference to the control. */ 59 private TreeViewerControl controller;59 private TreeViewerControl controller; 60 60 61 61 /** Button to add element to the specified container. */ -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/PopupMenu.java
r5450 r5687 79 79 private JMenuItem deleteElement; 80 80 81 /** Button to classify the selected elements. */82 private JMenuItem classifyElement;83 84 /** Button to classify the selected elements. */85 private JMenuItem declassifyElement;86 87 81 /** Button to browse the categories the image belongs to. */ 88 82 private JMenuItem browseClassificationElement; 89 90 /** Button to classify the images contained in the selected element. */91 private JMenuItem classifyChildrenElement;92 83 93 84 /** Button to annotate the images contained in the selected element. */ … … 152 143 switch (index) { 153 144 case TreeViewer.FULL_POP_UP_MENU: 154 a = controller.getAction(TreeViewerControl. VIEW);145 a = controller.getAction(TreeViewerControl.BROWSE); 155 146 view = new JMenuItem(a); 156 147 initMenuItem(view, a.getActionName()); … … 173 164 existingElement = new JMenuItem(a); 174 165 initMenuItem(existingElement, a.getActionName()); 175 a = controller.getAction(TreeViewerControl.CLASSIFY); 176 classifyElement = new JMenuItem(a); 177 initMenuItem(classifyElement, a.getActionName()); 178 a = controller.getAction(TreeViewerControl.DECLASSIFY); 179 declassifyElement = new JMenuItem(a); 180 initMenuItem(declassifyElement, a.getActionName()); 166 181 167 a = controller.getAction(TreeViewerControl.ANNOTATE_CHILDREN); 182 168 annotateChildrenElement = new JMenuItem(a); 183 169 initMenuItem(annotateChildrenElement, a.getActionName()); 184 a = controller.getAction(TreeViewerControl.CLASSIFY_CHILDREN); 185 classifyChildrenElement = new JMenuItem(a); 186 initMenuItem(classifyChildrenElement, a.getActionName()); 170 187 171 a = controller.getAction(TreeViewerControl.REMOVE_FROM_DISPLAY); 188 172 removeExperimenterElement = new JMenuItem(a); … … 255 239 add(new JSeparator(JSeparator.HORIZONTAL)); 256 240 add(browseClassificationElement); 257 //add(classifyElement);258 //add(declassifyElement);259 //add(classifyChildrenElement);260 241 //add(new JSeparator(JSeparator.HORIZONTAL)); 261 242 //add(annotateChildrenElement); -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ToolBar.java
r5628 r5687 81 81 bar.setRollover(true); 82 82 bar.setBorder(null); 83 JButton b = new JButton(controller.getAction(TreeViewerControl.VIEW)); 83 JButton b = new JButton(controller.getAction(TreeViewerControl.BROWSE)); 84 UIUtilities.unifiedButtonLookAndFeel(b); 85 bar.add(b); 86 b = new JButton(controller.getAction(TreeViewerControl.VIEW)); 84 87 UIUtilities.unifiedButtonLookAndFeel(b); 85 88 bar.add(b); -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerControl.java
r5681 r5687 83 83 import org.openmicroscopy.shoola.agents.treeviewer.actions.SwitchUserAction; 84 84 import org.openmicroscopy.shoola.agents.treeviewer.actions.TreeViewerAction; 85 import org.openmicroscopy.shoola.agents.treeviewer.actions.ViewAction; 85 import org.openmicroscopy.shoola.agents.treeviewer.actions.BrowseContainerAction; 86 import org.openmicroscopy.shoola.agents.treeviewer.actions.ViewImageAction; 86 87 import org.openmicroscopy.shoola.agents.treeviewer.browser.Browser; 87 import org.openmicroscopy.shoola.agents.treeviewer.browser.TreeImageDisplay;88 88 import org.openmicroscopy.shoola.agents.treeviewer.cmd.CopyCmd; 89 89 import org.openmicroscopy.shoola.agents.treeviewer.cmd.CutCmd; … … 119 119 { 120 120 121 /** Identifies the <code> Viewaction</code> in the Edit menu. */122 static final Integer VIEW= new Integer(1);121 /** Identifies the <code>Browse action</code> in the Edit menu. */ 122 static final Integer BROWSE = new Integer(1); 123 123 124 124 /** Identifies the <code>Create object action</code> in the File menu. */ … … 252 252 static final Integer CREATE_TOP_SCREEN = new Integer(40); 253 253 254 /** Identifies the <code>View action</code> in the Edit menu. */ 255 static final Integer VIEW = new Integer(41); 256 254 257 /** 255 258 * Reference to the {@link TreeViewer} component, which, in this context, … … 273 276 private void createActions() 274 277 { 275 actionsMap.put( VIEW, new ViewAction(model));278 actionsMap.put(BROWSE, new BrowseContainerAction(model)); 276 279 actionsMap.put(CREATE_OBJECT, new CreateAction(model)); 277 280 actionsMap.put(COPY_OBJECT, new CopyAction(model)); … … 325 328 new CreateTopContainerAction(model, 326 329 CreateTopContainerAction.SCREEN)); 330 actionsMap.put(VIEW, new ViewImageAction(model)); 327 331 } 328 332 … … 414 418 415 419 }); 416 }417 418 /**419 * Resets the selected node.420 *421 * @param d The node to reset.422 */423 private void resetSelectedDisplay(TreeImageDisplay d)424 {425 Browser b = model.getSelectedBrowser();426 if (b != null) {427 //b.setSelectedDisplay(null);428 b.setSelectedDisplay(d);429 }430 420 } 431 421 -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerFactory.java
r5519 r5687 70 70 private static final String NAME = "Data Manager"; 71 71 72 /** The name of the windows menu. */ 73 private static final String MENU_NAME = "Data Manager"; 74 72 75 /** The sole instance. */ 73 76 private static final TreeViewerFactory singleton = new TreeViewerFactory(); … … 145 148 } 146 149 150 /** 151 * Saves the data before closing the application. 152 * 153 * @param evt 154 * @param agent 155 */ 147 156 public static void saveOnClose(SaveEventRequest evt, Object agent) 148 157 { … … 223 232 viewers = new HashSet<TreeViewer>(); 224 233 isAttached = false; 225 windowMenu = new JMenu( "DataManagers");234 windowMenu = new JMenu(MENU_NAME); 226 235 } 227 236 -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerWin.java
r5628 r5687 263 263 //menu.add(createRootMenu()); 264 264 menu.add(new JSeparator(JSeparator.HORIZONTAL)); 265 a = controller.getAction(TreeViewerControl.BROWSE); 266 item = new JMenuItem(a); 267 item.setText(a.getActionName()); 268 menuItems.add(item); 269 menu.add(item); 265 270 a = controller.getAction(TreeViewerControl.VIEW); 266 271 item = new JMenuItem(a); … … 295 300 menu.add(new JMenuItem( 296 301 controller.getAction(TreeViewerControl.DELETE_OBJECT))); 297 /*298 menu.add(new JSeparator(JSeparator.HORIZONTAL));299 menu.add(new JMenuItem(300 controller.getAction(TreeViewerControl.FIND)));301 menu.add(new JMenuItem(302 controller.getAction(TreeViewerControl.CLEAR)));303 menu.add(new JSeparator(JSeparator.HORIZONTAL));304 menu.add(new JMenuItem(305 controller.getAction(TreeViewerControl.CLASSIFY)));306 menu.add(new JMenuItem(307 controller.getAction(TreeViewerControl.DECLASSIFY)));308 */309 302 return menu; 310 303 }
