Search in sources :

Example 6 with IServerAttributes

use of org.eclipse.wst.server.core.IServerAttributes in project webtools.servertools by eclipse.

the class NewServerComposite method createAutoComposite.

protected void createAutoComposite(Composite comp) {
    detectComp2 = new Composite(comp, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.horizontalSpacing = SWTUtil.convertHorizontalDLUsToPixels(this, 4);
    layout.verticalSpacing = SWTUtil.convertVerticalDLUsToPixels(this, 4);
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    layout.numColumns = 1;
    detectComp2.setLayout(layout);
    detectHostComp = createHostComposite(detectComp2);
    detectComp = new NewDetectServerComposite(detectComp2, new NewDetectServerComposite.IServerSelectionListener() {

        public void serverSelected(IServerAttributes server) {
        // do nothing
        }
    });
    if (lastHostname != null)
        detectComp.setHost(lastHostname);
    else
        detectComp.setHost("localhost");
    GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
    data.horizontalSpan = 3;
    data.heightHint = 150;
    detectComp.setLayoutData(data);
}
Also used : IServerAttributes(org.eclipse.wst.server.core.IServerAttributes) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ServerComposite(org.eclipse.wst.server.ui.internal.viewers.ServerComposite) GridData(org.eclipse.swt.layout.GridData)

Example 7 with IServerAttributes

use of org.eclipse.wst.server.core.IServerAttributes in project webtools.servertools by eclipse.

the class NewServerComposite method createManualComposite.

protected void createManualComposite(Composite comp) {
    manualComp2 = new Composite(comp, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.horizontalSpacing = SWTUtil.convertHorizontalDLUsToPixels(this, 4);
    layout.verticalSpacing = SWTUtil.convertVerticalDLUsToPixels(this, 4);
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    layout.numColumns = 1;
    manualComp2.setLayout(layout);
    manualComp2.setLayoutData(new GridData(GridData.FILL_BOTH));
    IModuleType mt = moduleType;
    boolean includeIncompatible = true;
    if (moduleType != null)
        includeIncompatible = false;
    if (module != null)
        mt = module.getModuleType();
    manualComp = new NewManualServerComposite(manualComp2, new NewManualServerComposite.IWizardHandle2() {

        public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InterruptedException, InvocationTargetException {
            wizard.run(fork, cancelable, runnable);
        }

        public void update() {
            wizard.update();
        }

        public void setMessage(String newMessage, int newType) {
            wizard.setMessage(newMessage, newType);
        }
    }, mt, module, serverTypeId, includeIncompatible, new NewManualServerComposite.ServerSelectionListener() {

        public void serverSelected(IServerAttributes server) {
            updateTaskModel();
        }

        public void runtimeSelected(IRuntime runtime) {
            updateTaskModel();
        }
    });
    if (lastHostname != null)
        manualComp.setHost(lastHostname);
    else
        manualComp.setHost("localhost");
    GridData data = new GridData(GridData.FILL_BOTH);
    data.horizontalSpan = 3;
    data.heightHint = 360;
    manualComp.setLayoutData(data);
}
Also used : IServerAttributes(org.eclipse.wst.server.core.IServerAttributes) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ServerComposite(org.eclipse.wst.server.ui.internal.viewers.ServerComposite) IModuleType(org.eclipse.wst.server.core.IModuleType) GridData(org.eclipse.swt.layout.GridData) IRunnableWithProgress(org.eclipse.jface.operation.IRunnableWithProgress) IRuntime(org.eclipse.wst.server.core.IRuntime)

Aggregations

IServerAttributes (org.eclipse.wst.server.core.IServerAttributes)7 Test (org.junit.Test)3 GridData (org.eclipse.swt.layout.GridData)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 Composite (org.eclipse.swt.widgets.Composite)2 ServerComposite (org.eclipse.wst.server.ui.internal.viewers.ServerComposite)2 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)1 ITomcatServer (org.eclipse.jst.server.tomcat.core.internal.ITomcatServer)1 TomcatServer (org.eclipse.jst.server.tomcat.core.internal.TomcatServer)1 IModuleType (org.eclipse.wst.server.core.IModuleType)1 IRuntime (org.eclipse.wst.server.core.IRuntime)1 IServerType (org.eclipse.wst.server.core.IServerType)1