summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--javax/swing/text/html/TableView.java24
2 files changed, 27 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 961b0cd5c..533283c6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,17 @@
+2006-11-25 Mark Wielaard <mark@klomp.org>
+
+ * javax/swing/text/html/TableView.java (calculateColumnRequirements):
+ Check whether rowView instanceof RowView.
+ (updateGrid): Likewise.
+
2006-11-25 Mario Torre <neugens@nirvana.limasoftware.net>
PR28462
* java/text/DecimalFormat.java: Almost new rewrite, and update to 1.5.
* java/text/NumberFormat.java (format): all format methods, fixed
- FieldPosition argument should never be null.
- (format(Object, StringBuffer, FieldPosition)): fixed signature,
- method is not final.
+ FieldPosition argument should never be null.
+ (format(Object, StringBuffer, FieldPosition)): fixed signature,
+ method is not final.
* java/text/DecimalFormatSymbols.java (clone): fixed to also clone
locale.
* AUTHORS: added my name to the file.
diff --git a/javax/swing/text/html/TableView.java b/javax/swing/text/html/TableView.java
index 376d640e7..971d54cb6 100644
--- a/javax/swing/text/html/TableView.java
+++ b/javax/swing/text/html/TableView.java
@@ -427,8 +427,12 @@ class TableView
// all columns of all rows.
for (int r = 0; r < numRows; r++)
{
- RowView rowView = (RowView) getView(r);
- int numCols = rowView.getViewCount();
+ View rowView = getView(r);
+ int numCols;
+ if (rowView instanceof RowView)
+ numCols = ((RowView) rowView).getViewCount();
+ else
+ numCols = 0;
// We collect the normal (non-relative) column requirements in the
// total variable and the relative requirements in the relTotal
@@ -665,15 +669,23 @@ class TableView
int numRows = getViewCount();
for (int r = 0; r < numRows; r++)
{
- RowView rowView = (RowView) getView(r);
- int numCols = rowView.getViewCount();
+ View rowView = getView(r);
+ int numCols;
+ if (rowView instanceof RowView)
+ numCols = ((RowView) rowView).getViewCount();
+ else
+ numCols = 0;
maxColumns = Math.max(numCols, maxColumns);
}
columnWidths = new Length[maxColumns];
for (int r = 0; r < numRows; r++)
{
- RowView rowView = (RowView) getView(r);
- int numCols = rowView.getViewCount();
+ View rowView = getView(r);
+ int numCols;
+ if (rowView instanceof RowView)
+ numCols = ((RowView) rowView).getViewCount();
+ else
+ numCols = 0;
int colIndex = 0;
for (int c = 0; c < numCols; c++)
{