src/main/java/com/spinyowl/legui/component/misc/listener/textarea/TextAreaFieldMouseClickEventListener.java
@Override
  public void process(MouseClickEvent event) {
    TextAreaField textAreaField = (TextAreaField) event.getTargetComponent();
    if (event.getAction() == MouseClickEvent.MouseClickAction.PRESS) {
      int mouseCaretPosition = textAreaField.getMouseCaretPosition();
      textAreaField.setCaretPosition(mouseCaretPosition);
      textAreaField.setEndSelectionIndex(mouseCaretPosition);
      if (!event.isModShift()) {
        textAreaField.setStartSelectionIndex(mouseCaretPosition);
      }
    }
    if (event.getAction() == MouseClickAction.RELEASE) {
      EventProcessorProvider.getInstance().pushEvent(
          new TextAreaFieldUpdateEvent(textAreaField, event.getContext(), event.getFrame()));
    }
  }
/**
   * Used to handle {@link MouseClickEvent}.
   *
   * @param event event to handle.
   */
Used to handle  MouseClickEvent.
@param event event to handle.
Used to handle MouseClickEvent . @param event event to handle .
@Override
  public void process(MouseClickEvent event) {
    TextAreaField textAreaField = (TextAreaField) event.getTargetComponent();
    if (event.getAction() == MouseClickEvent.MouseClickAction.PRESS) {
      int mouseCaretPosition = textAreaField.getMouseCaretPosition();
      textAreaField.setCaretPosition(mouseCaretPosition);
      textAreaField.setEndSelectionIndex(mouseCaretPosition);
      if (!event.isModShift()) {
        textAreaField.setStartSelectionIndex(mouseCaretPosition);
      }
    }
    if (event.getAction() == MouseClickAction.RELEASE) {
      EventProcessorProvider.getInstance().pushEvent(
          new TextAreaFieldUpdateEvent(textAreaField, event.getContext(), event.getFrame()));
    }
  }
@ Override public void process ( MouseClickEvent event ) { TextAreaField textAreaField = ( TextAreaField ) event . getTargetComponent ( ) ; if ( event . getAction ( ) == MouseClickEvent . MouseClickAction . PRESS ) { int mouseCaretPosition = textAreaField . getMouseCaretPosition ( ) ; textAreaField . setCaretPosition ( mouseCaretPosition ) ; textAreaField . setEndSelectionIndex ( mouseCaretPosition ) ; if ( ! event . isModShift ( ) ) { textAreaField . setStartSelectionIndex ( mouseCaretPosition ) ; } } if ( event . getAction ( ) == MouseClickAction . RELEASE ) { EventProcessorProvider . getInstance ( ) . pushEvent ( new TextAreaFieldUpdateEvent ( textAreaField , event . getContext ( ) , event . getFrame ( ) ) ) ; } }
Used to handle {@link MouseClickEvent}.
Used to handle { @link MouseClickEvent } .