Esempio n. 1
0
  @Test
  public void testRenderRemoveScrollBarsSelectionListener_Vertical() throws Exception {
    SelectionListener listener = new SelectionAdapter() {};
    vScroll.addSelectionListener(listener);
    Fixture.markInitialized(display);
    Fixture.markInitialized(sc);
    Fixture.markInitialized(vScroll);
    Fixture.preserveWidgets();

    vScroll.removeSelectionListener(listener);
    lca.renderChanges(sc);

    TestMessage message = Fixture.getProtocolMessage();
    assertEquals(JsonValue.FALSE, message.findListenProperty(vScroll, "Selection"));
  }
Esempio n. 2
0
 /**
  * Removes this object from the corresponding StyledText widget. Object can't be used after this
  * call, until another attach. This method is called automatically, when StyledText widget is
  * disposed
  */
 public void detach() {
   if (text == null) return;
   text.removeDisposeListener(ml);
   text.removeLineStyleListener(ml);
   text.removeLineBackgroundListener(ml);
   text.removePaintListener(ml);
   text.removeVerifyListener(ml);
   text.removeExtendedModifyListener(ml);
   text.removeControlListener(ml);
   text.removeKeyListener(ml);
   text.removeTraverseListener(ml);
   text.removeMouseListener(ml);
   text.removeSelectionListener(ml);
   ScrollBar sb = text.getVerticalBar();
   if (sb != null) sb.removeSelectionListener(ml);
   baseEditor = null;
 }