annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
1 /*******************************************************************************
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
2 * Copyright (c) 2000, 2006 IBM Corporation and others.
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
3 * All rights reserved. This program and the accompanying materials
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
4 * are made available under the terms of the Eclipse Public License v1.0
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
5 * which accompanies this distribution, and is available at
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
6 * http://www.eclipse.org/legal/epl-v10.html
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
7 *
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
8 * Contributors:
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
9 * IBM Corporation - initial API and implementation
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
10 * Port to the D programming language:
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
11 * Frank Benoit <benoit@tionex.de>
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
12 *******************************************************************************/
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
13 module dwtx.jface.action.GroupMarker;
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
14
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
15 import dwtx.jface.action.AbstractGroupMarker;
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
16
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
17 import dwt.dwthelper.utils;
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
18
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
19 /**
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
20 * A group marker is a special kind of contribution item denoting
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
21 * the beginning of a group. These groups are used to structure
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
22 * the list of items. Unlike regular contribution items and
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
23 * separators, group markers have no visual representation.
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
24 * The name of the group is synonymous with the contribution item id.
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
25 * <p>
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
26 * This class may be instantiated; it is not intended to be
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
27 * subclassed outside the framework.
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
28 * </p>
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
29 */
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
30 public class GroupMarker : AbstractGroupMarker {
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
31 /**
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
32 * Create a new group marker with the given name.
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
33 * The group name must not be <code>null</code> or the empty string.
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
34 * The group name is also used as the item id.
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
35 *
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
36 * @param groupName the name of the group
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
37 */
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
38 public this(String groupName) {
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
39 super(groupName);
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
40 }
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
41
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
42 /**
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
43 * The <code>GroupMarker</code> implementation of this method
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
44 * returns <code>false</code> since group markers are always invisible.
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
45 */
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
46 public bool isVisible() {
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
47 return false;
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
48 }
e0f0aaf75edd PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
49 }