Search in sources :

Example 1 with TextField

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

the class NewMechanoidNetServiceClientPage method onAfterAddNameField.

@Override
protected void onAfterAddNameField(Composite parent, Font font) {
    mBaseUrlField = new TextField(parent, Messages.NewMechanoidNetServiceClientPage_Widget_Label_Url);
    mBaseUrlField.getTextField().addFocusListener(new FocusListener() {

        @Override
        public void focusLost(FocusEvent e) {
        }

        @Override
        public void focusGained(FocusEvent e) {
            getFieldInfoLabel().setText(Messages.NewMechanoidNetServiceClientPage_Widget_Label_Message_Url);
        }
    });
}
Also used : TextField(com.robotoworks.mechanoid.ui.wizard.fields.TextField) FocusListener(org.eclipse.swt.events.FocusListener) FocusEvent(org.eclipse.swt.events.FocusEvent)

Example 2 with TextField

use of com.robotoworks.mechanoid.ui.wizard.fields.TextField 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

TextField (com.robotoworks.mechanoid.ui.wizard.fields.TextField)2 ContainerBrowserField (com.robotoworks.mechanoid.ui.wizard.fields.ContainerBrowserField)1 PackageBrowserField (com.robotoworks.mechanoid.ui.wizard.fields.PackageBrowserField)1 IContainer (org.eclipse.core.resources.IContainer)1 FocusEvent (org.eclipse.swt.events.FocusEvent)1 FocusListener (org.eclipse.swt.events.FocusListener)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