public abstract class AbstractGriffonModel extends AbstractGriffonMvcArtifact implements GriffonModel
Modifier and Type | Field and Description |
---|---|
protected java.beans.PropertyChangeSupport |
pcs |
protected java.beans.VetoableChangeSupport |
vcs |
application
Constructor and Description |
---|
AbstractGriffonModel() |
AbstractGriffonModel(GriffonApplication application)
Deprecated.
Griffon prefers field injection over constructor injector for artifacts as of 2.1.0
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the given PropertyChangeListener to the listener list.
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes the given PropertyChangeListener from the listener list.
|
void |
addVetoableChangeListener(java.lang.String propertyName,
java.beans.VetoableChangeListener listener)
Add a VetoableChangeListener for a specific property.
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Add a VetoableListener to the listener list.
|
protected void |
firePropertyChange(java.beans.PropertyChangeEvent event) |
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue) |
protected void |
fireVetoableChange(java.beans.PropertyChangeEvent event) |
protected void |
fireVetoableChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue) |
protected java.lang.String |
getArtifactType() |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the listeners that were added with addPropertyChangeListener().
|
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String propertyName)
Returns an array of all the listeners which have been associated
with the named property.
|
java.beans.VetoableChangeListener[] |
getVetoableChangeListeners()
Returns the list of VetoableChangeListeners.
|
java.beans.VetoableChangeListener[] |
getVetoableChangeListeners(java.lang.String propertyName)
Returns an array of all the listeners which have been associated
with the named property.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the given PropertyChangeListener from the listener list.
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes the given PropertyChangeListener from the listener list.
|
void |
removeVetoableChangeListener(java.lang.String propertyName,
java.beans.VetoableChangeListener listener)
Remove a VetoableChangeListener for a specific property.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Remove a VetoableChangeListener from the listener list.
|
createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, destroyMVCGroup, getMvcGroup, mvcGroupDestroy, mvcGroupInit, setMvcGroup, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup
classloader, getApplication, getGriffonClass, getLog, getResourceAsStream, getResourceAsURL, getResources, getTypeClass, isUIThread, msg, msg, msg, msg, runFuture, runFuture, runInsideUIAsync, runInsideUISync, runInsideUISync, runOutsideUI, runOutsideUIAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMvcGroup, mvcGroupDestroy, mvcGroupInit
getApplication, getGriffonClass, getLog, getTypeClass
isUIThread, runFuture, runFuture, runInsideUIAsync, runInsideUISync, runInsideUISync, runOutsideUI, runOutsideUIAsync
createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, destroyMVCGroup, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup
classloader, getResourceAsStream, getResourceAsURL, getResources
protected final java.beans.PropertyChangeSupport pcs
protected final java.beans.VetoableChangeSupport vcs
public AbstractGriffonModel()
@Inject @Deprecated public AbstractGriffonModel(@Nonnull GriffonApplication application)
application
- the GriffonApplication that holds this artifact.@Nonnull protected java.lang.String getArtifactType()
getArtifactType
in class AbstractGriffonArtifact
public void addVetoableChangeListener(@Nullable java.beans.VetoableChangeListener listener)
Vetoable
listener
is null, no exception is thrown and no action
is taken.addVetoableChangeListener
in interface Vetoable
listener
- The VetoableChangeListener to be addedpublic void addVetoableChangeListener(@Nullable java.lang.String propertyName, @Nullable java.beans.VetoableChangeListener listener)
Vetoable
propertyName
or listener
is null, no
exception is thrown and no action is taken.addVetoableChangeListener
in interface Vetoable
propertyName
- The name of the property to listen on.listener
- The VetoableChangeListener to be addedpublic void removeVetoableChangeListener(@Nullable java.beans.VetoableChangeListener listener)
Vetoable
listener
was added more than once to the same event
source, it will be notified one less time after being removed.
If listener
is null, or was never added, no exception is
thrown and no action is taken.removeVetoableChangeListener
in interface Vetoable
listener
- The VetoableChangeListener to be removedpublic void removeVetoableChangeListener(@Nullable java.lang.String propertyName, @Nullable java.beans.VetoableChangeListener listener)
Vetoable
listener
was added more than once to the same event
source for the specified property, it will be notified one less time
after being removed.
If propertyName
is null, no exception is thrown and no
action is taken.
If listener
is null, or was never added for the specified
property, no exception is thrown and no action is taken.removeVetoableChangeListener
in interface Vetoable
propertyName
- The name of the property that was listened on.listener
- The VetoableChangeListener to be removed@Nonnull public java.beans.VetoableChangeListener[] getVetoableChangeListeners()
Vetoable
getVetoableChangeListeners
in interface Vetoable
@Nonnull public java.beans.VetoableChangeListener[] getVetoableChangeListeners(@Nullable java.lang.String propertyName)
Vetoable
getVetoableChangeListeners
in interface Vetoable
propertyName
- The name of the property being listened toVetoableChangeListeners
associated with
the named property. If no such listeners have been added,
or if propertyName
is null, an empty array is
returned.public void addPropertyChangeListener(@Nullable java.beans.PropertyChangeListener listener)
Observable
The listener is registered for all bound properties of this class.
addPropertyChangeListener
in interface Observable
listener
- the PropertyChangeListener to be addedObservable.removePropertyChangeListener(PropertyChangeListener)
public void addPropertyChangeListener(@Nullable java.lang.String propertyName, @Nullable java.beans.PropertyChangeListener listener)
Observable
The listener is registered an specific property of this class.
addPropertyChangeListener
in interface Observable
propertyName
- The name of the property to listen on.listener
- the PropertyChangeListener to be addedObservable.removePropertyChangeListener(String, PropertyChangeListener)
public void removePropertyChangeListener(@Nullable java.beans.PropertyChangeListener listener)
Observable
This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.
removePropertyChangeListener
in interface Observable
listener
- the PropertyChangeListener to be removedObservable.addPropertyChangeListener(PropertyChangeListener)
public void removePropertyChangeListener(@Nullable java.lang.String propertyName, @Nullable java.beans.PropertyChangeListener listener)
Observable
This method should be used to remove PropertyChangeListeners that were registered for an specific property of this class.
removePropertyChangeListener
in interface Observable
propertyName
- The name of the property that was listened on.listener
- the PropertyChangeListener to be removedObservable.addPropertyChangeListener(String, PropertyChangeListener)
@Nonnull public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
Observable
getPropertyChangeListeners
in interface Observable
PropertyChangeListeners
added or an empty array if no
listeners have been added.@Nonnull public java.beans.PropertyChangeListener[] getPropertyChangeListeners(@Nullable java.lang.String propertyName)
Observable
getPropertyChangeListeners
in interface Observable
propertyName
- The name of the property being listened toPropertyChangeListeners
associated with
the named property. If no such listeners have been added,
or if propertyName
is null, an empty array is
returned.protected void firePropertyChange(@Nonnull java.beans.PropertyChangeEvent event)
protected void firePropertyChange(@Nonnull java.lang.String propertyName, @Nullable java.lang.Object oldValue, @Nullable java.lang.Object newValue)
protected void fireVetoableChange(@Nonnull java.beans.PropertyChangeEvent event) throws java.beans.PropertyVetoException
java.beans.PropertyVetoException
protected void fireVetoableChange(@Nonnull java.lang.String propertyName, @Nullable java.lang.Object oldValue, @Nullable java.lang.Object newValue) throws java.beans.PropertyVetoException
java.beans.PropertyVetoException