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

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

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

JTextComponent.repaint介绍

暂无

代码示例

代码示例来源:origin: net.sf.squirrel-sql.plugins/hibernate

public void setDelegate(ISyntaxHighlightTokenMatcher delegate)
{
 _delegate = delegate;
 if(null != _editorPane)
 {
   _editorPane.repaint();
 }
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/hibernate

public void setEditorPane(JTextComponent editorPane)
  {
   _editorPane = editorPane;
   _editorPane.repaint();
  }
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/syntax

public void setEditorPane(JTextComponent editorPane)
  {
   _editorPane = editorPane;
   _editorPane.repaint();
  }
}

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

/**
 * Sets the foreground color of the prompt on <code>textComponent</code>
 * and repaints the component to reflect the changes. This color will be
 * used when no text is present.
 * 
 * @param promptTextColor
 * @param textComponent
 */
public static void setForeground(Color promptTextColor, JTextComponent textComponent) {
  textComponent.putClientProperty(FOREGROUND, promptTextColor);
  textComponent.repaint();
}

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

/**
 * Sets the foreground color of the prompt on <code>textComponent</code>
 * and repaints the component to reflect the changes. This color will be
 * used when no text is present.
 * 
 * @param promptTextColor
 * @param textComponent
 */
public static void setForeground(Color promptTextColor, JTextComponent textComponent) {
  textComponent.putClientProperty(FOREGROUND, promptTextColor);
  textComponent.repaint();
}

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

public void repaint(int startY, int height) {
  if (height <= 0) {
    return;
  }
  int width = Math.max(component.getWidth(), 0);
  startY = Math.max(startY, 0);
  component.repaint(0, startY, width, height);
}

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

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

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

/**
 * Sets the foreground color of the prompt on <code>textComponent</code>
 * and repaints the component to reflect the changes. This color will be
 * used when no text is present.
 * 
 * @param promptTextColor
 * @param textComponent
 */
public static void setForeground(Color promptTextColor, JTextComponent textComponent) {
  textComponent.putClientProperty(FOREGROUND, promptTextColor);
  textComponent.repaint();
}

代码示例来源:origin: mucommander/mucommander

private void repaint() {
  if(getComponent() != null) {
    getComponent().repaint();           
  }
}

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

private void repaint() {
  if (getComponent() != null) {
    getComponent().repaint();
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void focusLost(FocusEvent e) {
    if (getComponent() != null) {
      if (orgBorder instanceof UIResource) {
        getComponent().setBorder(orgBorder);
        getComponent().invalidate();
        getComponent().repaint();
      }
    }
  }
};

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

private void repaint() {
  if (getComponent() != null) {
    getComponent().repaint();
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void focusLost(FocusEvent e) {
    if (getComponent() != null) {
      if (orgBorder instanceof UIResource) {
        getComponent().setBorder(orgBorder);
      }
      getComponent().invalidate();
      getComponent().repaint();
    }
  }
};

代码示例来源:origin: RPTools/maptool

private void repaint() {
  if (getComponent() != null) {
    getComponent().repaint();
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void focusGained(FocusEvent e) {
  if (getComponent() != null) {
    orgBorder = getComponent().getBorder();
    LookAndFeel laf = UIManager.getLookAndFeel();
    if (laf instanceof AbstractLookAndFeel && orgBorder instanceof UIResource) {
      Border focusBorder = ((AbstractLookAndFeel)laf).getBorderFactory().getFocusFrameBorder();
      getComponent().setBorder(focusBorder);
    }
    getComponent().invalidate();
    getComponent().repaint();
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void focusGained(FocusEvent e) {
  if (getComponent() != null) {
    orgBorder = getComponent().getBorder();
    LookAndFeel laf = UIManager.getLookAndFeel();
    if (laf instanceof AbstractLookAndFeel && orgBorder instanceof UIResource) {
      Border focusBorder = ((AbstractLookAndFeel)laf).getBorderFactory().getFocusFrameBorder();
      getComponent().setBorder(focusBorder);
    }
    getComponent().invalidate();
    getComponent().repaint();
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void focusGained(FocusEvent e) {
  if (getComponent() != null) {
    orgBorder = getComponent().getBorder();
    LookAndFeel laf = UIManager.getLookAndFeel();
    if (laf instanceof AbstractLookAndFeel && orgBorder instanceof UIResource) {
      Border focusBorder = ((AbstractLookAndFeel)laf).getBorderFactory().getFocusFrameBorder();
      getComponent().setBorder(focusBorder);
    }
    getComponent().invalidate();
    getComponent().repaint();
  }
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-editor

@Override
 public void stateChanged( ChangeEvent e )
 {
  getGosuEditor().replaceLocation( currentLocation, e.getSource().toString() );
  getEditor().requestFocus();
  getGosuEditor().fixSwingFocusBugWhenPopupCloses();
  getEditor().repaint();
 }
} );

代码示例来源:origin: org.gosu-lang.gosu/gosu-editor

@Override
 public void stateChanged( ChangeEvent e )
 {
  TextComponentUtil.replaceWordAtCaretDynamic( getEditor(), e.getSource().toString(),
                         getGosuEditor().getReplaceWordCallback(), false );
  getEditor().requestFocus();
  getGosuEditor().fixSwingFocusBugWhenPopupCloses();
  getEditor().repaint();
 }
} );

代码示例来源:origin: org.gosu-lang.gosu/gosu-editor

public void stateChanged( ChangeEvent e )
 {
  BeanTree beanInfoSelection = (BeanTree)e.getSource();
  String strRef = beanInfoSelection.makePath( false );
  TextComponentUtil.replaceWordAtClosestDot( getEditor(), strRef );
  getEditor().requestFocus();
  getGosuEditor().fixSwingFocusBugWhenPopupCloses();
  getEditor().repaint();
 }
} );

相关文章

JTextComponent类方法