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

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

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

JTextArea.getRows介绍

暂无

代码示例

代码示例来源:origin: Waikato/meka

/**
 * Returns the rows.
 *
 * @return        the rows
 */
public int getRows() {
  return m_TextCode.getRows();
}

代码示例来源:origin: net.sf.meka/meka

/**
 * Returns the rows.
 *
 * @return        the rows
 */
public int getRows() {
  return m_TextCode.getRows();
}

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

/**
 * Overrides {@link #getPromptComponent(JTextComponent)} to additionally
 * update {@link JTextArea} specific properties.
 */
@Override
public JTextComponent getPromptComponent(JTextComponent txt) {
  JTextArea lbl = (JTextArea) super.getPromptComponent(txt);
  JTextArea txtArea = (JTextArea) txt;
  lbl.setColumns(txtArea.getColumns());
  lbl.setRows(txtArea.getRows());
  return lbl;
}

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

/**
 * Overrides {@link #getPromptComponent(JTextComponent)} to additionally
 * update {@link JTextArea} specific properties.
 */
@Override
public JTextComponent getPromptComponent(JTextComponent txt) {
  JTextArea lbl = (JTextArea) super.getPromptComponent(txt);
  JTextArea txtArea = (JTextArea) txt;
  lbl.setColumns(txtArea.getColumns());
  lbl.setRows(txtArea.getRows());
  return lbl;
}

代码示例来源:origin: com.jidesoft/jide-oss

/**
 * Sets the number of visible rows. The row value will be forced to the boundaries of the range [minRows ...
 * maxRows] if it is outside that range.
 *
 * @param rows The number of rows to show
 */
@Override
public void setRows(int rows) {
  int oldRow = super.getRows();
  int newRow = clipRowCount(rows);
  super.setRows(newRow);
  numberOfRowsUpdated(oldRow, newRow);
}

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

/**
 * Overrides {@link #getPromptComponent(JTextComponent)} to additionally
 * update {@link JTextArea} specific properties.
 */
@Override
public JTextComponent getPromptComponent(JTextComponent txt) {
  JTextArea lbl = (JTextArea) super.getPromptComponent(txt);
  JTextArea txtArea = (JTextArea) txt;
  lbl.setColumns(txtArea.getColumns());
  lbl.setRows(txtArea.getRows());
  return lbl;
}

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

/**
 * Overrides {@link #getPromptComponent(JTextComponent)} to additionally
 * update {@link JTextArea} specific properties.
 */
@Override
public JTextComponent getPromptComponent(JTextComponent txt) {
  JTextArea lbl = (JTextArea) super.getPromptComponent(txt);
  JTextArea txtArea = (JTextArea) txt;
  lbl.setColumns(txtArea.getColumns());
  lbl.setRows(txtArea.getRows());
  return lbl;
}

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

for (int i = 0; i < textArea.getRows(); i++) {
  publish("text\n");

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

setText(value == null ? "" : value.toString());
int dynamicHeight = getLineCount() > getRows() && this.limit ? getRows() : getLineCount();
int newHeight = table.getRowHeight() * dynamicHeight;
if (table.getRowHeight(row) != newHeight) {

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

lines.setDisabledTextColor(Color.BLACK);
for (int i = 1; i <= lines.getRows(); i++) {
  lines.append(i + System.getProperty("line.separator"));

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

terminal.getActionMap().put("enter", enterAction);
terminal.setNavigationFilter(new NavigationFilterSuffix(terminal.getRows(), terminal.getDocument()));

代码示例来源:origin: triplea-game/triplea

@Test
public void rows() {
 final JTextArea area = JTextAreaBuilder.builder()
   .rows(5)
   .build();
 assertThat(area.getRows(), is(5));
}

代码示例来源:origin: pentaho/pentaho-reporting

@Before
public void setUp() {
 ParameterDefinitionEntry entry = mock( ParameterDefinitionEntry.class );
 ParameterContext parameterContext = mock( ParameterContext.class );
 updateContext = mock( ParameterUpdateContext.class );
 ResourceBundleFactory resourceBundleFactory = mock( ResourceBundleFactory.class );
 Locale locale = new Locale( "test_test" );
 doReturn( ENTRY_NAME ).when( entry ).getName();
 doReturn( Number.class ).when( entry ).getValueType();
 doReturn( "#,###,##0.00" ).when( entry ).getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE,
  ParameterAttributeNames.Core.DATA_FORMAT, parameterContext );
 doReturn( "#,###,##0.00" ).when( entry ).getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE,
  ParameterAttributeNames.Core.DATA_FORMAT, parameterContext );
 doReturn( "utc" ).when( entry ).getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE,
  ParameterAttributeNames.Core.TIMEZONE, parameterContext );
 doReturn( resourceBundleFactory ).when( parameterContext ).getResourceBundleFactory();
 doReturn( locale ).when( resourceBundleFactory ).getLocale();
 doReturn( TimeZone.getDefault() ).when( resourceBundleFactory ).getTimeZone();
 comp = new TextAreaParameterComponent( entry, parameterContext, updateContext );
 verify( updateContext ).addChangeListener( any( ChangeListener.class ) );
 JTextArea textArea = findTextArea( comp );
 assertThat( textArea, is( notNullValue() ) );
 assertThat( textArea.getColumns(), is( equalTo( 60 ) ) );
 assertThat( textArea.getRows(), is( equalTo( 10 ) ) );
}

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

JTextArea renderedTextArea = (JTextArea)((JScrollPane)component).getViewport().getView();
JTextArea inlineTextArea = FormComponentBox.createTextArea(renderedTextArea.getText(), renderedTextArea.getRows(), renderedTextArea.getColumns());
JScrollPane inlineScrollPane = new JScrollPane(inlineTextArea, renderedScrollPane.getVerticalScrollBarPolicy(), renderedScrollPane.getHorizontalScrollBarPolicy());
Font font = UIManager.getFont("TextArea.font"); // NOI18N

相关文章

JTextArea类方法