Mercurial > projects > dwt-addons
annotate dwtx/jface/action/GroupMarker.d @ 90:7ffeace6c47f
Update 3.4M7 to 3.4
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 06 Jul 2008 23:30:07 +0200 |
parents | ea8ff534f622 |
children |
rev | line source |
---|---|
16
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1 /******************************************************************************* |
90 | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
16
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> |
90 | 29 * @noextend This class is not intended to be subclassed by clients. |
16
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
30 */ |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
31 public class GroupMarker : AbstractGroupMarker { |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
32 /** |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
33 * Create a new group marker with the given name. |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
34 * 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
|
35 * The group name is also used as the item id. |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
36 * |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
37 * @param groupName the name of the group |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
38 */ |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
39 public this(String groupName) { |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
40 super(groupName); |
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 /** |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
44 * The <code>GroupMarker</code> implementation of this method |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
45 * returns <code>false</code> since group markers are always invisible. |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
46 */ |
43
ea8ff534f622
Fix override and super aliases
Frank Benoit <benoit@tionex.de>
parents:
16
diff
changeset
|
47 public override bool isVisible() { |
16
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
48 return false; |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
49 } |
e0f0aaf75edd
PopupDialog, bindings and actions
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
50 } |