KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > PartPlaceholder


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal;
12
13 import org.eclipse.swt.widgets.Composite;
14 import org.eclipse.swt.widgets.Control;
15
16 /**
17  * A PlaceHolder is a non-visible stand-in for a layout part.
18  */

19 public class PartPlaceholder extends LayoutPart {
20
21     /**
22      * Placeholder ids may contain wildcards. This is the wildcard string.
23      *
24      * @since 3.0
25      */

26     public static String JavaDoc WILD_CARD = "*"; //$NON-NLS-1$
27

28     public PartPlaceholder(String JavaDoc id) {
29         super(id);
30     }
31
32     /**
33      * Creates the SWT control
34      */

35     public void createControl(Composite parent) {
36         // do nothing
37
}
38
39     /**
40      * Get the part control. This method may return null.
41      */

42     public Control getControl() {
43         return null;
44     }
45
46     /**
47      * Returns whether this placeholder has a wildcard.
48      *
49      * @since 3.0
50      */

51     public boolean hasWildCard() {
52         return getID().indexOf(WILD_CARD) != -1;
53     }
54 }
55
Popular Tags