summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTania Bento <tbento@redhat.com>2006-11-03 21:28:07 +0000
committerTania Bento <tbento@redhat.com>2006-11-03 21:28:07 +0000
commit87a574adce139fd1627dadcbbecaff0ca118cb75 (patch)
treef8d21bd0b798af564290c67a5dd076660e42cdda
parent9cf6220d4e6d5bdadbbf159a6e719eb8897864fa (diff)
downloadclasspath-generics-merge-20061104.tar.gz
2006-11-03 Tania Bento <tbento@redhat.com>generics-merge-20061104
* java/awt/TextArea.java (getMinimumSize): Changed documentation. (getPreferredSize): Changed documentation. (getMinimumSize(int,int)): Changed documenation. (getPreferredSize(int,int)): Changed documenation. (minimumSize): Changed documentation. (preferredSize): Changed documenation. (minimumSize(int,int)): Changed documentation. Checked if minimum size had been previously set and changed values of Dimension returned if peer == null. (preferredSize(int, int)): Checked if preferred size had been previously set and changed values of Dimension returned if peer = null.
-rw-r--r--ChangeLog16
-rw-r--r--java/awt/TextArea.java68
2 files changed, 37 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index bf9764b0e..a5093cab6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2006-11-03 Tania Bento <tbento@redhat.com>
+ * java/awt/TextArea.java
+ (getMinimumSize): Changed documentation.
+ (getPreferredSize): Changed documentation.
+ (getMinimumSize(int,int)): Changed documenation.
+ (getPreferredSize(int,int)): Changed documenation.
+ (minimumSize): Changed documentation.
+ (preferredSize): Changed documenation.
+ (minimumSize(int,int)): Changed documentation. Checked if
+ minimum size had been previously set and changed values of
+ Dimension returned if peer == null.
+ (preferredSize(int, int)): Checked if preferred size had been
+ previously set and changed values of Dimension returned if
+ peer = null.
+
+2006-11-03 Tania Bento <tbento@redhat.com>
+
* java/awt/event/ComponentEvent.java
(paramString): Changed format of string representation returned.
diff --git a/java/awt/TextArea.java b/java/awt/TextArea.java
index 7e3463ab8..30b278d0c 100644
--- a/java/awt/TextArea.java
+++ b/java/awt/TextArea.java
@@ -284,11 +284,7 @@ public class TextArea extends TextComponent implements java.io.Serializable
}
/**
- * Retrieve the minimum size for this text area, considering the
- * text area's current row and column values. A text area's minimum
- * size depends on the number of rows and columns of text it would
- * prefer to display, and on the size of the font in which the text
- * would be displayed.
+ * Retrieve the minimum size for this text area.
*
* @return The minimum size for this text field.
*/
@@ -298,11 +294,8 @@ public class TextArea extends TextComponent implements java.io.Serializable
}
/**
- * Retrieve the minimum size that this text area would have if its
- * row and column values were equal to those specified. A text
- * area's minimum size depends on the number of rows and columns of
- * text it would prefer to display, and on the size of the font in
- * which the text would be displayed.
+ * Retrieve the minimum size for this text area. If the minimum
+ * size has been set, then rows and columns are used in the calculation.
*
* @param rows The number of rows to use in the minimum size
* calculation.
@@ -317,12 +310,8 @@ public class TextArea extends TextComponent implements java.io.Serializable
}
/**
- * Retrieve the minimum size for this text area, considering the
- * text area's current row and column values. A text area's minimum
- * size depends on the number of rows and columns of text it would
- * prefer to display, and on the size of the font in which the text
- * would be displayed.
- *
+ * Retrieve the minimum size for this text area.
+ *
* @return The minimum size for this text area.
*
* @deprecated This method is deprecated in favor of
@@ -334,11 +323,8 @@ public class TextArea extends TextComponent implements java.io.Serializable
}
/**
- * Retrieve the minimum size that this text area would have if its
- * row and column values were equal to those specified. A text
- * area's minimum size depends on the number of rows and columns of
- * text it would prefer to display, and on the size of the font in
- * which the text would be displayed.
+ * Retrieve the minimum size for this text area. If the minimum
+ * size has been set, then rows and columns are used in the calculation.
*
* @param rows The number of rows to use in the minimum size
* calculation.
@@ -352,21 +338,18 @@ public class TextArea extends TextComponent implements java.io.Serializable
*/
public Dimension minimumSize (int rows, int columns)
{
+ if (isMinimumSizeSet())
+ return new Dimension(minSize);
+
TextAreaPeer peer = (TextAreaPeer) getPeer ();
-
- // Sun returns Dimension (0,0) in this case.
if (peer == null)
- return new Dimension (0, 0);
+ return new Dimension (getWidth(), getHeight());
return peer.getMinimumSize (rows, columns);
}
/**
- * Retrieve the preferred size for this text area, considering the
- * text area's current row and column values. A text area's preferred
- * size depends on the number of rows and columns of text it would
- * prefer to display, and on the size of the font in which the text
- * would be displayed.
+ * Retrieve the preferred size for this text area.
*
* @return The preferred size for this text field.
*/
@@ -376,11 +359,8 @@ public class TextArea extends TextComponent implements java.io.Serializable
}
/**
- * Retrieve the preferred size that this text area would have if its
- * row and column values were equal to those specified. A text
- * area's preferred size depends on the number of rows and columns
- * of text it would prefer to display, and on the size of the font
- * in which the text would be displayed.
+ * 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.
@@ -395,11 +375,7 @@ public class TextArea extends TextComponent implements java.io.Serializable
}
/**
- * Retrieve the preferred size for this text area, considering the
- * text area's current row and column values. A text area's preferred
- * size depends on the number of rows and columns of text it would
- * prefer to display, and on the size of the font in which the text
- * would be displayed.
+ * Retrieve the preferred size for this text area.
*
* @return The preferred size for this text field.
*
@@ -412,11 +388,8 @@ public class TextArea extends TextComponent implements java.io.Serializable
}
/**
- * Retrieve the preferred size that this text area would have if its
- * row and column values were equal to those specified. A text
- * area's preferred size depends on the number of rows and columns
- * of text it would prefer to display, and on the size of the font
- * in which the text would be displayed.
+ * 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.
@@ -430,11 +403,12 @@ public class TextArea extends TextComponent implements java.io.Serializable
*/
public Dimension preferredSize (int rows, int columns)
{
+ if (isPreferredSizeSet())
+ return new Dimension(prefSize);
+
TextAreaPeer peer = (TextAreaPeer) getPeer ();
-
- // Sun returns Dimension (0,0) in this case.
if (peer == null)
- return new Dimension (0, 0);
+ return new Dimension (getWidth(), getHeight());
return peer.getPreferredSize (rows, columns);
}