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

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

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

JTextArea.setCursor介绍

暂无

代码示例

代码示例来源:origin: ron190/jsql-injection

/**
 * Build new instance of JTextArea to decorate.
 */
public JPopupTextArea(JTextArea proxy) {
  super(proxy);
  this.getProxy().addFocusListener(new FocusAdapter() {
    @Override
    public void focusGained(FocusEvent arg0) {
      JPopupTextArea.this.getProxy().getCaret().setVisible(true);
      JPopupTextArea.this.getProxy().getCaret().setSelectionVisible(true);
    }
  });
  this.getProxy().setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
  this.getProxy().setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
}

代码示例来源:origin: igniterealtime/Spark

public void mouseExited(MouseEvent e) {
    message.setCursor(DEFAULT_CURSOR);
    setCursor(DEFAULT_CURSOR);
  }
}

代码示例来源:origin: igniterealtime/Spark

public void mouseEntered(MouseEvent e) {
  message.setCursor(HAND_CURSOR);
  setCursor(HAND_CURSOR);
}

代码示例来源:origin: MrCrayfish/ModelCreator

private static JScrollPane getScrollableMessage()
{
  String message = "Thank you for downloading my program. I hope it encourages" + " you to create awesome models. If you do create something awesome, I" + " would love to see it. You can post your screenshots to me via Twitter" + " or Facebook. If you are unsure how to use anything works, hover your " + "mouse over the component and it will tell you what it does." + "\n\n" + "I've put a lot of work into this program, so if you are " + "feeling generous, you can donate by clicking the button below. Thank you!" + "";
  JTextArea textArea = new JTextArea(message);
  textArea.setEditable(false);
  textArea.setCursor(null);
  textArea.setFocusable(false);
  textArea.setBorder(null);
  textArea.setOpaque(false);
  textArea.setLineWrap(true);
  textArea.setWrapStyleWord(true);
  JScrollPane scrollPane = new JScrollPane(textArea);
  scrollPane.setBorder(null);
  return scrollPane;
}

代码示例来源:origin: protegeproject/protege

public void run() {
    int estimatedTextSize = estimateRenderedTextLength(activeOntology);
    TextAreaWriter textAreaWriter = new TextAreaWriter(this, textArea, estimatedTextSize);
    Writer w = new BufferedWriter(textAreaWriter);
    try {
      renderOntology(activeOntology, w);
      w.close();
    } catch (InterruptedIOException ioe) {
      // ignore
    } catch (Exception e) {
      logger.error("error rendering ontology", e);
    } finally {
      synchronized (textArea) {
        try {
          SwingUtilities.invokeAndWait(() -> {
            textArea.setCursor(oldCursor);
            logger.debug("set text done");
          });
        } catch (InterruptedException | InvocationTargetException e) {
          // ignore
        }
        renderThread = null;
      }
    }
  }
};

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

textArea.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
clearText();
renderThread = new Thread() {

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

public void run() {
    int estimatedTextSize = estimateRenderedTextLength(activeOntology);
    TextAreaWriter textAreaWriter = new TextAreaWriter(this, textArea, estimatedTextSize);
    Writer w = new BufferedWriter(textAreaWriter);
    try {
      renderOntology(activeOntology, w);
      w.close();
    } catch (InterruptedIOException ioe) {
      // ignore
    } catch (Exception e) {
      logger.error("error rendering ontology", e);
    } finally {
      synchronized (textArea) {
        try {
          SwingUtilities.invokeAndWait(() -> {
            textArea.setCursor(oldCursor);
            logger.debug("set text done");
          });
        } catch (InterruptedException | InvocationTargetException e) {
          // ignore
        }
        renderThread = null;
      }
    }
  }
};

代码示例来源:origin: protegeproject/protege

textArea.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
clearText();
renderThread = new Thread() {

代码示例来源:origin: org.cytoscape/network-analyzer-impl

texOutput.setMargin(new Insets(5, 5, 5, 5));
texOutput.setEditable(false);
texOutput.setCursor(null);
texOutput.setFont(labTitle.getFont());
JPanel panConsole = new JPanel(new BorderLayout(0, 0));

代码示例来源:origin: ata4/bspsrc

errorTextArea.setRows(1);
errorTextArea.setWrapStyleWord(true);
errorTextArea.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
errorScrollPane.setViewportView(errorTextArea);

代码示例来源:origin: syedlopez/proguard

public void run()
  consoleTextArea.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
  consoleTextArea.setText("");
  consoleTextArea.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
  consoleTextArea.setCaretPosition(0);

代码示例来源:origin: org.activecomponents.jadex/jadex-commons-gui

msg.setCursor(null);  
msg.setOpaque(false);

代码示例来源:origin: syedlopez/proguard

public void run()
  consoleTextArea.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
  consoleTextArea.setText("");
  consoleTextArea.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));

代码示例来源:origin: kasonyang/kalang

codeArea.setRows(5);
codeArea.setCaretColor(new java.awt.Color(255, 255, 255));
codeArea.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
codeArea.setMargin(new java.awt.Insets(5, 5, 5, 5));
jScrollPane1.setViewportView(codeArea);

代码示例来源:origin: edu.illinois.lis/indri

Cursor def = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
setCursor(wait);
messages.setCursor(wait);
bl.interrupt();
setCursor(def);
messages.setCursor(def);
status.setText("Finished building " + iname.getText());
messages.append("Finished building " + iname.getText() + "\n");

代码示例来源:origin: org.activecomponents.jadex/jadex-runtimetools-swing

msg.setCursor(null);  
msg.setOpaque(false);

代码示例来源:origin: net.sourceforge.jadex/jadex-runtimetools-swing

msg.setCursor(null);  
msg.setOpaque(false);

代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client

ta.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
ta.setEditable(false);

代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client

ta.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
ta.setEditable(false);

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui

jtpSource.getDocument().addDocumentListener(this);
jtpSource.addFocusListener(this);
jtpSource.setCursor(new Cursor(Cursor.TEXT_CURSOR));

相关文章

JTextArea类方法