Package org.eclipse.wb.core.controls

Examples of org.eclipse.wb.core.controls.CComboBox


      PropertyEditor propertyEditor = property.getEditor();
      // activate
      propertyTable.setInput(new Property[]{property});
      propertyTable.setActiveProperty(property);
      propertyTable.activateEditor(property, null);
      CComboBox combo = (CComboBox) getFieldValue(propertyEditor, "m_combo");
      Text comboText = (Text) getFieldValue(combo, "m_text");
      Table comboTable = ((TableViewer) getFieldValue(combo, "m_table")).getTable();
      // has items
      assertEquals(3, combo.getItemCount());
      assertFalse(combo.isDroppedDown());
      // drop-down in async
      waitEventLoop(0);
      assertTrue(combo.isDroppedDown());
      // "second" selected
      assertEquals(1, comboTable.getSelectionIndex());
      // move selection up/down
      {
        EventSender eventSender = new EventSender(comboText);
View Full Code Here


      PropertyEditor propertyEditor = property.getEditor();
      // activate
      propertyTable.setInput(new Property[]{property});
      propertyTable.setActiveProperty(property);
      propertyTable.activateEditor(property, null);
      CComboBox combo = (CComboBox) getFieldValue(propertyEditor, "m_combo");
      Text comboText = (Text) getFieldValue(combo, "m_text");
      EventSender eventSender = new EventSender(comboText);
      // has items
      assertEquals(3, combo.getItemCount());
      assertFalse(combo.isDroppedDown());
      // drop-down in async
      waitEventLoop(0);
      assertTrue(combo.isDroppedDown());
      // send ESC, close
      {
        eventSender.keyDown(SWT.ESC);
        assertFalse(combo.isDroppedDown());
      }
      // set text
      combo.setSelectionText("myStyle");
      // apply text
      eventSender.keyDown('\r');
      assertEditor(getStyleSource("setStyleName('myStyle')"));
    } finally {
      propertyTable.dispose();
View Full Code Here

      PropertyEditor propertyEditor = property.getEditor();
      // activate
      propertyTable.setInput(new Property[]{property});
      propertyTable.setActiveProperty(property);
      propertyTable.activateEditor(property, null);
      CComboBox combo = (CComboBox) getFieldValue(propertyEditor, "m_combo");
      Text comboText = (Text) getFieldValue(combo, "m_text");
      EventSender eventSender = new EventSender(comboText);
      // active
      assertSame(propertyEditor, propertyTable.forTests_getActiveEditor());
      // drop-down in async
      waitEventLoop(0);
      assertTrue(combo.isDroppedDown());
      // send ESC, close
      {
        eventSender.keyDown(SWT.ESC);
        assertFalse(combo.isDroppedDown());
      }
      // send ESC, deactivate
      {
        eventSender.keyDown(SWT.ESC);
        assertSame(null, propertyTable.forTests_getActiveEditor());
View Full Code Here

      propertyTable.setInput(new Property[]{property});
      propertyTable.setActiveProperty(property);
      // send "b", activate editor
      new EventSender(propertyTable).keyDown(0, 'b');
      // prepare controls
      CComboBox combo = (CComboBox) getFieldValue(propertyEditor, "m_combo");
      Text comboText = (Text) getFieldValue(combo, "m_text");
      Table comboTable = ((TableViewer) getFieldValue(combo, "m_table")).getTable();
      EventSender eventSender = new EventSender(comboText);
      // drop-down in async
      waitEventLoop(0);
      assertTrue(combo.isDroppedDown());
      // state after sending "b"
      assertEquals(2, comboTable.getItemCount());
      assertEquals(-1, comboTable.getSelectionIndex());
      // send DOWN, select "bb2"
      {
View Full Code Here

      propertyTable.setInput(new Property[]{property});
      propertyTable.setActiveProperty(property);
      // send "s", activate editor
      new EventSender(propertyTable).keyDown(0, 's');
      // prepare controls
      CComboBox combo = (CComboBox) getFieldValue(propertyEditor, "m_combo");
      Text comboText = (Text) getFieldValue(combo, "m_text");
      Table comboTable = ((TableViewer) getFieldValue(combo, "m_table")).getTable();
      EventSender eventSender = new EventSender(comboText);
      // drop-down in async
      waitEventLoop(0);
      assertTrue(combo.isDroppedDown());
      // use exactly "second"
      comboText.setText("second");
      assertEquals(1, comboTable.getItemCount());
      assertEquals(-1, comboTable.getSelectionIndex());
      // apply selection
View Full Code Here

        propertyTable.setActiveProperty(property);
        // press "b", activate editor
        new EventSender(propertyTable).keyDown(0, 'b');
        // set text and press Enter
        {
          CComboBox combo = (CComboBox) ReflectionUtils.getFieldObject(propertyEditor, "m_combo");
          Text comboText = (Text) ReflectionUtils.getFieldObject(combo, "m_text");
          // drop-down in async
          waitEventLoop(0);
          assertTrue(combo.isDroppedDown());
          // animate
          EventSender eventSender = new EventSender(comboText);
          eventSender.keyDown(SWT.ESC);
          combo.setSelectionText("green");
          eventSender.keyDown(SWT.CR);
        }
      } finally {
        propertyTable.dispose();
      }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.core.controls.CComboBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.