changeset 1443:ec0460dbbae2

Added method to create a menuitem separator. flys-client/trunk@3439 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 16 Dec 2011 13:28:47 +0000
parents 4a6814be92ba
children bdac8a72f7e6
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java
diffstat 2 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Fri Dec 16 13:26:19 2011 +0000
+++ b/flys-client/ChangeLog	Fri Dec 16 13:28:47 2011 +0000
@@ -1,3 +1,8 @@
+2011-12-16	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java:
+	  (createSeparator): New, create a menuitem separator.
+
 2011-12-16	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/server/LoadArtifactServiceImpl.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java	Fri Dec 16 13:26:19 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java	Fri Dec 16 13:28:47 2011 +0000
@@ -63,10 +63,12 @@
     protected CollectionItemAttributeServiceAsync itemAttributeService =
         GWT.create(CollectionItemAttributeService.class);
 
-    private FLYSConstants MSG = GWT.create(FLYSConstants.class);
+    /** i18ner. */
+    protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
 
     /** List of OutParameterChangedHandler. */
     protected List<OutputParameterChangeHandler> outHandlers;
+
     /** List of ChartShallRedrawHandler. */
     protected List<RedrawRequestHandler> redrawRequestHandlers;
 
@@ -323,13 +325,24 @@
         }
     }
 
+    /** Return 'separator'- menu-item. */
+    protected MenuItem createSeparator() {
+        MenuItem separator = new MenuItem();
+        separator.setIsSeparator(true);
+        return separator;
+    }
 
+
+    /**
+     * Get the context menu for a (right mouse button)click on a single item.
+     */
     protected Menu getSingleContextMenu(final ListGridRecord[] records) {
         Menu menu = new Menu();
 
         menu.addItem(createActivateItem(records));
         menu.addItem(createDeactivateItem(records));
         menu.addItem(createRemoveItem(records));
+        menu.addItem(createSeparator());
         menu.addItem(createPropertiesItem(records));
 
         return menu;

http://dive4elements.wald.intevation.org