javafx.scene.control.TextInputControl#removeEventFilter ( )源码实例Demo

下面列出了javafx.scene.control.TextInputControl#removeEventFilter ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: phoebus   文件: XPasteBuffer.java
/** @param field Text field from which middle-button-paste will be removed */
public static void removeMiddleClickPaste(final TextInputControl field)
{
    if (XPasteBuffer.is_supported)
        field.removeEventFilter(MouseEvent.MOUSE_PRESSED, middle_click);
}
 
源代码2 项目: phoebus   文件: AutocompleteMenu.java
/** Detach a previously attached field from the completion menu.
 *
 *  <p>In the rare case where the completion is no longer desired,
 *  while the text field is still in the UI,
 *  call this method.
 *
 *  <p>It is <b>not</b> necessary to 'detach' whenever the text field vanishes,
 *  for example when a panel is closed.
 *  In that case, the vanished text field will simply no longer send events
 *  that trigger the menu.
 *
 *  @param field Field for which completion is no longer desired
 */
public void detachField(final TextInputControl field)
{
    field.focusedProperty().removeListener(focused_listener);
    field.removeEventFilter(KeyEvent.KEY_RELEASED, key_released_filter);
    field.removeEventFilter(KeyEvent.KEY_PRESSED, key_pressed_filter);
    XPasteBuffer.removeMiddleClickPaste(field);
}