javax.swing.JDesktopPane.setCursor()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中javax.swing.JDesktopPane.setCursor()方法的一些代码示例,展示了JDesktopPane.setCursor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDesktopPane.setCursor()方法的具体详情如下:
包路径:javax.swing.JDesktopPane
类名称:JDesktopPane
方法名:setCursor

JDesktopPane.setCursor介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

private void checkboxRedowloadChanged(ItemEvent event) {
  MageFrame.getDesktop().setCursor(new Cursor(Cursor.WAIT_CURSOR));
  try {
    this.cardsMissing.clear();
    this.cardsMissing = prepareMissingCards(this.cardsAll, uiDialog.getRedownloadCheckbox().isSelected());
    reloadCardsToDownload(uiDialog.getSetsCombo().getSelectedItem().toString());
  } finally {
    MageFrame.getDesktop().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  }
}

代码示例来源:origin: magefree/mage

if (ret == JFileChooser.APPROVE_OPTION) {
  File file = fcImportDeck.getSelectedFile();
  MageFrame.getDesktop().setCursor(new Cursor(Cursor.WAIT_CURSOR));
  try {
    DeckImporter importer = DeckImporter.getDeckImporter(file.getPath());
    logger.fatal(ex);
  } finally {
    MageFrame.getDesktop().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

代码示例来源:origin: magefree/mage

MageFrame.getDesktop().setCursor(new Cursor(Cursor.WAIT_CURSOR));
try {
  Deck newDeck = null;
  JOptionPane.showMessageDialog(MageFrame.getDesktop(), ex.getMessage(), "Error loading deck", JOptionPane.ERROR_MESSAGE);
} finally {
  MageFrame.getDesktop().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

代码示例来源:origin: magefree/mage

fileName += ".dck";
  MageFrame.getDesktop().setCursor(new Cursor(Cursor.WAIT_CURSOR));
  DeckCardLists cardLists = deck.getDeckCardLists();
  cardLists.setCardLayout(deckArea.getCardLayout());
  JOptionPane.showMessageDialog(MageFrame.getDesktop(), ex.getMessage() + "\nTry ensuring that the selected directory is writable.", "Error saving deck", JOptionPane.ERROR_MESSAGE);
} finally {
  MageFrame.getDesktop().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

代码示例来源:origin: magefree/mage

@Override
  public void windowClosed(WindowEvent e) {
    Deck newDeck = null;
    StringBuilder errorMessages = new StringBuilder();
    MageFrame.getDesktop().setCursor(new Cursor(Cursor.WAIT_CURSOR));
    try {
      newDeck = Deck.load(DeckImporter.importDeckFromFile(dialog.getTmpPath(), errorMessages), true, true);
      processAndShowImportErrors(errorMessages);
      if (newDeck != null) {
        deck = newDeck;
        refreshDeck();
      }
    } catch (GameException e1) {
      JOptionPane.showMessageDialog(MageFrame.getDesktop(), e1.getMessage(), "Error loading deck", JOptionPane.ERROR_MESSAGE);
    } finally {
      MageFrame.getDesktop().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    }
  }
});

代码示例来源:origin: magefree/mage

@Override
  public void windowClosed(WindowEvent e) {
    Deck deckToAppend = null;
    StringBuilder errorMessages = new StringBuilder();
    MageFrame.getDesktop().setCursor(new Cursor(Cursor.WAIT_CURSOR));
    try {
      deckToAppend = Deck.load(DeckImporter.importDeckFromFile(dialog.getTmpPath(), errorMessages), true, true);
      processAndShowImportErrors(errorMessages);
      if (deckToAppend != null) {
        deck = Deck.append(deckToAppend, deck);
        refreshDeck();
      }
    } catch (GameException e1) {
      JOptionPane.showMessageDialog(MageFrame.getDesktop(), e1.getMessage(), "Error loading deck", JOptionPane.ERROR_MESSAGE);
    } finally {
      MageFrame.getDesktop().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    }
  }
});

代码示例来源:origin: magefree/mage

private void btnGenDeckActionPerformed(ActionEvent evt) {
  try {
    MageFrame.getDesktop().setCursor(new Cursor(Cursor.WAIT_CURSOR));
    String path = DeckGenerator.generateDeck();
    deck = Deck.load(DeckImporter.importDeckFromFile(path), true, true);
  } catch (GameException ex) {
    JOptionPane.showMessageDialog(MageFrame.getDesktop(), ex.getMessage(), "Error loading generated deck", JOptionPane.ERROR_MESSAGE);
  } catch (DeckGeneratorException ex) {
    JOptionPane.showMessageDialog(MageFrame.getDesktop(), ex.getMessage(), "Generator error", JOptionPane.ERROR_MESSAGE);
  } finally {
    MageFrame.getDesktop().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  }
  refreshDeck();
}
// Variables declaration - do not modify//GEN-BEGIN:variables

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setCursor(Cursor aCursor) {
  super.setCursor(aCursor);
}

相关文章