javax.swing.text.Caret.setBlinkRate()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(192)

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

Caret.setBlinkRate介绍

暂无

代码示例

代码示例来源:origin: groovy/groovy-core

overtypeCaret.setBlinkRate(defaultCaret.getBlinkRate());

代码示例来源:origin: bobbylight/RSyntaxTextArea

/**
 * Returns the default caret for an <code>RTextArea</code>.  This caret is
 * capable of displaying itself differently for insert/overwrite modes.
 *
 * @return The caret.
 */
@Override
protected Caret createCaret() {
  Caret caret = new ConfigurableCaret();
  caret.setBlinkRate(500);
  return caret;
}

代码示例来源:origin: com.fifesoft/rsyntaxtextarea

/**
 * Returns the default caret for an <code>RTextArea</code>.  This caret is
 * capable of displaying itself differently for insert/overwrite modes.
 *
 * @return The caret.
 */
@Override
protected Caret createCaret() {
  Caret caret = new ConfigurableCaret();
  caret.setBlinkRate(500);
  return caret;
}

代码示例来源:origin: org.nuiton.thirdparty/rsyntaxtextarea

/**
 * Returns the default caret for an <code>RTextArea</code>.  This caret is
 * capable of displaying itself differently for insert/overwrite modes.
 *
 * @return The caret.
 */
protected Caret createCaret() {
  Caret caret = new ConfigurableCaret();
  caret.setBlinkRate(500);
  return caret;
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-editor

/**
 * Returns the default caret for an <code>RTextArea</code>.  This caret is
 * capable of displaying itself differently for insert/overwrite modes.
 *
 * @return The caret.
 */
protected Caret createCaret() {
  Caret caret = new ConfigurableCaret();
  caret.setBlinkRate(500);
  return caret;
}

代码示例来源:origin: org.zaproxy/zap

@Override
public void propertyChange(PropertyChangeEvent evt) {
  final String propertyName = evt.getPropertyName();
  if ("caret".equals(propertyName)) {
    removeListenersWithCaret((Caret) evt.getOldValue());
    setupWithCaret((Caret) evt.getNewValue());
  } else if ("editable".equals(propertyName)) {
    if (evt.getNewValue() == Boolean.TRUE) {
      textComponent.getCaret().setBlinkRate(caretBlinkRate);
    } else {
      textComponent.getCaret().setBlinkRate(0);
    }
  }
}

代码示例来源:origin: net.jradius/jradius-extended

public LogConsole(String defaultText) {
  this.defaultText = defaultText;
  setLayout(new BorderLayout());
  add(container, BorderLayout.CENTER);
  console.setEditable(false);
  console.getCaret().setBlinkRate(0);
  container.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  container.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
  container.getVerticalScrollBar().addAdjustmentListener(this);
  singleton = this;
}

代码示例来源:origin: com.hynnet/jradius-extended

public LogConsole(String defaultText) {
  this.defaultText = defaultText;
  setLayout(new BorderLayout());
  add(container, BorderLayout.CENTER);
  console.setEditable(false);
  console.getCaret().setBlinkRate(0);
  container.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  container.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
  container.getVerticalScrollBar().addAdjustmentListener(this);
  singleton = this;
}

代码示例来源:origin: coova/jradius

public LogConsole(String defaultText) {
  this.defaultText = defaultText;
  setLayout(new BorderLayout());
  add(container, BorderLayout.CENTER);
  console.setEditable(false);
  console.getCaret().setBlinkRate(0);
  container.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  container.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
  container.getVerticalScrollBar().addAdjustmentListener(this);
  singleton = this;
}

代码示例来源:origin: org.zaproxy/zap

private void setupWithCaret(Caret caret) {
  if (caret != null) {
    textComponent.addFocusListener(this);
    textComponent.addPropertyChangeListener("editable", this);
    caretBlinkRate = caret.getBlinkRate();
    if (!textComponent.isEditable()) {
      caret.setBlinkRate(0);
    }
  } else {
    caretBlinkRate = 0;
  }
}

代码示例来源:origin: leMaik/swing-material

/**
 * Initialize the default values of the field
 */
private void initMaterialFormattedTextField() {
  setBorder(null);
  setFont(Roboto.REGULAR.deriveFont(16f));
  floatingLabel.setText("");
  setCaret(new DefaultCaret() {
    @Override
    protected synchronized void damage(Rectangle r) {
      MaterialFormattedTextField.this.repaint(); //fix caret not being removed completely
    }
  });
  getCaret().setBlinkRate(500);
}

代码示例来源:origin: org.codehaus.groovy/groovy-console

overtypeCaret.setBlinkRate(defaultCaret.getBlinkRate());

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui

textPane.setEditable(false);
textPane.getCaret().setVisible(true);
textPane.getCaret().setBlinkRate(0);
textPane.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
setViewportView(textPane);

代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal

overtypeCaret.setBlinkRate(defaultCaret.getBlinkRate());

代码示例来源:origin: stackoverflow.com

caret.setBlinkRate( UIManager.getInt("TextField.caretBlinkRate") );

代码示例来源:origin: leMaik/swing-material

/**
 * Default constructor for {@code MaterialTextField}. A default model is
 * created and the initial string is empty.
 */
public MaterialTextField() {
  super();
  setBorder(null);
  setFont(Roboto.REGULAR.deriveFont(16f));
  floatingLabel.setText("");
  setOpaque(false);
  setBackground(MaterialColor.TRANSPARENT);
  setCaret(new DefaultCaret() {
    @Override
    protected synchronized void damage(Rectangle r) {
      MaterialTextField.this.repaint(); //fix caret not being removed completely
    }
  });
  getCaret().setBlinkRate(500);
}

代码示例来源:origin: leMaik/swing-material

/**
 * Creates a new password field.
 */
public MaterialPasswordField() {
  setBorder(null);
  setFont(getFont().deriveFont(16f)); //use default font, Roboto's bullet doesn't work on some platforms (i.e. Mac)
  floatingLabel.setText("");
  setOpaque(false);
  setBackground(MaterialColor.TRANSPARENT);
  setCaret(new DefaultCaret() {
    @Override
    protected synchronized void damage(Rectangle r) {
      MaterialPasswordField.this.repaint(); //fix caret not being removed completely
    }
  });
  getCaret().setBlinkRate(500);
}

代码示例来源:origin: net.java.abeille/abeille

caret.setBlinkRate(br);

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib

caret.setBlinkRate(br);

代码示例来源:origin: khuxtable/seaglass

Integer rate = (Integer) o;
caret.setBlinkRate(rate.intValue());

相关文章