本文整理了Java中java.awt.Cursor.<init>()
方法的一些代码示例,展示了Cursor.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cursor.<init>()
方法的具体详情如下:
包路径:java.awt.Cursor
类名称:Cursor
方法名:<init>
[英]Creates a new cursor object with the specified type.
[中]创建具有指定类型的新游标对象。
代码示例来源:origin: skylot/jadx
@Override
public void mouseExited(MouseEvent arg0) {
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
代码示例来源:origin: skylot/jadx
@Override
public void mouseEntered(MouseEvent arg0) {
setCursor(new Cursor(Cursor.HAND_CURSOR));
}
代码示例来源:origin: deathmarine/Luyten
@Override
public void run() {
textArea.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
});
代码示例来源:origin: runelite/runelite
@Override
public void mouseEntered(MouseEvent e)
{
avatarAndRight.setBackground(hoverColor);
avatarAndRight.setCursor(new Cursor(Cursor.HAND_CURSOR));
}
代码示例来源:origin: runelite/runelite
@Override
public void mouseExited(MouseEvent e)
{
avatarAndRight.setBackground(backgroundColor);
avatarAndRight.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
代码示例来源:origin: runelite/runelite
@Override
public void mouseEntered(MouseEvent e)
{
container.setBackground(hoverColor);
textContainer.setBackground(hoverColor);
container.setCursor(new Cursor(Cursor.HAND_CURSOR));
}
代码示例来源:origin: runelite/runelite
@Override
public void mouseExited(MouseEvent e)
{
container.setBackground(ColorScheme.DARKER_GRAY_COLOR);
textContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR);
container.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
});
代码示例来源:origin: runelite/runelite
@Override
public void mouseEntered(MouseEvent e)
{
for (JPanel panel : panels)
{
matchComponentBackground(panel, ColorScheme.DARK_GRAY_HOVER_COLOR);
}
setCursor(new Cursor(Cursor.HAND_CURSOR));
}
代码示例来源:origin: runelite/runelite
@Override
public void mouseExited(MouseEvent e)
{
for (JPanel panel : panels)
{
matchComponentBackground(panel, background);
}
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
代码示例来源:origin: SonarSource/sonarqube
@Override
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) componentTree.getLastSelectedPathComponent();
if (node == null) {
// Nothing is selected.
return;
}
frame.setCursor(new Cursor(Cursor.WAIT_CURSOR));
updateDetails((Component) node.getUserObject());
frame.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
代码示例来源:origin: runelite/runelite
@Override
public void mouseExited(MouseEvent e)
{
setBackground(ColorScheme.DARKER_GRAY_COLOR);
textContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR);
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
});
代码示例来源:origin: runelite/runelite
@Override
public void mouseEntered(MouseEvent e)
{
setBackground(HOVER_COLOR);
textContainer.setBackground(HOVER_COLOR);
setCursor(new Cursor(Cursor.HAND_CURSOR));
}
代码示例来源:origin: deathmarine/Luyten
String project = "https://github.com/deathmarine/Luyten/";
JLabel link = new JLabel("<HTML><FONT color=\"#000099\"><U>" + project + "</U></FONT></HTML>");
link.setCursor(new Cursor(Cursor.HAND_CURSOR));
link.addMouseListener(new LinkListener(project, link));
pane.add(link);
String procyon = "https://bitbucket.org/mstrobel/procyon";
link = new JLabel("<HTML><FONT color=\"#000099\"><U>" + procyon + "</U></FONT></HTML>");
link.setCursor(new Cursor(Cursor.HAND_CURSOR));
link.addMouseListener(new LinkListener(procyon, link));
pane.add(link);
String rsyntax = "https://github.com/bobbylight/RSyntaxTextArea";
link = new JLabel("<HTML><FONT color=\"#000099\"><U>" + rsyntax + "</U></FONT></HTML>");
link.setCursor(new Cursor(Cursor.HAND_CURSOR));
link.addMouseListener(new LinkListener(rsyntax, link));
pane.add(link);
代码示例来源:origin: deathmarine/Luyten
final String issue = "https://github.com/deathmarine/Luyten/issues";
final JLabel link = new JLabel("<HTML>Submit to <FONT color=\"#000099\"><U>" + issue + "</U></FONT></HTML>");
link.setCursor(new Cursor(Cursor.HAND_CURSOR));
link.addMouseListener(new MouseAdapter() {
@Override
代码示例来源:origin: stackoverflow.com
assert ml != null;
c.setText(htmlIfy(linkIfy(c.getText())));
c.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
c.addMouseListener(ml);
代码示例来源:origin: RipMeApp/ripme
configSaveDirLabel.setText(workingDir);
configSaveDirLabel.setForeground(Color.BLUE);
configSaveDirLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
} catch (Exception e) { }
configSaveDirLabel.setToolTipText(configSaveDirLabel.getText());
代码示例来源:origin: stackoverflow.com
setContentAreaFilled(false);
setBorder(null);
setCursor(new Cursor(Cursor.HAND_CURSOR));
代码示例来源:origin: deathmarine/Luyten
@Override
public synchronized void mouseMoved(MouseEvent e) {
String linkText = null;
boolean isLinkLabel = false;
boolean isCtrlDown = (e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0;
if (isCtrlDown) {
linkText = createLinkLabel(e);
isLinkLabel = linkText != null;
}
if (isCtrlDown && isWaitForLinksCursor) {
textArea.setCursor(new Cursor(Cursor.WAIT_CURSOR));
} else if (textArea.getCursor().getType() == Cursor.WAIT_CURSOR) {
textArea.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
JLabel label = OpenFile.this.mainWindow.getLabel();
if (isLinkLabel && isLinkLabelPrev) {
if (!linkText.equals(prevLinkText)) {
setLinkLabel(label, linkText);
}
} else if (isLinkLabel && !isLinkLabelPrev) {
setLinkLabel(label, linkText);
} else if (!isLinkLabel && isLinkLabelPrev) {
setLinkLabel(label, null);
}
isLinkLabelPrev = isLinkLabel;
prevLinkText = linkText;
}
代码示例来源:origin: magefree/mage
private void refreshDeck(boolean useLayout) {
try {
setCursor(new Cursor(Cursor.WAIT_CURSOR));
this.txtDeckName.setText(deck.getName());
deckArea.loadDeck(deck, useLayout, bigCard);
} finally {
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
}
代码示例来源: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));
}
}
内容来源于网络,如有侵权,请联系作者删除!