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

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

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

JTextComponent.revalidate介绍

暂无

代码示例

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

public void setLineWrap(boolean newValue) {
  isLineWrap = newValue;
  editor.revalidate();
  editor.repaint();
}

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

/** Specifies that some preference has changed. */
public void preferenceChanged(boolean width, boolean height) {
  getEditorUI().virtualSizeUpdated = false;
  component.revalidate();
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * <p>
 * Set the style of the prompt font, if different from the
 * <code>textComponent</code>s font.
 * </p>
 * <p>
 * Allowed values are {@link Font#PLAIN}, {@link Font#ITALIC},
 * {@link Font#BOLD}, a combination of {@link Font#BOLD} and
 * {@link Font#ITALIC} or <code>null</code> if the prompt font should be
 * the same as the <code>textComponent</code>s font.
 * </p>
 * 
 * @param fontStyle
 * @param textComponent
 */
public static void setFontStyle(Integer fontStyle, JTextComponent textComponent) {
  textComponent.putClientProperty(FONT_STYLE, fontStyle);
  textComponent.revalidate();
  textComponent.repaint();
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * <p>
 * Set the style of the prompt font, if different from the
 * <code>textComponent</code>s font.
 * </p>
 * <p>
 * Allowed values are {@link Font#PLAIN}, {@link Font#ITALIC},
 * {@link Font#BOLD}, a combination of {@link Font#BOLD} and
 * {@link Font#ITALIC} or <code>null</code> if the prompt font should be
 * the same as the <code>textComponent</code>s font.
 * </p>
 * 
 * @param fontStyle
 * @param textComponent
 */
public static void setFontStyle(Integer fontStyle, JTextComponent textComponent) {
  textComponent.putClientProperty(FONT_STYLE, fontStyle);
  textComponent.revalidate();
  textComponent.repaint();
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * <p>
 * Set the style of the prompt font, if different from the
 * <code>textComponent</code>s font.
 * </p>
 * <p>
 * Allowed values are {@link Font#PLAIN}, {@link Font#ITALIC},
 * {@link Font#BOLD}, a combination of {@link Font#BOLD} and
 * {@link Font#ITALIC} or <code>null</code> if the prompt font should be
 * the same as the <code>textComponent</code>s font.
 * </p>
 * 
 * @param fontStyle
 * @param textComponent
 */
public static void setFontStyle(Integer fontStyle, JTextComponent textComponent) {
  textComponent.putClientProperty(FONT_STYLE, fontStyle);
  textComponent.revalidate();
  textComponent.repaint();
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * <p>
 * Set the style of the prompt font, if different from the
 * <code>textComponent</code>s font.
 * </p>
 * <p>
 * Allowed values are {@link Font#PLAIN}, {@link Font#ITALIC},
 * {@link Font#BOLD}, a combination of {@link Font#BOLD} and
 * {@link Font#ITALIC} or <code>null</code> if the prompt font should be
 * the same as the <code>textComponent</code>s font.
 * </p>
 * 
 * @param fontStyle
 * @param textComponent
 */
public static void setFontStyle(Integer fontStyle, JTextComponent textComponent) {
  textComponent.putClientProperty(FONT_STYLE, fontStyle);
  textComponent.revalidate();
  textComponent.repaint();
}

代码示例来源:origin: nz.ac.waikato.cms.weka.thirdparty/bounce

private void fireFoldsUpdated() {
  editor.getDocument().putProperty(Fold.FOLDS_UPDATED_ATTRIBUTE, true);
  editor.revalidate();
  editor.repaint();
  getParent().invalidate();
  getParent().repaint();
}

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

component.revalidate();

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

public void propertyChange(java.beans.PropertyChangeEvent evt) {
  JTextComponent component = (JTextComponent)getContainer();
  if (component==null || evt==null || 
    !EditorUI.LINE_HEIGHT_CHANGED_PROP.equals(evt.getPropertyName())) return;
  
  AbstractDocument doc = (AbstractDocument)getDocument();
  if (doc!=null) {
    doc.readLock();
    try{
      LockView lockView = LockView.get(this);
      lockView.lock();
      try {
        rebuild(0, getViewCount());
      } finally {
        lockView.unlock();
      }
    } finally {
      doc.readUnlock();
    }
  component.revalidate();
  }
}

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

component.revalidate();

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

currentEditor.revalidate();
currentEditor.requestFocusInWindow();
currentEditor.selectAll();

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

currentEditor.revalidate();
currentEditor.requestFocusInWindow();
currentEditor.selectAll();

相关文章

JTextComponent类方法