本文整理汇总了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();
}
}
示例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();
}
}
示例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);
}
示例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);
}