当前位置: 首页>>代码示例>>Java>>正文


Java TextAreaPeer.getPreferredSize方法代码示例

本文整理汇总了Java中java.awt.peer.TextAreaPeer.getPreferredSize方法的典型用法代码示例。如果您正苦于以下问题:Java TextAreaPeer.getPreferredSize方法的具体用法?Java TextAreaPeer.getPreferredSize怎么用?Java TextAreaPeer.getPreferredSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.peer.TextAreaPeer的用法示例。


在下文中一共展示了TextAreaPeer.getPreferredSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preferredSize

import java.awt.peer.TextAreaPeer; //导入方法依赖的package包/类
/**
 * @deprecated As of JDK version 1.1,
 * replaced by <code>getPreferredSize(int, int)</code>.
 */
@Deprecated
public Dimension preferredSize(int rows, int columns) {
    synchronized (getTreeLock()) {
        TextAreaPeer peer = (TextAreaPeer)this.peer;
        return (peer != null) ?
                   peer.getPreferredSize(rows, columns) :
                   super.preferredSize();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:TextArea.java

示例2: preferredSize

import java.awt.peer.TextAreaPeer; //导入方法依赖的package包/类
/**
 * Determines the preferred size of the text area with the specified
 * number of rows and columns.
 *
 * @param  rows the number of rows
 * @param  columns the number of columns
 * @return the preferred dimensions needed for the text area
 * @deprecated As of JDK version 1.1,
 * replaced by {@code getPreferredSize(int, int)}.
 */
@Deprecated
public Dimension preferredSize(int rows, int columns) {
    synchronized (getTreeLock()) {
        TextAreaPeer peer = (TextAreaPeer)this.peer;
        return (peer != null) ?
                   peer.getPreferredSize(rows, columns) :
                   super.preferredSize();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:TextArea.java

示例3: preferredSize

import java.awt.peer.TextAreaPeer; //导入方法依赖的package包/类
/**
 * Retrieve the preferred size for this text area.  If the preferred
 * size has been set, then rows and columns are used in the calculation.
 *
 * @param rows The number of rows to use in the preferred size
 * calculation.
 * @param columns The number of columns to use in the preferred size
 * calculation.
 *
 * @return The preferred size for this text area.
 *
 * @deprecated This method is deprecated in favor of
 * <code>getPreferredSize (int, int)</code>.
 */
public Dimension preferredSize (int rows, int columns)
{
  if (isPreferredSizeSet())
    return new Dimension(prefSize);

  TextAreaPeer peer = (TextAreaPeer) getPeer ();
  if (peer == null)
    return new Dimension (getWidth(), getHeight());

  return peer.getPreferredSize (rows, columns);
}
 
开发者ID:vilie,项目名称:javify,代码行数:26,代码来源:TextArea.java

示例4: preferredSize

import java.awt.peer.TextAreaPeer; //导入方法依赖的package包/类
/**
 * Retrieve the preferred size for this text area.  If the preferred
 * size has been set, then rows and columns are used in the calculation.
 *
 * @param rows The number of rows to use in the preferred size
 * calculation.
 * @param columns The number of columns to use in the preferred size
 * calculation.
 *
 * @return The preferred size for this text area.
 *
 * @deprecated This method is deprecated in favor of
 * <code>getPreferredSize (int, int)</code>.
 */
public Dimension preferredSize (int rows, int columns)
{
  if (isPreferredSizeSet())
    return new Dimension(prefSize);
  
  TextAreaPeer peer = (TextAreaPeer) getPeer ();
  if (peer == null)
    return new Dimension (getWidth(), getHeight());

  return peer.getPreferredSize (rows, columns);
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:26,代码来源:TextArea.java


注:本文中的java.awt.peer.TextAreaPeer.getPreferredSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。