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

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

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

JTextArea.setUI介绍

暂无

代码示例

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

/**
 * Sets the UI for this <code>RTextArea</code>.  Note that, for instances
 * of <code>RTextArea</code>, <code>setUI</code> only updates the popup
 * menu; this is because <code>RTextArea</code>s' look and feels are
 * independent of the Java Look and Feel.  This method is here so
 * subclasses can set a UI (subclass of <code>RTextAreaUI</code>) if they
 * have to.
 *
 * @param ui The new UI.
 * @see #setUI
 */
protected void setRTextAreaUI(RTextAreaUI ui) {
  super.setUI(ui);
  // Workaround as setUI makes the text area opaque, even if we don't
  // want it to be.
  setOpaque(getBackgroundObject() instanceof Color);
}

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

static void decorate(JTextArea a, final BufferedImage img) {
  a.setUI(new javax.swing.plaf.basic.BasicTextAreaUI() {
    @Override
    protected void paintBackground(Graphics g) {
      g.drawImage(img, 0, 0, null);
    }
  });

  a.setPreferredSize(new Dimension(img.getWidth(), img.getHeight()));
  a.setForeground(Color.white);
  a.setCaretColor(Color.lightGray);
}

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

/**
 * Sets the UI for this <code>RTextArea</code>.  Note that, for instances
 * of <code>RTextArea</code>, <code>setUI</code> only updates the popup
 * menu; this is because <code>RTextArea</code>s' look and feels are
 * independent of the Java Look and Feel.  This method is here so
 * subclasses can set a UI (subclass of <code>RTextAreaUI</code>) if they
 * have to.
 *
 * @param ui The new UI.
 * @see #setUI
 */
protected void setRTextAreaUI(RTextAreaUI ui) {
  super.setUI(ui);
  // Workaround as setUI makes the text area opaque, even if we don't
  // want it to be.
  setOpaque(getBackgroundObject() instanceof Color);
}

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

/**
 * Sets the UI for this <code>RTextArea</code>.  Note that, for instances
 * of <code>RTextArea</code>, <code>setUI</code> only updates the popup
 * menu; this is because <code>RTextArea</code>s' look and feels are
 * independent of the Java Look and Feel.  This method is here so
 * subclasses can set a UI (subclass of <code>RTextAreaUI</code>) if they
 * have to.
 *
 * @param ui The new UI.
 * @see #setUI
 */
protected void setRTextAreaUI(RTextAreaUI ui) {
  super.setUI(ui);
  // Workaround as setUI makes the text area opaque, even if we don't
  // want it to be.
  setOpaque(getBackgroundObject() instanceof Color);
}

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

/**
 * Sets the UI for this <code>RTextArea</code>.  Note that, for instances
 * of <code>RTextArea</code>, <code>setUI</code> only updates the popup
 * menu; this is because <code>RTextArea</code>s' look and feels are
 * independent of the Java Look and Feel.  This method is here so
 * subclasses can set a UI (subclass of <code>RTextAreaUI</code>) if they
 * have to.
 *
 * @param ui The new UI.
 * @see #setUI
 */
protected void setRTextAreaUI(RTextAreaUI ui) {
  super.setUI(ui);
  // Workaround as setUI makes the text area opaque, even if we don't
  // want it to be.
  setOpaque(getBackgroundObject() instanceof Color);
}

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

txaComment.setUI(new HintTextAreaUI("Crash details / steps to reproduce"));
txaComment.setLineWrap(true);
txaComment.setMargin(new Insets(0, 4, 0, 4));

相关文章

JTextArea类方法