diff dwtx/jface/action/GroupMarker.d @ 16:e0f0aaf75edd

PopupDialog, bindings and actions
author Frank Benoit <benoit@tionex.de>
date Tue, 01 Apr 2008 08:00:31 +0200
parents
children ea8ff534f622
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwtx/jface/action/GroupMarker.d	Tue Apr 01 08:00:31 2008 +0200
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
+ *******************************************************************************/
+module dwtx.jface.action.GroupMarker;
+
+import dwtx.jface.action.AbstractGroupMarker;
+
+import dwt.dwthelper.utils;
+
+/**
+ * A group marker is a special kind of contribution item denoting
+ * the beginning of a group. These groups are used to structure
+ * the list of items. Unlike regular contribution items and
+ * separators, group markers have no visual representation.
+ * The name of the group is synonymous with the contribution item id.
+ * <p>
+ * This class may be instantiated; it is not intended to be
+ * subclassed outside the framework.
+ * </p>
+ */
+public class GroupMarker : AbstractGroupMarker {
+    /**
+     * Create a new group marker with the given name.
+     * The group name must not be <code>null</code> or the empty string.
+     * The group name is also used as the item id.
+     *
+     * @param groupName the name of the group
+     */
+    public this(String groupName) {
+        super(groupName);
+    }
+
+    /**
+     * The <code>GroupMarker</code> implementation of this method
+     * returns <code>false</code> since group markers are always invisible.
+     */
+    public bool isVisible() {
+        return false;
+    }
+}