RowSetListener
Stay organized with collections
Save and categorize content based on your preferences.
An interface that must be implemented by a
component that wants to be notified when a significant
event happens in the life of a RowSet
object.
A component becomes a listener by being registered with a
RowSet
object via the method RowSet.addRowSetListener
.
How a registered component implements this interface determines what it does
when it is notified of an event.
Public Method Summary
abstract
void
|
|
abstract
void
|
rowChanged( RowSetEvent event)
Notifies registered listeners that a RowSet object
has had a change in one of its rows.
|
abstract
void
|
rowSetChanged( RowSetEvent event)
Notifies registered listeners that a RowSet object
in the given RowSetEvent object has changed its entire contents.
|
Public Methods
public
abstract
void
cursorMoved
(RowSetEvent event)
Notifies registered listeners that a RowSet
object's
cursor has moved.
The source of the event can be retrieved with the method
event.getSource
.
Parameters
event |
a RowSetEvent object that contains
the RowSet object that is the source of the event
|
public
abstract
void
rowChanged
(RowSetEvent event)
Notifies registered listeners that a RowSet
object
has had a change in one of its rows.
The source of the event can be retrieved with the method
event.getSource
.
Parameters
event |
a RowSetEvent object that contains
the RowSet object that is the source of the event
|
public
abstract
void
rowSetChanged
(RowSetEvent event)
Notifies registered listeners that a RowSet
object
in the given RowSetEvent
object has changed its entire contents.
The source of the event can be retrieved with the method
event.getSource
.
Parameters
event |
a RowSetEvent object that contains
the RowSet object that is the source of the event
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eRowSetListener\u003c/code\u003e interface enables components to be notified of significant events occurring within a \u003ccode\u003eRowSet\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eComponents register as listeners using \u003ccode\u003eRowSet.addRowSetListener\u003c/code\u003e and define their event handling logic by implementing the interface methods.\u003c/p\u003e\n"],["\u003cp\u003eThree key events are covered: \u003ccode\u003ecursorMoved\u003c/code\u003e, signaling cursor movement; \u003ccode\u003erowChanged\u003c/code\u003e, indicating changes within a row; and \u003ccode\u003erowSetChanged\u003c/code\u003e, signifying changes to the entire \u003ccode\u003eRowSet\u003c/code\u003e content.\u003c/p\u003e\n"],["\u003cp\u003eAll event notifications provide a \u003ccode\u003eRowSetEvent\u003c/code\u003e object containing the source \u003ccode\u003eRowSet\u003c/code\u003e for identifying the origin of the event.\u003c/p\u003e\n"]]],["The `RowSetListener` interface allows components to receive notifications about significant events in a `RowSet` object. To become a listener, a component registers itself with `RowSet.addRowSetListener`. The interface defines three key notification methods: `cursorMoved`, which signals a cursor movement; `rowChanged`, indicating a change in a row; and `rowSetChanged`, signaling a change in the entire contents. Each method receives a `RowSetEvent` object, providing the event source.\n"],null,["# RowSetListener\n\npublic interface **RowSetListener** implements [EventListener](../../../reference/java/util/EventListener.html) \nAn interface that must be implemented by a\ncomponent that wants to be notified when a significant\nevent happens in the life of a `RowSet` object.\nA component becomes a listener by being registered with a\n`RowSet` object via the method `RowSet.addRowSetListener`.\nHow a registered component implements this interface determines what it does\nwhen it is notified of an event. \n\n### Public Method Summary\n\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [cursorMoved](../../../reference/javax/sql/RowSetListener.html#cursorMoved(javax.sql.RowSetEvent))([RowSetEvent](../../../reference/javax/sql/RowSetEvent.html) event) Notifies registered listeners that a `RowSet` object's cursor has moved. |\n| abstract void | [rowChanged](../../../reference/javax/sql/RowSetListener.html#rowChanged(javax.sql.RowSetEvent))([RowSetEvent](../../../reference/javax/sql/RowSetEvent.html) event) Notifies registered listeners that a `RowSet` object has had a change in one of its rows. |\n| abstract void | [rowSetChanged](../../../reference/javax/sql/RowSetListener.html#rowSetChanged(javax.sql.RowSetEvent))([RowSetEvent](../../../reference/javax/sql/RowSetEvent.html) event) Notifies registered listeners that a `RowSet` object in the given `RowSetEvent` object has changed its entire contents. |\n\nPublic Methods\n--------------\n\n#### public abstract void\n**cursorMoved**\n([RowSetEvent](../../../reference/javax/sql/RowSetEvent.html) event)\n\nNotifies registered listeners that a `RowSet` object's\ncursor has moved.\n\n\nThe source of the event can be retrieved with the method\n`event.getSource`. \n\n##### Parameters\n\n| event | a `RowSetEvent` object that contains the `RowSet` object that is the source of the event |\n|-------|------------------------------------------------------------------------------------------|\n\n#### public abstract void\n**rowChanged**\n([RowSetEvent](../../../reference/javax/sql/RowSetEvent.html) event)\n\nNotifies registered listeners that a `RowSet` object\nhas had a change in one of its rows.\n\n\nThe source of the event can be retrieved with the method\n`event.getSource`. \n\n##### Parameters\n\n| event | a `RowSetEvent` object that contains the `RowSet` object that is the source of the event |\n|-------|------------------------------------------------------------------------------------------|\n\n#### public abstract void\n**rowSetChanged**\n([RowSetEvent](../../../reference/javax/sql/RowSetEvent.html) event)\n\nNotifies registered listeners that a `RowSet` object\nin the given `RowSetEvent` object has changed its entire contents.\n\n\nThe source of the event can be retrieved with the method\n`event.getSource`. \n\n##### Parameters\n\n| event | a `RowSetEvent` object that contains the `RowSet` object that is the source of the event |\n|-------|------------------------------------------------------------------------------------------|"]]