@NotNull @Override public Cursor getCursor() { final boolean isVerticalCursor = myInfo.isDocked() ? myInfo.getAnchor().isSplitVertically() : myInfo.getAnchor().isHorizontal(); return isVerticalCursor ? Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR) : Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR); }
@Override public void mouseMoved(MouseEvent e) { if (isAboveLink(e) || isAboveRoots(e)) { setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else { performAction(e, GraphAction.Type.MOUSE_OVER); } }
@Override public void mouseMoved(MouseEvent e) { Component component = e.getComponent(); if (component != null) { if (getRootColumnOrNull(e) != null) { component.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else { component.setCursor(null); } } }
private static JLabel createArrow(final ActionLink link) { JLabel arrow = new JLabel(AllIcons.General.Combo3); arrow.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); arrow.setVerticalAlignment(SwingConstants.BOTTOM); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { final MouseEvent newEvent = MouseEventAdapter.convert(e, link, e.getX(), e.getY()); link.doClick(newEvent); return true; } }.installOn(arrow); return arrow; }
@Override public void mouseMoved(MouseEvent e) { if (isAboveLink(e)) { setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else { performAction( e, new PairFunction<Integer, Point, GraphAction>() { @Override public GraphAction fun(Integer row, Point point) { return new MouseOverAction(row, point); } }); } }
private void setWaitCursor() { myAlarm.addRequest(() -> setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)), 100); }