src/main/java/com/spinyowl/legui/component/misc/listener/textinput/TextInputMouseClickEventListener.java
@Override
  public void process(MouseClickEvent event) {
    TextInput gui = (TextInput) event.getTargetComponent();
    int mouseCaretPosition = gui.getMouseCaretPosition();
    if (event.getAction() == MouseClickEvent.MouseClickAction.PRESS) {
      gui.setCaretPosition(mouseCaretPosition);
      gui.setEndSelectionIndex(mouseCaretPosition);
      if (!event.isModShift()) {
        gui.setStartSelectionIndex(mouseCaretPosition);
      }
    }
  }
/**
   * 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) {
    TextInput gui = (TextInput) event.getTargetComponent();
    int mouseCaretPosition = gui.getMouseCaretPosition();
    if (event.getAction() == MouseClickEvent.MouseClickAction.PRESS) {
      gui.setCaretPosition(mouseCaretPosition);
      gui.setEndSelectionIndex(mouseCaretPosition);
      if (!event.isModShift()) {
        gui.setStartSelectionIndex(mouseCaretPosition);
      }
    }
  }
@ Override public void process ( MouseClickEvent event ) { TextInput gui = ( TextInput ) event . getTargetComponent ( ) ; int mouseCaretPosition = gui . getMouseCaretPosition ( ) ; if ( event . getAction ( ) == MouseClickEvent . MouseClickAction . PRESS ) { gui . setCaretPosition ( mouseCaretPosition ) ; gui . setEndSelectionIndex ( mouseCaretPosition ) ; if ( ! event . isModShift ( ) ) { gui . setStartSelectionIndex ( mouseCaretPosition ) ; } } }
Used to handle {@link MouseClickEvent}.
Used to handle { @link MouseClickEvent } .