@Override
 public void mouseMoved(MouseEvent evt) {
   JTableHeader header = (JTableHeader) evt.getSource();
   JTable table = header.getTable();
   TableColumnModel colModel = table.getColumnModel();
   int vColIndex = colModel.getColumnIndexAtX(evt.getX());
   TableColumn col = null;
   if (vColIndex >= 0) {
     col = colModel.getColumn(table.convertColumnIndexToModel(vColIndex));
   }
   if (table.convertColumnIndexToModel(vColIndex) != curCol) {
     if (col != null) {
       MageFrame.getInstance().getBalloonTip().setAttachedComponent(header);
       JLabel content = new JLabel(tips.get(table.convertColumnIndexToModel(vColIndex)));
       content.setFont(GUISizeHelper.tooltipFont);
       MageFrame.getInstance().getBalloonTip().setContents(content);
       ToolTipUtils.balloonToToolTip(MageFrame.getInstance().getBalloonTip(), 600, 10000);
     } else {
       MageFrame.getInstance().getBalloonTip().setTextContents("");
     }
     curCol = table.convertColumnIndexToModel(vColIndex);
   }
 }
Beispiel #2
0
 private void showImage(int row) {
   CardView card = view.get(row);
   if (!card.getId().equals(bigCard.getCardId())) {
     if (!MageFrame.isLite()) {
       Image image = Plugins.getInstance().getOriginalImage(card);
       if (image != null && image instanceof BufferedImage) {
         // XXX: scaled to fit width
         bigCard.setCard(card.getId(), EnlargeMode.NORMAL, image, new ArrayList<String>(), false);
       } else {
         drawCardText(card);
       }
     } else {
       drawCardText(card);
     }
   }
 }
Beispiel #3
0
 private void btnRightActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnRightActionPerformed
   this.selected = true;
   if (connectedDialog != null) {
     connectedDialog.hideDialog();
   }
   if (mode == FeedbackMode.SELECT
       && (evt.getModifiers() & ActionEvent.CTRL_MASK) == ActionEvent.CTRL_MASK) {
     session.sendPlayerInteger(gameId, 0);
   } else if (mode == FeedbackMode.END) {
     MageFrame.getGame(gameId).hideGame();
   } else {
     session.sendPlayerBoolean(gameId, false);
   }
   // AudioManager.playButtonOk();
 } // GEN-LAST:event_btnRightActionPerformed
Beispiel #4
0
 public void init(UUID gameId) {
   this.gameId = gameId;
   session = MageFrame.getSession();
 }