public class AttributeChangeNotificationFilter extends Object implements NotificationFilter
attribute change notification
NotificationFilter
这类实现的接口。过滤是对所观察到的属性的名称进行。
它管理一个启用的属性名称的列表。一种方法允许用户启用/禁用所需的多个属性名称。
Constructor and Description |
---|
AttributeChangeNotificationFilter() |
Modifier and Type | Method and Description |
---|---|
void |
disableAllAttributes()
禁用所有的属性名称。
|
void |
disableAttribute(String name)
禁用所有属性更改通知,其中的属性名称等于将要发送给侦听器的指定属性名称的属性名称。
|
void |
enableAttribute(String name)
启用所有属性更改通知,其中的属性名称等于将要发送给侦听器的指定名称的属性名称。
|
Vector<String> |
getEnabledAttributes()
获取此筛选器的所有已启用的属性名称。
|
boolean |
isNotificationEnabled(Notification notification)
在向侦听器发送指定的通知之前调用。
|
public boolean isNotificationEnabled(Notification notification)
true
。
isNotificationEnabled
接口
NotificationFilter
notification
-属性更改通知被发送。
true
如果通知已被发送给听众,
false
否则。
public void enableAttribute(String name) throws IllegalArgumentException
name
-属性名称。
IllegalArgumentException
-属性名称参数为空。
public void disableAttribute(String name)
name
-属性名称。
public void disableAllAttributes()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.