本文整理了Java中javax.swing.JEditorPane.getCursor()
方法的一些代码示例,展示了JEditorPane.getCursor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.getCursor()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:getCursor
暂无
代码示例来源:origin: JChemPaint/jchempaint
/**
* Follows the reference in an link. The given url is the requested reference.
* By default this calls <a href="#setPage">setPage</a> , and if an exception
* is thrown the original previous document is restored and a beep sounded. If
* an attempt was made to follow a link, but it represented a malformed url,
* this method will be called with a null argument.
*
*@param u the URL to follow
*/
protected void linkActivated(URL u)
{
Cursor c = html.getCursor();
Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
html.setCursor(waitCursor);
SwingUtilities.invokeLater(new PageLoader(u, c));
}
代码示例来源:origin: com.darwinsys/darwinsys-api
/**
* Notification of a change relative to a hyperlink.
* From: java.swing.event.HyperlinkListener
*/
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
URL target = e.getURL();
// System.out.println("linkto: " + target);
// Get the help panel's cursor and the wait cursor
Cursor oldCursor = help.getCursor();
Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
help.setCursor(waitCursor);
// Now arrange for the page to get loaded asynchronously,
// and the cursor to be set back to what it was.
SwingUtilities.invokeLater(new PageLoader(target, oldCursor));
}
}
代码示例来源:origin: IanDarwin/darwinsys-api
/**
* Notification of a change relative to a hyperlink.
* From: java.swing.event.HyperlinkListener
*/
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
URL target = e.getURL();
// System.out.println("linkto: " + target);
// Get the help panel's cursor and the wait cursor
Cursor oldCursor = help.getCursor();
Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
help.setCursor(waitCursor);
// Now arrange for the page to get loaded asynchronously,
// and the cursor to be set back to what it was.
SwingUtilities.invokeLater(new PageLoader(target, oldCursor));
}
}
代码示例来源:origin: javax.help/javahelp
Cursor c = html.getCursor();
Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
html.setCursor(waitCursor);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf-navigation
private void openPane(JEditorPane pane, NavigationCase navCase) {
final Cursor editCursor = pane.getCursor();
pane.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
pane.setCaretPosition(navCase.findPosition() + 2);
pane.setCursor(editCursor);
StatusDisplayer.getDefault().setStatusText(""); //NOI18N
}
代码示例来源:origin: freeplane/freeplane
@Override
public void mouseMoved(final MouseEvent ev) {
final String link = HtmlUtils.getURLOfExistingLink((HTMLDocument) tip.getDocument(), tip.viewToModel(ev.getPoint()));
boolean followLink = link != null;
Controller currentController = Controller.getCurrentController();
final int requiredCursor;
if(followLink){
currentController.getViewController().out(link);
requiredCursor = Cursor.HAND_CURSOR;
}
else{
requiredCursor = Cursor.DEFAULT_CURSOR;
}
if (tip.getCursor().getType() != requiredCursor) {
tip.setCursor(requiredCursor != Cursor.DEFAULT_CURSOR ? new Cursor(requiredCursor) : null);
}
}
内容来源于网络,如有侵权,请联系作者删除!