[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: API docs updated for javax.swing.event.TableModelEvent
From: |
David Gilbert |
Subject: |
[cp-patches] FYI: API docs updated for javax.swing.event.TableModelEvent |
Date: |
Wed, 29 Jun 2005 11:08:44 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050426) |
I committed this patch to add/update the API docs for the
TableModelEvent class:
2005-06-29 David Gilbert <address@hidden>
* javax/swing/event/TableModelEvent.java: updated API docs all over.
Regards,
Dave Gilbert
Index: javax/swing/event/TableModelEvent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/event/TableModelEvent.java,v
retrieving revision 1.7
diff -u -r1.7 TableModelEvent.java
--- javax/swing/event/TableModelEvent.java 22 Oct 2004 12:44:00 -0000
1.7
+++ javax/swing/event/TableModelEvent.java 29 Jun 2005 10:01:58 -0000
@@ -1,5 +1,5 @@
/* TableModelEvent.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,27 +43,59 @@
import javax.swing.table.TableModel;
/**
+ * An event that describes changes to a address@hidden TableModel}.
+ *
+ * @see javax.swing.event.TableModelListener
+ *
* @author Andrew Selkirk
*/
public class TableModelEvent extends EventObject
{
private static final long serialVersionUID = -7849342674552212824L;
+ /** A column index representing all columns. */
public static final int ALL_COLUMNS = -1;
+
+ /**
+ * An event type indicating that one or more rows have been deleted from the
+ * model.
+ */
public static final int DELETE = -1;
+
+ /** A row index representing the header row. */
public static final int HEADER_ROW = -1;
+
+ /**
+ * An event type indicating that one or more rows have been inserted into
the
+ * model.
+ */
public static final int INSERT = 1;
+
+ /** An event type indicating that data has been updated in the model. */
public static final int UPDATE = 0;
+ /** The column in the table model that the event relates to. */
protected int column = 0;
+
+ /** The first row in the table model that the event relates to. */
protected int firstRow = 0;
+
+ /** The last row in the table model that the event relates to. */
protected int lastRow = 0;
+
+ /**
+ * The event type (one of address@hidden #UPDATE}, address@hidden #INSERT},
address@hidden #DELETE}).
+ */
protected int type = 0;
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an address@hidden
#UPDATE}
+ * to the data in all columns and rows.
+ *
+ * @param source the source object (<code>null</code> not permitted).
*
- * @param source The source object
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
public TableModelEvent(TableModel source)
{
@@ -71,10 +103,14 @@
}
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an address@hidden
#UPDATE}
+ * to the data in a single row across all columns.
+ *
+ * @param source the source object (<code>null</code> not permitted).
+ * @param row the updated row.
*
- * @param source The source object
- * @param row The updated row
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
public TableModelEvent(TableModel source, int row)
{
@@ -82,11 +118,15 @@
}
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an address@hidden
#UPDATE}
+ * to the data in the specified rows across all columns.
*
- * @param source The source object
- * @param firstRow The first row of update
- * @param lastRow The last row of update
+ * @param source the source object (<code>null</code> not permitted).
+ * @param firstRow the first row of update.
+ * @param lastRow the last row of update.
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
public TableModelEvent(TableModel source, int firstRow, int lastRow)
{
@@ -94,28 +134,41 @@
}
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an address@hidden
#UPDATE}
+ * to the data in the specified rows and column. Use address@hidden
#ALL_COLUMNS}
+ * for the <code>column</code> argument to indicate all columns.
*
- * @param source The source object
- * @param firstRow The first row of update
- * @param lastRow The last row of update
- * @param column The affected column
+ * @param source the source object (<code>null</code> not permitted).
+ * @param firstRow the first row of update.
+ * @param lastRow the last row of update.
+ * @param column the affected column.
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
- public TableModelEvent(TableModel source, int firstRow, int lastRow, int
column)
+ public TableModelEvent(TableModel source, int firstRow, int lastRow,
+ int column)
{
this(source, firstRow, lastRow, column, UPDATE);
}
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an operation of
+ * the specified <code>type</code> on the data in the specified rows and
+ * column. The event type is usually one of address@hidden #UPDATE},
address@hidden #INSERT},
+ * and address@hidden #DELETE}.
+ *
+ * @param source the source object (<code>null</code> not permitted).
+ * @param firstRow the first row of update.
+ * @param lastRow the last row of update.
+ * @param column the affected column.
+ * @param type the type of change.
*
- * @param source The source object
- * @param firstRow The first row of update
- * @param lastRow The last row of update
- * @param column The affected column
- * @param type The type of change
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
- public TableModelEvent(TableModel source, int firstRow, int lastRow, int
column, int type)
+ public TableModelEvent(TableModel source, int firstRow, int lastRow,
+ int column, int type)
{
super(source);
this.firstRow = firstRow;
@@ -126,6 +179,8 @@
/**
* Returns the affected column of this event.
+ *
+ * @return The column index.
*/
public int getColumn()
{
@@ -134,6 +189,8 @@
/**
* Returns the first affected row of this event.
+ *
+ * @return The row index.
*/
public int getFirstRow()
{
@@ -142,6 +199,8 @@
/**
* Returns the last affected row of this event.
+ *
+ * @return The row index.
*/
public int getLastRow()
{
@@ -149,7 +208,10 @@
}
/**
- * Returns the type of change of this event.
+ * Returns the type of change indicated by this event (usually one of
+ * address@hidden #UPDATE}, address@hidden #INSERT}, address@hidden
#DELETE}).
+ *
+ * @return The type.
*/
public int getType()
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: API docs updated for javax.swing.event.TableModelEvent,
David Gilbert <=