Search in sources :

Example 1 with ContainerBrowserField

use of com.robotoworks.mechanoid.ui.wizard.fields.ContainerBrowserField in project mechanoid by robotoworks.

the class NewMechanoidElementPage method createFields.

protected void createFields(Composite parent, Font font) {
    Composite group = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    layout.marginWidth = 0;
    group.setLayout(layout);
    group.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
    group.setFont(font);
    IContainer initialRoot = getMechanoidWizard().getSelectedFolder() != null ? getMechanoidWizard().getSelectedFolder() : getMechanoidWizard().getSelectedProject();
    mFolderField = new ContainerBrowserField(group, Messages.NewMechanoidElementPage_Widget_Label_Folder, initialRoot);
    mFolderField.getTextField().addModifyListener(mValidatingModifyListener);
    mFolderField.getTextField().addFocusListener(mFieldFocusedListener);
    mPackageField = new PackageBrowserField(group, Messages.NewMechanoidElementPage_Widget_Label_Package);
    mPackageField.setJavaProject(getMechanoidWizard().getSelectedJavaProject());
    mPackageField.getTextField().addModifyListener(mValidatingModifyListener);
    mPackageField.getTextField().addFocusListener(mFieldFocusedListener);
    mElementNameField = new TextField(group, Messages.NewMechanoidElementPage_Widget_Label_Name);
    mElementNameField.getTextField().addModifyListener(mValidatingModifyListener);
    mElementNameField.getTextField().addFocusListener(mFieldFocusedListener);
    mElementNameField.getTextField().addFocusListener(mFieldFocusedListener);
    onAfterAddNameField(group, font);
    Label seperator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
    seperator.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    createFieldInfoLabel(parent);
//createAddMechanoidLibraryGroup(parent);
}
Also used : ContainerBrowserField(com.robotoworks.mechanoid.ui.wizard.fields.ContainerBrowserField) GridLayout(org.eclipse.swt.layout.GridLayout) PackageBrowserField(com.robotoworks.mechanoid.ui.wizard.fields.PackageBrowserField) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) TextField(com.robotoworks.mechanoid.ui.wizard.fields.TextField) IContainer(org.eclipse.core.resources.IContainer)

Aggregations

ContainerBrowserField (com.robotoworks.mechanoid.ui.wizard.fields.ContainerBrowserField)1 PackageBrowserField (com.robotoworks.mechanoid.ui.wizard.fields.PackageBrowserField)1 TextField (com.robotoworks.mechanoid.ui.wizard.fields.TextField)1 IContainer (org.eclipse.core.resources.IContainer)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 Label (org.eclipse.swt.widgets.Label)1