src/main/java/com/spinyowl/legui/component/misc/listener/textarea/TextAreaFieldDragEventListener.java
@Override
  public void process(MouseDragEvent event) {
    TextAreaField textAreaField = (TextAreaField) event.getTargetComponent();
    if (MOUSE_BUTTON_LEFT.isPressed()) {
      int mouseCaretPosition = textAreaField.getMouseCaretPosition();
      textAreaField.setCaretPosition(mouseCaretPosition);
      textAreaField.setEndSelectionIndex(mouseCaretPosition);

      EventProcessorProvider.getInstance().pushEvent(
          new TextAreaFieldUpdateEvent(textAreaField, event.getContext(), event.getFrame()));
    }
  }
/**
   * Used to handle {@link MouseDragEvent}.
   *
   * @param event event to handle.
   */
Used to handle  MouseDragEvent.
@param event event to handle.
Used to handle MouseDragEvent . @param event event to handle .
@Override
  public void process(MouseDragEvent event) {
    TextAreaField textAreaField = (TextAreaField) event.getTargetComponent();
    if (MOUSE_BUTTON_LEFT.isPressed()) {
      int mouseCaretPosition = textAreaField.getMouseCaretPosition();
      textAreaField.setCaretPosition(mouseCaretPosition);
      textAreaField.setEndSelectionIndex(mouseCaretPosition);
      EventProcessorProvider.getInstance().pushEvent(
          new TextAreaFieldUpdateEvent(textAreaField, event.getContext(), event.getFrame()));
    }
  }
@ Override public void process ( MouseDragEvent event ) { TextAreaField textAreaField = ( TextAreaField ) event . getTargetComponent ( ) ; if ( MOUSE_BUTTON_LEFT . isPressed ( ) ) { int mouseCaretPosition = textAreaField . getMouseCaretPosition ( ) ; textAreaField . setCaretPosition ( mouseCaretPosition ) ; textAreaField . setEndSelectionIndex ( mouseCaretPosition ) ; EventProcessorProvider . getInstance ( ) . pushEvent ( new TextAreaFieldUpdateEvent ( textAreaField , event . getContext ( ) , event . getFrame ( ) ) ) ; } }
Used to handle {@link MouseDragEvent}.
Used to handle { @link MouseDragEvent } .