コード例 #1
0
  public void mouseExited(MouseEvent e) {
    Object source = e.getSource();
    if (!(source instanceof JLabel)) return;

    if (!tokenMode && !correctionTokenMode) {
      // tile mode
      HexLabel tile = (HexLabel) e.getSource();
      tile.setToolTipText(null);
    }
  }
コード例 #2
0
  public void mouseEntered(MouseEvent e) {
    Object source = e.getSource();
    if (!(source instanceof JLabel)) return;

    if (!tokenMode && !correctionTokenMode) {
      // tile mode
      HexLabel tile = (HexLabel) e.getSource();
      String tooltip = tile.getToolTip();
      if (tooltip != "") {
        tile.setToolTipText(tooltip);
      }
    }
  }