本文整理了Java中javax.swing.JTextPane.getCursor()
方法的一些代码示例,展示了JTextPane.getCursor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.getCursor()
方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称:JTextPane
方法名:getCursor
暂无
代码示例来源:origin: blurpy/kouchat
/**
* Updates the mouse cursor when hovering over a link.
*
* {@inheritDoc}
*/
@Override
public void mouseMoved(final MouseEvent e) {
final int mousePos = textPane.viewToModel(e.getPoint());
final AttributeSet attr = doc.getCharacterElement(mousePos).getAttributes();
if (StyleConstants.isUnderline(attr)) {
if (textPane.getCursor() != handCursor) {
textPane.setCursor(handCursor);
}
}
else {
if (textPane.getCursor() == handCursor) {
textPane.setCursor(null);
}
}
}
代码示例来源:origin: net.imagej/imagej-ui-swing
normalCursor = textPane.getCursor();
handCursor = new Cursor(Cursor.HAND_CURSOR);
textPane.setEditable(false);
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
if (editor.getCursor().getType() != Cursor.HAND_CURSOR) {
editor.setCursor(new Cursor(Cursor.HAND_CURSOR));
if (editor.getCursor().getType() != Cursor.DEFAULT_CURSOR) {
editor.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
代码示例来源:origin: realXuJiang/bigtable-sql
if (editor.getCursor().getType() != Cursor.HAND_CURSOR) {
editor.setCursor(new Cursor(Cursor.HAND_CURSOR));
if (editor.getCursor().getType() != Cursor.DEFAULT_CURSOR) {
editor.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
内容来源于网络,如有侵权,请联系作者删除!