Browse Source

Merge pull request #433 in DESIGN/design from ~ALEX.SUNG/design:feature/10.0 to feature/10.0

REPORT-10931 最后的去论坛提问,鼠标移上去要显示成小手的状态

* commit '1908b24e1958c116106a81e83ef6b7eca149cc7d':
  鼠标移到去论坛提问,变成小手状 去论坛提问改为单击跳转
research/10.0
Alex.Sung 6 years ago
parent
commit
dc452e45e6
  1. 21
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

21
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -67,6 +67,7 @@ import javax.swing.event.ListSelectionListener;
import java.awt.AWTEvent;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;
@ -83,6 +84,7 @@ import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
@ -1161,6 +1163,8 @@ public class AlphaFineDialog extends UIDialog {
} else if (e.getClickCount() == 1) {
if (selectedValue instanceof MoreModel && ((MoreModel) selectedValue).isNeedMore()) {
dealWithMoreOrLessResult(selectedIndex, (MoreModel) selectedValue);
}else if(selectedValue instanceof BottomModel){
dealWithSearchResult(selectedValue);
}
}
}
@ -1175,6 +1179,23 @@ public class AlphaFineDialog extends UIDialog {
}
});
addMouseMotionListener(new MouseMotionListener() {
@Override
public void mouseMoved(MouseEvent e) {
final int x = e.getX();
final int y = e.getY();
final Rectangle cellBounds = getCellBounds(getModel().getSize() - 1, getModel().getSize() - 1);
if (cellBounds != null && cellBounds.contains(x, y)) {
setCursor(new Cursor(Cursor.HAND_CURSOR));
} else {
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
}
@Override
public void mouseDragged(MouseEvent e) {
}
});
addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {

Loading…
Cancel
Save