public class UIEvents
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALL_ELEMENT_ID
Special id passed to force all elements to be checked
|
static java.lang.String |
ALL_SUB_TOPICS
Wild card character for matching all sub topics
|
static java.lang.String |
REQUEST_ENABLEMENT_UPDATE_TOPIC
Event sent when a enabled update is requested for tool-items.
|
static java.lang.String |
TOPIC_SEP
Topic separator character
|
static java.lang.String |
UIModelTopicBase
Name element for all E4 UI model events (these are generated by GenTopic)
|
static java.lang.String |
UIRendererTopicBase
Name element for E4 Renderer events
|
static java.lang.String |
UITopicBase
Base name of all E4 UI events
|
| Constructor and Description |
|---|
UIEvents() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Iterable<?> |
asIterable(Event event,
java.lang.String propertyName)
Return the provided event property as an iterable.
|
static java.lang.String |
buildTopic(java.lang.String topic)
Deprecated.
|
static java.lang.String |
buildTopic(java.lang.String topic,
java.lang.String attrName)
Deprecated.
|
static java.lang.String |
buildTopic(java.lang.String topic,
java.lang.String attrName,
java.lang.String eventType)
Deprecated.
|
static boolean |
contains(Event event,
java.lang.String propertyName,
java.lang.Object o)
Return true if the specified property contains
o. |
static boolean |
isADD(Event event) |
static boolean |
isCREATE(Event event) |
static boolean |
isREMOVE(Event event) |
static boolean |
isSET(Event event) |
static boolean |
publishEvent(java.lang.String topic,
java.util.Map<java.lang.String,java.lang.Object> argMap)
Publish the topic with the provided arguments to the global event bus. argMap MUST contain an
EventTags.ELEMENT argument that is an MUIElement. the contained MUIElement will be used to
determine the event bus to publish to.
|
static boolean |
publishEvent(java.lang.String topic,
MUIElement changedElement)
Publish the topic to the changedElements global event bus.
|
public static final java.lang.String TOPIC_SEP
public static final java.lang.String ALL_SUB_TOPICS
public static final java.lang.String UITopicBase
public static final java.lang.String UIModelTopicBase
public static final java.lang.String UIRendererTopicBase
public static final java.lang.String REQUEST_ENABLEMENT_UPDATE_TOPIC
As a value you may pass in to the IEventBroker.DATA:
ALL_ELEMENT_ID to request changes of all
applicable elements (the default)MApplicationElement.getElementId() of the element to
checkSelectorpublic static final java.lang.String ALL_ELEMENT_ID
public static boolean isADD(Event event)
event - An OSGI event representing a UIEventUIEvents.EventTypes.ADD or
UIEvents.EventTypes.ADD_MANY), or false otherwise.UIEvents.EventTags.NEW_VALUE,
asIterable(Event, String)public static boolean isREMOVE(Event event)
event - An OSGI event representing a UIEventUIEvents.EventTypes.REMOVE or
UIEvents.EventTypes.REMOVE_MANY), or false otherwise.UIEvents.EventTags.OLD_VALUE,
asIterable(Event, String)public static boolean isSET(Event event)
event - An OSGI event representing a UIEventpublic static boolean isCREATE(Event event)
event - An OSGI event representing a UIEventpublic static boolean contains(Event event, java.lang.String propertyName, java.lang.Object o)
o. Intended as a helper function for
UIEvents.EventTypes.ADD, UIEvents.EventTypes.ADD_MANY, UIEvents.EventTypes.REMOVE, and
UIEvents.EventTypes.REMOVE_MANY. If the property is not a container (e.g., a collection or
array), then return true then if container is equal to o.event - the eventpropertyName - the property nameo - the object to check for containmento or is equal to opublic static java.lang.Iterable<?> asIterable(Event event, java.lang.String propertyName)
event - the event objectpropertyName - the name of the propertypublic static boolean publishEvent(java.lang.String topic,
MUIElement changedElement)
topic - to broadcastchangedElement - the element that changedpublic static boolean publishEvent(java.lang.String topic,
java.util.Map<java.lang.String,java.lang.Object> argMap)
topic - to broadcastargMap - arguments map with a minimum of a changedElement@Deprecated public static java.lang.String buildTopic(java.lang.String topic)
@Deprecated
public static java.lang.String buildTopic(java.lang.String topic,
java.lang.String attrName)
@Deprecated
public static java.lang.String buildTopic(java.lang.String topic,
java.lang.String attrName,
java.lang.String eventType)
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.