Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/AbstractOverviewSection.java')
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/AbstractOverviewSection.java136
1 files changed, 0 insertions, 136 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/AbstractOverviewSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/AbstractOverviewSection.java
deleted file mode 100644
index 34b51e9f0..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/AbstractOverviewSection.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Sybase, Inc. and others.
- *
- * 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:
- * Sybase, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jst.jsf.facesconfig.ui.section;
-
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jst.jsf.common.ui.internal.actions.OpenPageAction;
-import org.eclipse.jst.jsf.facesconfig.ui.page.IFacesConfigPage;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author sfshi
- *
- */
-public abstract class AbstractOverviewSection extends
- AbstractFacesConfigSection {
-
- /**
- * the common table viewer used for the contents
- */
- protected TableViewer tableViewer;
-
- private String targetPageID;
-
- /**
- *
- * @param parent
- * @param managedForm
- * @param page
- * @param toolkit
- * @param targetPageID
- * @param title
- * @param description
- * @param helpContextId
- * @param helpTooltip
- */
- public AbstractOverviewSection(Composite parent, IManagedForm managedForm,
- IFacesConfigPage page, FormToolkit toolkit, String targetPageID,
- String title, String description, String helpContextId,
- String helpTooltip) {
- super(parent, managedForm, page, toolkit, helpContextId, helpTooltip);
- this.targetPageID = targetPageID;
- getSection().setText(title); //$NON-NLS-1$
- getSection().setDescription(description); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.jsf.facesconfig.ui.section.AbstractFacesConfigSection#createContents(org.eclipse.swt.widgets.Composite,
- * org.eclipse.ui.forms.widgets.FormToolkit)
- */
- protected void createContents(Composite container, FormToolkit toolkit) {
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 2;
- layout.marginWidth = 2;
- layout.verticalSpacing = 5;
- layout.horizontalSpacing = 6;
- container.setLayout(layout);
- toolkit.paintBordersFor(container);
- Table table = createTable(container);
- if (targetPageID != null) {
- table.addMouseListener(new MouseAdapter() {
- public void mouseDoubleClick(MouseEvent e) {
- if (((IStructuredSelection) tableViewer.getSelection())
- .size() == 1) {
- OpenPageAction action = new OpenPageAction();
- action.setPageName(targetPageID);
- action.setSelection(tableViewer.getSelection());
- action.run();
- }
- }
- });
- }
- tableViewer = new TableViewer(table);
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(
- getAdapterFactory()));
- ComposedAdapterFactory factory = (ComposedAdapterFactory)getAdapterFactory();
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(factory));
- configTableViewer(tableViewer);
- }
-
- /**
- *
- * @param container
- * @return the table
- */
- abstract protected Table createTable(Composite container);
-
- /**
- *
- * @param tableViewer1
- */
- abstract protected void configTableViewer(TableViewer tableViewer1);
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.jsf.facesconfig.ui.section.IFacesConfigSection#clearAll()
- */
- public void clearAll() {
- tableViewer.setInput(null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.jsf.facesconfig.ui.section.IFacesConfigSection#refreshAll()
- */
- public void refreshAll() {
- tableViewer.setInput(getInput());
-
- }
-
-}

Back to the top