public class ViewerNotification extends NotificationWrapper implements IViewerNotification
IViewerNotification
that decorates an ordinary Notification
.Modifier and Type | Field and Description |
---|---|
protected boolean |
contentRefresh
Whether the content under the element should be structurally refreshed.
|
protected java.lang.Object |
element
The element to update or from which to refresh.
|
protected boolean |
labelUpdate
Whether the label and icon for the element should be updated.
|
notification, notifier
ADD, ADD_MANY, CREATE, EVENT_TYPE_COUNT, MOVE, NO_FEATURE_ID, NO_INDEX, REMOVE, REMOVE_MANY, REMOVING_ADAPTER, RESOLVE, SET, UNSET
Constructor and Description |
---|
ViewerNotification(IViewerNotification viewerNotification,
java.lang.Object element)
Wraps an existing viewer notification to specify a different element.
|
ViewerNotification(Notification decoratedNotification)
Creates a notification to fully refresh a viewer.
|
ViewerNotification(Notification decoratedNotification,
java.lang.Object element)
Creates a notification to refresh the content under and update the label for the given element.
|
ViewerNotification(Notification decoratedNotification,
java.lang.Object element,
boolean contentRefresh,
boolean labelUpdate)
Creates a notification to optionally refresh the content under and update the label for the given element.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getElement()
Returns the element to update or from which to refresh.
|
boolean |
isContentRefresh()
Returns whether the content under the element should be structurally refreshed.
|
boolean |
isLabelUpdate()
Returns whether the label and icon for the element should be updated.
|
java.lang.String |
toString() |
static Notification |
wrapNotification(Notification notification,
java.lang.Object element)
Wraps the given notification to make the given element be operated on by the viewer that receives it.
|
getEventType, getFeature, getFeatureID, getNewBooleanValue, getNewByteValue, getNewCharValue, getNewDoubleValue, getNewFloatValue, getNewIntValue, getNewLongValue, getNewShortValue, getNewStringValue, getNewValue, getNotifier, getOldBooleanValue, getOldByteValue, getOldCharValue, getOldDoubleValue, getOldFloatValue, getOldIntValue, getOldLongValue, getOldShortValue, getOldStringValue, getOldValue, getPosition, isReset, isTouch, merge, wasSet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEventType, getFeature, getFeatureID, getNewBooleanValue, getNewByteValue, getNewCharValue, getNewDoubleValue, getNewFloatValue, getNewIntValue, getNewLongValue, getNewShortValue, getNewStringValue, getNewValue, getNotifier, getOldBooleanValue, getOldByteValue, getOldCharValue, getOldDoubleValue, getOldFloatValue, getOldIntValue, getOldLongValue, getOldShortValue, getOldStringValue, getOldValue, getPosition, isReset, isTouch, merge, wasSet
protected java.lang.Object element
getElement()
protected boolean contentRefresh
isContentRefresh()
protected boolean labelUpdate
isLabelUpdate()
public ViewerNotification(Notification decoratedNotification)
public ViewerNotification(Notification decoratedNotification, java.lang.Object element)
public ViewerNotification(Notification decoratedNotification, java.lang.Object element, boolean contentRefresh, boolean labelUpdate)
public ViewerNotification(IViewerNotification viewerNotification, java.lang.Object element)
public static Notification wrapNotification(Notification notification, java.lang.Object element)
IViewerNotification
, it is wrapped
in a ViewerNotification
, with that element. Otherwise, it is wrapped in a NotificationWrapper
that returns the element as its notifier
.public java.lang.Object getElement()
getElement
in interface IViewerNotification
public boolean isContentRefresh()
isContentRefresh
in interface IViewerNotification
public boolean isLabelUpdate()
isLabelUpdate
in interface IViewerNotification
public java.lang.String toString()
toString
in class java.lang.Object