public final class Watch extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Watch.Pin
A base interface for a watch pin location.
|
Modifier and Type | Field and Description |
---|---|
static String |
PROP_ENABLED
Name of the property for the enabled status of the watch.
|
static String |
PROP_EXPRESSION
Name of the property for the watched expression.
|
static String |
PROP_VALUE
Name of the property for the value of the watched expression.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener.
|
String |
getExpression()
Return expression this watch is created for.
|
Watch.Pin |
getPin()
Get a pin location, where the watch is pinned at, if any.
|
boolean |
isEnabled()
Test whether the watch is enabled.
|
void |
remove()
Remove the watch from the list of all watches in the system.
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener.
|
void |
setEnabled(boolean enabled)
Set enabled state of the watch.
|
void |
setExpression(String expression)
Set the expression to watch.
|
public static final String PROP_EXPRESSION
public static final String PROP_VALUE
public static final String PROP_ENABLED
public boolean isEnabled()
true
if the watch is enabled,
false
otherwise.public void setEnabled(boolean enabled)
enabled
- true
if this watch should be enabled,
false
otherwisepublic String getExpression()
public void setExpression(String expression)
expression
- expression to watchpublic Watch.Pin getPin()
null
.public void remove()
public void addPropertyChangeListener(PropertyChangeListener l)
l
- the listener to addpublic void removePropertyChangeListener(PropertyChangeListener l)
l
- the listener to remove