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

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

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

JTextComponent.getSize介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial

/**
 * Components created by SibeBarFactory are positioned
 * using a Layout manager that determines componnet size
 * by retireving preferred size.
 *
 * <p>Once componnet needs resizing it simply calls
 * {@link #revalidate} that triggers new layouting
 * that consults prefered size.
 */
@Override
public Dimension getPreferredSize() {
  Dimension dim = textComponent.getSize();
  int width = annotated ? getBarWidth() : 0;
  dim.width = width;
  dim.height *=2;  // XXX
  return dim;
}

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

+ "\nDoubleBuffering=" + component.isDoubleBuffered(); // NOI18N
buf += "\ncomponent.getLocation()=" + component.getLocation() // NOI18N
    + "\ncomponent.getSize()=" + component.getSize() // NOI18N
    + "\nvirtualSize=" + editorUI.virtualSize; // NOI18N
buf += "\nEditorUI LAYERS:\n" + editorUI.getDrawLayerList(); // NOI18N

代码示例来源:origin: net.sf.nimrod/nimrod-laf

if ( c.getSize().height+2 < (c.getFont().getSize() + ins.top + ins.bottom) ) {
 c.setBorder( NimRODBorders.getThinGenBorder());
 canijo = true;

相关文章

JTextComponent类方法