public final class ComponentSubject extends java.lang.Object implements IComponentSubject
IComponentSubject.fetchComponents(de.desy.mst.libs.accelerator.IEData)
method.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLAZZ
Class name.
|
static long |
DELAY_TIME_INITIALIZE_CLAZZ
The delay time of this class after which the user is informed when the
observer doesn't exist.
|
static long |
serialVersionUID
The serial version UID, which is used by the java.io.Serializable
interface.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(IEData data_)
Returns if this data component is stored in the internal data value.
|
java.util.Collection<IViewComponent> |
fetchComponents(IEData data_)
Fetches all components of the specified enumeration.
|
java.util.Collection<java.lang.Boolean> |
fetchComponentsEnabled(IEData data_)
Fetches from all elements of the corresponding data component enumeration
if they are enabled or disabled.
|
java.util.Collection<IEData> |
fetchObservers()
Returns all observer enumeration objects as a collection.
|
static IComponentSubject |
getInstance()
This returns a singleton instance of the current class object.
|
boolean |
isIgnored(IEData data_)
Fetches the ignore flag of the specified data enumeration element.
|
boolean |
isRegisterEnabled(IEData data_,
IViewComponent component_)
Provides the caller if the current data enumeration and the component
itself is enabled or not.
|
void |
notify(IEData data_,
EViewElement view_)
Notifies all instance of the corresponding data element and executes
the view element.
|
void |
notify(IEData data_,
EViewElement view_,
java.lang.Object object_)
Attention about the logging information printed by this
method! It will also display a short message with the data enumeration
element and the viewable UI constraints if it is called from a non
AWT Event Dispatch Thread, which can cause a funny behavior for redrawing
some UI elements.
|
void |
register(IEData data_)
Registers the data element to the component subject instance.
|
void |
register(IEData data_,
IViewComponent component_)
This will register to an enumeration type a component.
|
void |
remove(IEData data_)
Removes the enumeration object and destroys all object which are stored
under the enumeration.
|
void |
setRegisterEnabled(IEData data_,
IViewComponent component_,
boolean enabled_)
Sets the data enumeration and the component itself to be enabled or
not depending on the boolean value.
|
public static final long serialVersionUID
public static final java.lang.String CLAZZ
public static final long DELAY_TIME_INITIALIZE_CLAZZ
public static final IComponentSubject getInstance()
public final boolean isRegisterEnabled(IEData data_, IViewComponent component_)
IComponentSubject
isRegisterEnabled
in interface IComponentSubject
data_
- Enumeration interface element.component_
- Is the viewable component.public final boolean isIgnored(IEData data_)
IComponentSubject
false
is returned.isIgnored
in interface IComponentSubject
data_
- Data enumeration element.public final void setRegisterEnabled(IEData data_, IViewComponent component_, boolean enabled_)
IComponentSubject
IComponentSubject.notify(IEData, EViewElement, Object)
method if the
component should act on the method notify or not.setRegisterEnabled
in interface IComponentSubject
data_
- Is the enumeration interface of the data component.component_
- Is the component to which to set the boolean value.enabled_
- Is a boolean value, which tells the
IComponentSubject.notify(IEData, EViewElement, Object)
method
to get notice of the notification or not.public final java.util.Collection<java.lang.Boolean> fetchComponentsEnabled(IEData data_)
true
is returned, if the value is enabled otherwise
a false
.data_
- The data component enumeration.public final java.util.Collection<IViewComponent> fetchComponents(IEData data_)
IComponentSubject
Collections.synchronizedCollection(Collection)
or by
the unmodifiable collection of
Collections.unmodifiableCollection(Collection)
.fetchComponents
in interface IComponentSubject
data_
- Is the enumeration from which all components are returned.public final java.util.Collection<IEData> fetchObservers()
IComponentSubject
Collections.synchronizedCollection(Collection)
or by
the unmodifiable collection of
Collections.unmodifiableCollection(Collection)
.fetchObservers
in interface IComponentSubject
public final boolean contains(IEData data_)
IComponentSubject
contains
in interface IComponentSubject
data_
- The data component you are asking for.public final void notify(IEData data_, EViewElement view_)
IComponentSubject
IComponentSubject.notify(IEData, EViewElement, Object)
.notify
in interface IComponentSubject
data_
- Is the enumeration object.view_
- This is the view element on the screen.IComponentSubject.notify(IEData, EViewElement, Object)
public final void notify(IEData data_, EViewElement view_, java.lang.Object object_)
Attention about the logging information printed by this method! It will also display a short message with the data enumeration element and the viewable UI constraints if it is called from a non AWT Event Dispatch Thread, which can cause a funny behavior for redrawing some UI elements.
If the data element doesn't exist in the observable object for a
certain time (declared as a public field called DELAY_TIME_INITIALIZE_CLAZZ
)
then a logging information is printed as a warning in the appender. By
setting the logging level to (for example) error, then the information is
not printed (indirectly it is printed as a warning but is not seen in the
console appender).
notify
in interface IComponentSubject
data_
- Is the enumeration object.view_
- This is the view element on the screen.object_
- Is the object you wanted to set.IComponentSubject.notify(de.desy.mst.libs.accelerator.IEData, de.desy.mst.libs.accelerator.EViewElement, java.lang.Object)
public final void register(IEData data_)
IComponentSubject
register
in interface IComponentSubject
data_
- Data element.public final void register(IEData data_, IViewComponent component_)
IComponentSubject
register
in interface IComponentSubject
data_
- Data element.component_
- Is the component element. This should never be null
otherwise an IllegalArgumentException is thrown.public final void remove(IEData data_)
IComponentSubject
remove
in interface IComponentSubject
data_
- The destroyed data element.14-September-2016 18:23 Deutsches Elektronen-Synchrotron DESY in der Helmholtz-Gemeinschaft