summaryrefslogtreecommitdiff
path: root/javax/swing/plaf/basic/BasicTextUI.java
diff options
context:
space:
mode:
authorLillian Angel <langel@redhat.com>2005-08-24 20:37:35 +0000
committerLillian Angel <langel@redhat.com>2005-08-24 20:37:35 +0000
commit7ce92c8b02fcbbe8d63b3fd7e12a1cdd416955e0 (patch)
tree0984117c4eae5594e692022b1e0fdae7970e73e0 /javax/swing/plaf/basic/BasicTextUI.java
parentca24ed28b53a1fbffa582f05418055558231f1e6 (diff)
downloadclasspath-7ce92c8b02fcbbe8d63b3fd7e12a1cdd416955e0.tar.gz
2005-08-24 Lillian Angel <langel@redhat.com>
* javax/swing/DefaultCellEditor.java (isCellEditable): If the event is null, the cell is still editable. * javax/swing/plaf/basic/BasicTextUI.java (getVisibleEditorRect): Use getPreferredSize to get the width and height. * javax/swing/tree/DefaultTreeCellEditor.java (paint): Fixed to paint the JTextField with the background and border at the correct location. (DefaultTreeCellEditor): Changed to initialize realEditor. (configureEditingComponent): Helper function implemented. (getTreeCellEditorComponent): Fixed to use realEditor to get component. (isCellEditable): Fixed to configure editing component. (shouldSelectCell): Always returns true. (stopCellEditing): Fixed to configure editing component if needed. (cancelCellEditing): Fixed to configure editing component if needed. (createTreeCellEditor): Fixed to initialize fields.
Diffstat (limited to 'javax/swing/plaf/basic/BasicTextUI.java')
-rw-r--r--javax/swing/plaf/basic/BasicTextUI.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/javax/swing/plaf/basic/BasicTextUI.java b/javax/swing/plaf/basic/BasicTextUI.java
index 6e83f09db..f5ee3407a 100644
--- a/javax/swing/plaf/basic/BasicTextUI.java
+++ b/javax/swing/plaf/basic/BasicTextUI.java
@@ -959,8 +959,9 @@ public abstract class BasicTextUI extends TextUI
*/
protected Rectangle getVisibleEditorRect()
{
- int width = textComponent.getWidth();
- int height = textComponent.getHeight();
+ Dimension d = textComponent.getPreferredSize();
+ int width = d.width;
+ int height = d.height;
if (width <= 0 || height <= 0)
return null;