Search in sources :

Example 26 with IFormField

use of org.eclipse.scout.rt.client.ui.form.fields.IFormField in project scout.rt by eclipse.

the class FindFieldByFormDataIdVisitorTest method testGetFirstFieldOnInnerForm.

@Test
public void testGetFirstFieldOnInnerForm() throws Exception {
    InnerForm innerForm = m_mainForm.getWrappedFormField().getInnerForm();
    FindFieldByFormDataIdVisitor visitor = new FindFieldByFormDataIdVisitor(FIRST_FIELD_DATA_ID, innerForm);
    innerForm.visitFields(visitor);
    IFormField field = visitor.getField();
    assertNotNull(field);
    assertSame(innerForm.getFirstField(), field);
}
Also used : IFormField(org.eclipse.scout.rt.client.ui.form.fields.IFormField) Test(org.junit.Test)

Example 27 with IFormField

use of org.eclipse.scout.rt.client.ui.form.fields.IFormField in project scout.rt by eclipse.

the class FindFieldByFormDataIdVisitorTest method testGetFirstFieldOnInnerInnerForm.

@Test
public void testGetFirstFieldOnInnerInnerForm() throws Exception {
    InnerInnerForm innerInnerForm = m_mainForm.getWrappedFormField().getInnerForm().getWrappedFormField().getInnerForm();
    FindFieldByFormDataIdVisitor visitor = new FindFieldByFormDataIdVisitor(FIRST_FIELD_DATA_ID, innerInnerForm);
    innerInnerForm.visitFields(visitor);
    IFormField field = visitor.getField();
    assertNotNull(field);
    assertSame(innerInnerForm.getFirstField(), field);
}
Also used : IFormField(org.eclipse.scout.rt.client.ui.form.fields.IFormField) Test(org.junit.Test)

Example 28 with IFormField

use of org.eclipse.scout.rt.client.ui.form.fields.IFormField in project scout.rt by eclipse.

the class FindFieldByFormDataIdVisitorTest method testGetThirdFieldWithoutForm.

/* --------------------------------------------------------------------------
   * third field
   * --------------------------------------------------------------------------
   */
@Test
public void testGetThirdFieldWithoutForm() throws Exception {
    FindFieldByFormDataIdVisitor visitor = new FindFieldByFormDataIdVisitor(THIRD_FIELD_DATA_ID);
    m_mainForm.visitFields(visitor);
    IFormField field = visitor.getField();
    assertNotNull(field);
    assertSame(m_mainForm.getWrappedFormField().getInnerForm().getWrappedFormField().getInnerForm().getThirdField(), field);
}
Also used : IFormField(org.eclipse.scout.rt.client.ui.form.fields.IFormField) Test(org.junit.Test)

Example 29 with IFormField

use of org.eclipse.scout.rt.client.ui.form.fields.IFormField in project scout.rt by eclipse.

the class FindFieldByFormDataIdVisitorTest method testGetSecondFieldOnInnerForm.

@Test
public void testGetSecondFieldOnInnerForm() throws Exception {
    InnerForm innerForm = m_mainForm.getWrappedFormField().getInnerForm();
    FindFieldByFormDataIdVisitor visitor = new FindFieldByFormDataIdVisitor(SECOND_FIELD_DATA_ID, innerForm);
    innerForm.visitFields(visitor);
    IFormField field = visitor.getField();
    assertNotNull(field);
    assertSame(innerForm.getSecondField(), field);
}
Also used : IFormField(org.eclipse.scout.rt.client.ui.form.fields.IFormField) Test(org.junit.Test)

Example 30 with IFormField

use of org.eclipse.scout.rt.client.ui.form.fields.IFormField in project scout.rt by eclipse.

the class FindFieldByFormDataIdVisitorTest method testGetThirdFieldOnInnerInnerForm.

@Test
public void testGetThirdFieldOnInnerInnerForm() throws Exception {
    InnerInnerForm innerInnerForm = m_mainForm.getWrappedFormField().getInnerForm().getWrappedFormField().getInnerForm();
    FindFieldByFormDataIdVisitor visitor = new FindFieldByFormDataIdVisitor(THIRD_FIELD_DATA_ID, innerInnerForm);
    innerInnerForm.visitFields(visitor);
    IFormField field = visitor.getField();
    assertNotNull(field);
    assertSame(innerInnerForm.getThirdField(), field);
}
Also used : IFormField(org.eclipse.scout.rt.client.ui.form.fields.IFormField) Test(org.junit.Test)

Aggregations

IFormField (org.eclipse.scout.rt.client.ui.form.fields.IFormField)60 Test (org.junit.Test)19 ArrayList (java.util.ArrayList)13 GridData (org.eclipse.scout.rt.client.ui.form.fields.GridData)12 IButton (org.eclipse.scout.rt.client.ui.form.fields.button.IButton)5 PlatformError (org.eclipse.scout.rt.platform.exception.PlatformError)5 PropertyChangeEvent (java.beans.PropertyChangeEvent)4 PropertyChangeListener (java.beans.PropertyChangeListener)4 HashMap (java.util.HashMap)4 HashSet (java.util.HashSet)4 IColumn (org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn)4 IGroupBox (org.eclipse.scout.rt.client.ui.form.fields.groupbox.IGroupBox)4 IExtensibleObject (org.eclipse.scout.rt.shared.extension.IExtensibleObject)4 Map (java.util.Map)3 PlatformExceptionTranslator (org.eclipse.scout.rt.platform.exception.PlatformExceptionTranslator)3 LinkedList (java.util.LinkedList)2 ITable (org.eclipse.scout.rt.client.ui.basic.table.ITable)2 ICompositeField (org.eclipse.scout.rt.client.ui.form.fields.ICompositeField)2 IValueField (org.eclipse.scout.rt.client.ui.form.fields.IValueField)2 FindFieldByFormDataIdVisitor (org.eclipse.scout.rt.client.ui.form.internal.FindFieldByFormDataIdVisitor)2