summaryrefslogtreecommitdiff
path: root/propertysheet/src/org/eclipse/wb/internal/core/editor/structure/IPage.java
diff options
context:
space:
mode:
Diffstat (limited to 'propertysheet/src/org/eclipse/wb/internal/core/editor/structure/IPage.java')
-rw-r--r--propertysheet/src/org/eclipse/wb/internal/core/editor/structure/IPage.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/propertysheet/src/org/eclipse/wb/internal/core/editor/structure/IPage.java b/propertysheet/src/org/eclipse/wb/internal/core/editor/structure/IPage.java
new file mode 100644
index 0000000..a86522d
--- /dev/null
+++ b/propertysheet/src/org/eclipse/wb/internal/core/editor/structure/IPage.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Google, Inc.
+ * 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:
+ * Google, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wb.internal.core.editor.structure;
+
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * View-like page.
+ *
+ * @author scheglov_ke
+ * @coverage core.editor.structure
+ */
+public interface IPage {
+ /**
+ * Creates the {@link Control} for this page.
+ */
+ void createControl(Composite parent);
+
+ /**
+ * Disposes this page.
+ * <p>
+ * This is the last method called on the {@link IPage}. Implementors should clean up any resources
+ * associated with the page.
+ * <p>
+ * Note that there is no guarantee that {@link #createControl(Composite)} has been called, so the
+ * control may never have been created.
+ */
+ void dispose();
+
+ /**
+ * @return the {@link Control} of this page, may be <code>null</code>.
+ */
+ Control getControl();
+
+ /**
+ * Allows the page to make contributions to the given {@link IToolBarManager}. The contributions
+ * will be visible when the page is visible. This method is automatically called shortly after
+ * {@link #createControl(Composite)} is called.
+ */
+ void setToolBar(IToolBarManager toolBarManager);
+
+ /**
+ * Asks this page to take focus.
+ */
+ void setFocus();
+}