You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Container.java 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. /*
  2. @ITMillApache2LicenseForJavaFiles@
  3. */
  4. package com.itmill.toolkit.data;
  5. import java.util.Collection;
  6. /**
  7. * <p>
  8. * A specialized set of identified Items. Basically the Container is a set of
  9. * Items, but it imposes certain constraints on its contents. These constraints
  10. * state the following:
  11. * </p>
  12. *
  13. * <ul>
  14. * <li>All Items in the Container must include the same number of Properties
  15. * <li>All Items in the Container must include the same Property ID sets (see
  16. * {@link Item#getItemPropertyIds()}).
  17. * <li>all Properties in the Items corresponding to the same Property ID must
  18. * have the same data type.
  19. * </ul>
  20. *
  21. * <p>
  22. * The Container can be visualized as a representation of a relational database
  23. * table. Each Item in the Container represents a row in the table, and all
  24. * cells in a column (identified by a Property ID) have the same data type. Note
  25. * that as with the cells in a database table, no Property in a Container may be
  26. * empty, though they may contain <code>null</code> values.
  27. * </p>
  28. *
  29. * <p>
  30. * Note that though uniquely identified, the Items in a Container are not
  31. * neccessarily {@link Container.Ordered ordered}or
  32. * {@link Container.Indexed indexed}.
  33. * </p>
  34. *
  35. * <p>
  36. * <img src=doc-files/Container_full.gif>
  37. * </p>
  38. *
  39. * <p>
  40. * The Container interface is split to several subinterfaces so that a class can
  41. * implement only the ones it needs.
  42. * </p>
  43. *
  44. * @author IT Mill Ltd
  45. * @version
  46. * @VERSION@
  47. * @since 3.0
  48. */
  49. public interface Container {
  50. /**
  51. * Gets the Item with the given Item ID from the Container. If the Container
  52. * does not contain the requested Item, <code>null</code> is returned.
  53. *
  54. * @param itemId
  55. * ID of the Item to retrieve
  56. * @return the Item with the given ID or <code>null</code> if the Item is
  57. * not found in the Container
  58. */
  59. public Item getItem(Object itemId);
  60. /**
  61. * Gets the ID's of all Properties stored in the Container. The ID's are
  62. * returned as a unmodifiable collection.
  63. *
  64. * @return unmodifiable collection of Property IDs
  65. */
  66. public Collection getContainerPropertyIds();
  67. /**
  68. * Gets the ID's of all Items stored in the Container. The ID's are returned
  69. * as a unmodifiable collection.
  70. *
  71. * @return unmodifiable collection of Item IDs
  72. */
  73. public Collection getItemIds();
  74. /**
  75. * Gets the Property identified by the given itemId and propertyId from the
  76. * Container. If the Container does not contain the Property,
  77. * <code>null</code> is returned.
  78. *
  79. * @param itemId
  80. * ID of the Item which contains the Property
  81. * @param propertyId
  82. * ID of the Property to retrieve
  83. * @return Property with the given ID or <code>null</code>
  84. */
  85. public Property getContainerProperty(Object itemId, Object propertyId);
  86. /**
  87. * Gets the data type of all Properties identified by the given Property ID.
  88. *
  89. * @param propertyId
  90. * ID identifying the Properties
  91. * @return data type of the Properties
  92. */
  93. public Class getType(Object propertyId);
  94. /**
  95. * Gets the number of Items in the Container.
  96. *
  97. * @return number of Items in the Container
  98. */
  99. public int size();
  100. /**
  101. * Tests if the Container contains the specified Item
  102. *
  103. * @param itemId
  104. * ID the of Item to be tested
  105. * @return boolean indicating if the Container holds the specified Item
  106. */
  107. public boolean containsId(Object itemId);
  108. /**
  109. * Creates a new Item with the given ID into the Container. The new
  110. * <p>
  111. * Item is returned, and it is ready to have its Properties modified.
  112. * Returns <code>null</code> if the operation fails or the Container
  113. * already contains a Item with the given ID.
  114. * </p>
  115. *
  116. * <p>
  117. * This functionality is optional.
  118. * </p>
  119. *
  120. * @param itemId
  121. * ID of the Item to be created
  122. * @return Created new Item, or <code>null</code> in case of a failure
  123. */
  124. public Item addItem(Object itemId) throws UnsupportedOperationException;
  125. /**
  126. * Creates a new Item into the Container, and assign it an automatic ID.
  127. *
  128. * <p>
  129. * The new ID is returned, or <code>null</code> if the operation fails.
  130. * After a successful call you can use the
  131. * {@link #getItem(Object ItemId) <code>getItem</code>}method to fetch the
  132. * Item.
  133. * </p>
  134. *
  135. * <p>
  136. * This functionality is optional.
  137. * </p>
  138. *
  139. * @return ID of the newly created Item, or <code>null</code> in case of a
  140. * failure
  141. */
  142. public Object addItem() throws UnsupportedOperationException;
  143. /**
  144. * Removes the Item identified by <code>ItemId</code> from the Container.
  145. * This functionality is optional.
  146. *
  147. * @param itemId
  148. * ID of the Item to remove
  149. * @return <code>true</code> if the operation succeeded,
  150. * <code>false</code> if not
  151. */
  152. public boolean removeItem(Object itemId)
  153. throws UnsupportedOperationException;
  154. /**
  155. * Adds a new Property to all Items in the Container. The Property ID, data
  156. * type and default value of the new Property are given as parameters.
  157. *
  158. * This functionality is optional.
  159. *
  160. * @param propertyId
  161. * ID of the Property
  162. * @param type
  163. * Data type of the new Property
  164. * @param defaultValue
  165. * The value all created Properties are initialized to
  166. * @return <code>true</code> if the operation succeeded,
  167. * <code>false</code> if not
  168. */
  169. public boolean addContainerProperty(Object propertyId, Class type,
  170. Object defaultValue) throws UnsupportedOperationException;
  171. /**
  172. * Removes a Property specified by the given Property ID from the Container.
  173. * Note that the Property will be removed from all Items in the Container.
  174. *
  175. * This functionality is optional.
  176. *
  177. * @param propertyId
  178. * ID of the Property to remove
  179. * @return <code>true</code> if the operation succeeded,
  180. * <code>false</code> if not
  181. */
  182. public boolean removeContainerProperty(Object propertyId)
  183. throws UnsupportedOperationException;
  184. /**
  185. * Removes all Items from the Container.
  186. *
  187. * <p>
  188. * Note that Property ID and type information is preserved. This
  189. * functionality is optional.
  190. * </p>
  191. *
  192. * @return <code>true</code> if the operation succeeded,
  193. * <code>false</code> if not
  194. */
  195. public boolean removeAllItems() throws UnsupportedOperationException;
  196. /**
  197. * Interface for Container classes whose Items can be traversed in order.
  198. */
  199. public interface Ordered extends Container {
  200. /**
  201. * Gets the ID of the Item following the Item that corresponds to
  202. * <code>itemId</code>. If the given Item is the last or not found in
  203. * the Container, <code>null</code> is returned.
  204. *
  205. * @param itemId
  206. * ID of an Item in the Container
  207. * @return ID of the next Item or <code>null</code>
  208. */
  209. public Object nextItemId(Object itemId);
  210. /**
  211. * Gets the ID of the Item preceding the Item that corresponds to
  212. * <code>itemId</code>. If the given Item is the first or not found
  213. * in the Container, <code>null</code> is returned.
  214. *
  215. * @param itemId
  216. * ID of an Item in the Container
  217. * @return ID of the previous Item or <code>null</code>
  218. */
  219. public Object prevItemId(Object itemId);
  220. /**
  221. * Gets the ID of the first Item in the Container.
  222. *
  223. * @return ID of the first Item in the Container
  224. */
  225. public Object firstItemId();
  226. /**
  227. * Gets the ID of the last Item in the Container..
  228. *
  229. * @return ID of the last Item in the Container
  230. */
  231. public Object lastItemId();
  232. /**
  233. * Tests if the Item corresponding to the given Item ID is the first
  234. * Item in the Container.
  235. *
  236. * @param itemId
  237. * ID of an Item in the Container
  238. * @return <code>true</code> if the Item is first in the Container,
  239. * <code>false</code> if not
  240. */
  241. public boolean isFirstId(Object itemId);
  242. /**
  243. * Tests if the Item corresponding to the given Item ID is the last Item
  244. * in the Container.
  245. *
  246. * @return <code>true</code> if the Item is last in the Container,
  247. * <code>false</code> if not
  248. */
  249. public boolean isLastId(Object itemId);
  250. /**
  251. * Adds new item after the given item.
  252. * <p>
  253. * Adding an item after null item adds the item as first item of the
  254. * ordered container.
  255. * </p>
  256. *
  257. * @param previousItemId
  258. * Id of the previous item in ordered container.
  259. * @return Returns item id the the created new item or null if the
  260. * operation fails.
  261. */
  262. public Object addItemAfter(Object previousItemId)
  263. throws UnsupportedOperationException;
  264. /**
  265. * Adds new item after the given item.
  266. * <p>
  267. * Adding an item after null item adds the item as first item of the
  268. * ordered container.
  269. * </p>
  270. *
  271. * @param previousItemId
  272. * Id of the previous item in ordered container.
  273. * @param newItemId
  274. * Id of the new item to be added.
  275. * @return Returns new item or null if the operation fails.
  276. */
  277. public Item addItemAfter(Object previousItemId, Object newItemId)
  278. throws UnsupportedOperationException;
  279. }
  280. /** Interface for Container classes whose Items can be sorted. */
  281. public interface Sortable extends Ordered {
  282. /**
  283. * Sort method.
  284. *
  285. * Sorts the container items.
  286. *
  287. * @param propertyId
  288. * Array of container property IDs, which values are used
  289. * to sort the items in container as primary, secondary,
  290. * ... sorting criterion. All of the item IDs must be in
  291. * the collection returned by
  292. * <code>getSortableContainerPropertyIds</code>
  293. * @param ascending
  294. * Array of sorting order flags corresponding to each
  295. * property ID used in sorting. If this array is shorter
  296. * than propertyId array, ascending order is assumed for
  297. * items where the order is not specified. Use
  298. * <code>true</code> to sort in ascending order,
  299. * <code>false</code> to use descending order.
  300. */
  301. void sort(Object[] propertyId, boolean[] ascending);
  302. /**
  303. * Gets the container property IDs, which can be used to sort the item.
  304. *
  305. * @return The sortable field ids.
  306. */
  307. Collection getSortableContainerPropertyIds();
  308. }
  309. /** Interface for Container classes whose Items can be indexed. */
  310. public interface Indexed extends Ordered {
  311. /**
  312. * Gets the index of the Item corresponding to the itemId. The following
  313. * is <code>true</code> for the returned index: 0 <= index < size().
  314. *
  315. * @param itemId
  316. * ID of an Item in the Container
  317. * @return index of the Item, or -1 if the Container does not include
  318. * the Item
  319. */
  320. public int indexOfId(Object itemId);
  321. /**
  322. * Gets the ID of an Item by an index number.
  323. *
  324. * @param index
  325. * Index of the requested id in the Container
  326. * @return ID of the Item in the given index
  327. */
  328. public Object getIdByIndex(int index);
  329. /**
  330. * Adds new item at given index.
  331. * <p>
  332. * The indexes of the item currently in the given position and all the
  333. * following items are incremented.
  334. * </p>
  335. *
  336. * @param index
  337. * Index to add the new item.
  338. * @return Returns item id the the created new item or null if the
  339. * operation fails.
  340. */
  341. public Object addItemAt(int index) throws UnsupportedOperationException;
  342. /**
  343. * Adds new item at given index.
  344. * <p>
  345. * The indexes of the item currently in the given position and all the
  346. * following items are incremented.
  347. * </p>
  348. *
  349. * @param index
  350. * Index to add the new item.
  351. * @param newItemId
  352. * Id of the new item to be added.
  353. * @return Returns new item or null if the operation fails.
  354. */
  355. public Item addItemAt(int index, Object newItemId)
  356. throws UnsupportedOperationException;
  357. }
  358. /**
  359. * <p>
  360. * Interface for <code>Container</code> classes whose Items can be
  361. * arranged hierarchically. This means that the Items in the container
  362. * belong in a tree-like structure, with the following quirks:
  363. * </p>
  364. *
  365. * <ul>
  366. * <li>The Item structure may have more than one root elements
  367. * <li>The Items in the hierarchy can be declared explicitly to be able or
  368. * unable to have children.
  369. * </ul>
  370. */
  371. public interface Hierarchical extends Container {
  372. /**
  373. * Gets the IDs of all Items that are children of the specified Item.
  374. * The returned collection is unmodifiable.
  375. *
  376. * @param itemId
  377. * ID of the Item whose children the caller is interested
  378. * in
  379. * @return An unmodifiable {@link java.util.Collection collection}
  380. * containing the IDs of all other Items that are children in
  381. * the container hierarchy
  382. */
  383. public Collection getChildren(Object itemId);
  384. /**
  385. * Gets the ID of the parent Item of the specified Item.
  386. *
  387. * @param itemId
  388. * ID of the Item whose parent the caller wishes to find
  389. * out.
  390. * @return the ID of the parent Item. Will be <code>null</code> if the
  391. * specified Item is a root element.
  392. */
  393. public Object getParent(Object itemId);
  394. /**
  395. * Gets the IDs of all Items in the container that don't have a parent.
  396. * Such items are called <code>root</code> Items. The returned
  397. * collection is unmodifiable.
  398. *
  399. * @return An unmodifiable {@link java.util.Collection collection}
  400. * containing IDs of all root elements of the container
  401. */
  402. public Collection rootItemIds();
  403. /**
  404. * <p>
  405. * Sets the parent of an Item. The new parent item must exist and be
  406. * able to have children. (
  407. * <code>canHaveChildren(newParentId) == true</code>). It is also
  408. * possible to detach a node from the hierarchy (and thus make it root)
  409. * by setting the parent <code>null</code>.
  410. * </p>
  411. *
  412. * <p>
  413. * This operation is optional.
  414. * </p>
  415. *
  416. * @param itemId
  417. * ID of the item to be set as the child of the Item
  418. * identified with <code>newParentId</code>
  419. * @param newParentId
  420. * ID of the Item that's to be the new parent of the Item
  421. * identified with <code>itemId</code>
  422. * @return <code>true</code> if the operation succeeded,
  423. * <code>false</code> if not
  424. */
  425. public boolean setParent(Object itemId, Object newParentId)
  426. throws UnsupportedOperationException;
  427. /**
  428. * Tests if the Item with given ID can have any children. If the
  429. * Container also implements the <code>Managed</code> interface, the
  430. * items created with <code>newItem</code> can have children by
  431. * default.
  432. *
  433. * @param itemId
  434. * ID of the Item in the container whose child capability
  435. * is to be tested
  436. * @return <code>true</code> if the specified Item exists in the
  437. * Container and it can have children, <code>false</code> if
  438. * it's not found from the container or it can't have children.
  439. */
  440. public boolean areChildrenAllowed(Object itemId);
  441. /**
  442. * <p>
  443. * Sets the given Item's capability to have children. If the Item
  444. * identified with <code>itemId</code> already has children and
  445. * <code>areChildrenAllowed</code> is false this method fails and
  446. * <code>false</code> is returned.
  447. * </p>
  448. * <p>
  449. * The children must be first explicitly removed with
  450. * {@link #setParent(Object itemId, Object newParentId)}or
  451. * {@link com.itmill.toolkit.data.Container#removeItem(Object itemId)}.
  452. * </p>
  453. *
  454. * <p>
  455. * This operation is optional. If it is not implemented, the method
  456. * always returns <code>false</code>.
  457. * </p>
  458. *
  459. * @param itemId
  460. * ID of the Item in the container whose child capability
  461. * is to be set
  462. * @param areChildrenAllowed
  463. * boolean value specifying if the Item can have children
  464. * or not
  465. * @return <code>true</code> if the operation succeeded,
  466. * <code>false</code> if not
  467. */
  468. public boolean setChildrenAllowed(Object itemId,
  469. boolean areChildrenAllowed)
  470. throws UnsupportedOperationException;
  471. /**
  472. * Tests if the Item specified with <code>itemId</code> is a root
  473. * Item. The hierarchical container can have more than one root and must
  474. * have at least one unless it is empty. The
  475. * {@link #getParent(Object itemId)}method always returns
  476. * <code>null</code> for root Items.
  477. *
  478. * @param itemId
  479. * ID of the Item whose root status is to be tested
  480. * @return <code>true</code> if the specified Item is a root,
  481. * <code>false</code> if not
  482. */
  483. public boolean isRoot(Object itemId);
  484. /**
  485. * <p>
  486. * Tests if the Item specified with <code>itemId</code> has any child
  487. * Items, that is, is it a leaf Item. The
  488. * {@link #getChildren(Object itemId)}method always returns
  489. * <code>null</code> for leaf Items.
  490. * </p>
  491. *
  492. * <p>
  493. * Note that being a leaf does not imply whether or not an Item is
  494. * allowed to have children.
  495. * </p>.
  496. *
  497. * @param itemId
  498. * ID of the Item whose leaf status is to be tested
  499. * @return <code>true</code> if the specified Item is a leaf,
  500. * <code>false</code> if not
  501. */
  502. public boolean hasChildren(Object itemId);
  503. }
  504. /**
  505. * Interface is implemented by containers that allow reducing their
  506. * visiblecontents with set of filters.
  507. *
  508. * When a set of filters are set, only items that match the filters are
  509. * included in the visible contents of the container. Still new items that
  510. * do not match filters can be added to the container. Multiple filters can
  511. * be added and the container remembers the state of the filters. When
  512. * multiple filters are added, all filters must match for an item to be
  513. * visible in the container.
  514. *
  515. * @since 5.0
  516. */
  517. public interface Filterable extends Container {
  518. /**
  519. * Add a filter for given property.
  520. *
  521. * Only items where given property for which toString() contains or
  522. * starts with given filterString are visible in the container.
  523. *
  524. * @param propertyId
  525. * Property for which the filter is applied to.
  526. * @param filterString
  527. * String that must match contents of the property
  528. * @param ignoreCase
  529. * Determine if the casing can be ignored when comparing
  530. * strings.
  531. * @param onlyMatchPrefix
  532. * Only match prefixes; no other matches are included.
  533. */
  534. public void addContainerFilter(Object propertyId, String filterString,
  535. boolean ignoreCase, boolean onlyMatchPrefix);
  536. /** Remove all filters from all properties. */
  537. public void removeAllContainerFilters();
  538. /** Remove all filters from given property. */
  539. public void removeContainerFilters(Object propertyId);
  540. }
  541. /**
  542. * Interface implemented by viewer classes capable of using a Container as a
  543. * data source.
  544. */
  545. public interface Viewer {
  546. /**
  547. * Sets the Container that serves as the data source of the viewer.
  548. *
  549. * @param newDataSource
  550. * The new data source Item
  551. */
  552. public void setContainerDataSource(Container newDataSource);
  553. /**
  554. * Gets the Container serving as the data source of the viewer.
  555. *
  556. * @return data source Container
  557. */
  558. public Container getContainerDataSource();
  559. }
  560. /**
  561. * <p>
  562. * Interface implemented by the editor classes supporting editing the
  563. * Container. Implementing this interface means that the Container serving
  564. * as the data source of the editor can be modified through it.
  565. * </p>
  566. * <p>
  567. * Note that not implementing the <code>Container.Editor</code> interface
  568. * does not restrict the class from editing the Container contents
  569. * internally.
  570. * </p>
  571. */
  572. public interface Editor extends Container.Viewer {
  573. }
  574. /* Contents change event ******************************************* */
  575. /**
  576. * An <code>Event</code> object specifying the Container whose Item set
  577. * has changed. Note that these events are triggered only through succesful
  578. * calls to the <code>newItem</code> and <code>removeAllItems</code>
  579. * methods in the Container.Managed interface.
  580. */
  581. public interface ItemSetChangeEvent {
  582. /**
  583. * Gets the Property where the event occurred.
  584. *
  585. * @return source of the event
  586. */
  587. public Container getContainer();
  588. }
  589. /** Container Item set change listener interface. */
  590. public interface ItemSetChangeListener {
  591. /**
  592. * Lets the listener know a Containers Item set has changed.
  593. *
  594. * @param event
  595. * change event text
  596. */
  597. public void containerItemSetChange(Container.ItemSetChangeEvent event);
  598. }
  599. /**
  600. * The interface for adding and removing <code>ItemSetChangeEvent</code>
  601. * listeners. By implementing this interface a class explicitly announces
  602. * that it will generate a <code>ItemSetChangeEvent</code> when its
  603. * contents are modified.
  604. * <p>
  605. * Note: The general Java convention is not to explicitly declare that a
  606. * class generates events, but to directly define the
  607. * <code>addListener</code> and <code>removeListener</code> methods.
  608. * That way the caller of these methods has no real way of finding out if
  609. * the class really will send the events, or if it just defines the methods
  610. * to be able to implement an interface.
  611. * </p>
  612. */
  613. public interface ItemSetChangeNotifier {
  614. /**
  615. * Adds an Item set change listener for the object.
  616. *
  617. * @param listener
  618. * listener to be added
  619. */
  620. public void addListener(Container.ItemSetChangeListener listener);
  621. /**
  622. * Removes the Item set change listener from the object.
  623. *
  624. * @param listener
  625. * listener to be removed
  626. */
  627. public void removeListener(Container.ItemSetChangeListener listener);
  628. }
  629. /* Property set change event ******************************************** */
  630. /**
  631. * An <code>Event</code> object specifying the Container whose Property
  632. * set has changed.
  633. * <p>
  634. * Note: These events are triggered only through succesful calls to the
  635. * <code>addProperty</code> and <code>removeProperty</code> methods in
  636. * the Container.Managed interface.
  637. * </p>
  638. */
  639. public interface PropertySetChangeEvent {
  640. /**
  641. * Retrieves the Container whose contents have been modified.
  642. *
  643. * @return Source Container of the event.
  644. */
  645. public Container getContainer();
  646. }
  647. /**
  648. * The listener interface for receiving <code>PropertySetChangeEvent</code>
  649. * objects.
  650. */
  651. public interface PropertySetChangeListener {
  652. /**
  653. * Notifies this listener that the Containers contents has changed.
  654. *
  655. * @param event
  656. * Change event.
  657. */
  658. public void containerPropertySetChange(
  659. Container.PropertySetChangeEvent event);
  660. }
  661. /**
  662. * <p>
  663. * The interface for adding and removing <code>PropertySetChangeEvent</code>
  664. * listeners. By implementing this interface a class explicitly announces
  665. * that it will generate a <code>PropertySetChangeEvent</code> when its
  666. * contents are modified.
  667. * </p>
  668. * <p>
  669. * Note that the general Java convention is not to explicitly declare that a
  670. * class generates events, but to directly define the
  671. * <code>addListener</code> and <code>removeListener</code> methods.
  672. * That way the caller of these methods has no real way of finding out if
  673. * the class really will send the events, or if it just defines the methods
  674. * to be able to implement an interface.
  675. * </p>
  676. */
  677. public interface PropertySetChangeNotifier {
  678. /**
  679. * Registers a new Property set change listener for this Container.
  680. *
  681. * @param listener
  682. * The new Listener to be registered
  683. */
  684. public void addListener(Container.PropertySetChangeListener listener);
  685. /**
  686. * Removes a previously registered Property set change listener.
  687. *
  688. * @param listener
  689. * Listener to be removed
  690. */
  691. public void removeListener(Container.PropertySetChangeListener listener);
  692. }
  693. }