src/main/java/com/spinyowl/legui/component/misc/listener/splitpanel/SplitPanelSeparatorListenerDelegate.java
@Override
  public void process(Event event) {
    if (!event.getTargetComponent().equals(splitPanel.getSeparator())) {
      return;
    }

    if (event instanceof MouseClickEvent) {
      MouseClickEvent e = (MouseClickEvent) event;
      if (e.getAction() == PRESS) {
        dragging = true;
      }
      if (e.getAction() == RELEASE) {
        dragging = false;
        CursorServiceProvider.getInstance().setCursor(Cursor.ARROW, e.getContext());
      }
    }

    if (event instanceof CursorEnterEvent) {
      CursorEnterEvent e = (CursorEnterEvent) event;
      Orientation orientation = splitPanel.getOrientation();
      if (e.isEntered() && orientation == HORIZONTAL) {
        CursorServiceProvider.getInstance().setCursor(Cursor.H_RESIZE, e.getContext());
      } else if (e.isEntered() && orientation != HORIZONTAL) {
        CursorServiceProvider.getInstance().setCursor(Cursor.V_RESIZE, e.getContext());
      } else if (!dragging) {
        CursorServiceProvider.getInstance().setCursor(Cursor.ARROW, e.getContext());
      }
    }
  }
/**
   * Used to handle specific event.
   *
   * @param event event to handle.
   */
Used to handle specific event.
@param event event to handle.
Used to handle specific event . @param event event to handle .
@Override
  public void process(Event event) {
    if (!event.getTargetComponent().equals(splitPanel.getSeparator())) {
      return;
    }
    if (event instanceof MouseClickEvent) {
      MouseClickEvent e = (MouseClickEvent) event;
      if (e.getAction() == PRESS) {
        dragging = true;
      }
      if (e.getAction() == RELEASE) {
        dragging = false;
        CursorServiceProvider.getInstance().setCursor(Cursor.ARROW, e.getContext());
      }
    }
    if (event instanceof CursorEnterEvent) {
      CursorEnterEvent e = (CursorEnterEvent) event;
      Orientation orientation = splitPanel.getOrientation();
      if (e.isEntered() && orientation == HORIZONTAL) {
        CursorServiceProvider.getInstance().setCursor(Cursor.H_RESIZE, e.getContext());
      } else if (e.isEntered() && orientation != HORIZONTAL) {
        CursorServiceProvider.getInstance().setCursor(Cursor.V_RESIZE, e.getContext());
      } else if (!dragging) {
        CursorServiceProvider.getInstance().setCursor(Cursor.ARROW, e.getContext());
      }
    }
  }
@ Override public void process ( Event event ) { if ( ! event . getTargetComponent ( ) . equals ( splitPanel . getSeparator ( ) ) ) { return ; } if ( event instanceof MouseClickEvent ) { MouseClickEvent e = ( MouseClickEvent ) event ; if ( e . getAction ( ) == PRESS ) { dragging = true ; } if ( e . getAction ( ) == RELEASE ) { dragging = false ; CursorServiceProvider . getInstance ( ) . setCursor ( Cursor . ARROW , e . getContext ( ) ) ; } } if ( event instanceof CursorEnterEvent ) { CursorEnterEvent e = ( CursorEnterEvent ) event ; Orientation orientation = splitPanel . getOrientation ( ) ; if ( e . isEntered ( ) && orientation == HORIZONTAL ) { CursorServiceProvider . getInstance ( ) . setCursor ( Cursor . H_RESIZE , e . getContext ( ) ) ; } else if ( e . isEntered ( ) && orientation != HORIZONTAL ) { CursorServiceProvider . getInstance ( ) . setCursor ( Cursor . V_RESIZE , e . getContext ( ) ) ; } else if ( ! dragging ) { CursorServiceProvider . getInstance ( ) . setCursor ( Cursor . ARROW , e . getContext ( ) ) ; } } }
Used to handle specific event.
Used to handle specific event .