X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=legacy%2Forg.argeo.slc.client.ui.dist%2Fsrc%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Feditors%2FRunInOsgiPage.java;fp=legacy%2Forg.argeo.slc.client.ui.dist%2Fsrc%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Feditors%2FRunInOsgiPage.java;h=0000000000000000000000000000000000000000;hb=6227518f97c4697d83637eea4c76047235101491;hp=5e11e77b6e88083fa2dac08e61547640f4b135b2;hpb=71ffb72c41c6a53d5fdccf3925a9c7a68046ee80;p=gpl%2Fargeo-slc.git diff --git a/legacy/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/RunInOsgiPage.java b/legacy/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/RunInOsgiPage.java deleted file mode 100644 index 5e11e77b6..000000000 --- a/legacy/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/RunInOsgiPage.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.argeo.slc.client.ui.dist.editors; - -import javax.jcr.Node; - -import org.argeo.slc.SlcException; -import org.argeo.slc.SlcNames; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.forms.IManagedForm; -import org.eclipse.ui.forms.editor.FormEditor; -import org.eclipse.ui.forms.editor.FormPage; -import org.eclipse.ui.forms.widgets.FormToolkit; -import org.eclipse.ui.forms.widgets.ScrolledForm; - -/** - * Enable launch of the current distribution in a separate osgi run time. - * Display also a console to interract with the launched runtime - */ -public class RunInOsgiPage extends FormPage implements SlcNames { - - final static String PAGE_ID = "RunInOsgiPage"; - - // Business Objects - private Node modularDistribution; - - // This page widgets - private Button launchBtn; - private Text consoleTxt; - - private FormToolkit tk; - - public RunInOsgiPage(FormEditor formEditor, String title, - Node modularDistribution) { - super(formEditor, PAGE_ID, title); - this.modularDistribution = modularDistribution; - } - - @Override - protected void createFormContent(IManagedForm managedForm) { - ScrolledForm form = managedForm.getForm(); - tk = managedForm.getToolkit(); - // Main Layout - Composite body = form.getBody(); - GridLayout layout = new GridLayout(); - layout.marginTop = layout.marginWidth = 0; - body.setLayout(layout); - - // The header - Composite header = tk.createComposite(body); - header.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); - createHeaderPart(header); - - // The console - Composite console = tk.createComposite(body); - console.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - createConsolePart(console); - body.layout(); - } - - private void createHeaderPart(Composite parent) { - GridLayout layout = new GridLayout(); - parent.setLayout(layout); - - // Text Area to filter - launchBtn = tk.createButton(parent, " Launch ", SWT.PUSH); - launchBtn.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, true, false)); - - launchBtn.addSelectionListener(new SelectionAdapter() { - private static final long serialVersionUID = -1633658484882130602L; - - @Override - public void widgetSelected(SelectionEvent e) { - super.widgetSelected(e); - throw new SlcException("Implement this"); - } - }); - } - - private void createConsolePart(Composite parent) { - parent.setLayout(new GridLayout()); - consoleTxt = tk.createText(parent, "OSGi > ", SWT.MULTI | SWT.WRAP - | SWT.BORDER); - consoleTxt.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - } - - @Override - public void setFocus() { - launchBtn.setFocus(); - } -} \ No newline at end of file