01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal;
11:
12: import org.eclipse.swt.widgets.Composite;
13: import org.eclipse.swt.widgets.Control;
14:
15: /**
16: * A PlaceHolder is a non-visible stand-in for a layout part.
17: */
18: public class PartPlaceholder extends LayoutPart {
19:
20: /**
21: * Placeholder ids may contain wildcards. This is the wildcard string.
22: *
23: * @since 3.0
24: */
25: public static String WILD_CARD = "*"; //$NON-NLS-1$
26:
27: public PartPlaceholder(String id) {
28: super (id);
29: }
30:
31: /**
32: * Creates the SWT control
33: */
34: public void createControl(Composite parent) {
35: // do nothing
36: }
37:
38: /**
39: * Get the part control. This method may return null.
40: */
41: public Control getControl() {
42: return null;
43: }
44:
45: /**
46: * Returns whether this placeholder has a wildcard.
47: *
48: * @since 3.0
49: */
50: public boolean hasWildCard() {
51: return getID().indexOf(WILD_CARD) != -1;
52: }
53: }
|