public class UIEvents extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ALL_ELEMENT_ID
Special id passed to force all elements to be checked
|
static String |
ALL_SUB_TOPICS
Wild card character for matching all sub topics
|
static String |
REQUEST_ENABLEMENT_UPDATE_TOPIC
Event sent when a enabled update is requested for tool-items.
|
static String |
TOPIC_SEP
Topic separator character
|
static String |
UIModelTopicBase
Name element for all E4 UI model events (these are generated by GenTopic)
|
static String |
UIRendererTopicBase
Name element for E4 Renderer events
|
static String |
UITopicBase
Base name of all E4 UI events
|
Constructor and Description |
---|
UIEvents() |
Modifier and Type | Method and Description |
---|---|
static Iterable<?> |
asIterable(Event event,
String propertyName)
Return the provided event property as an iterable.
|
static String |
buildTopic(String topic)
Deprecated.
|
static String |
buildTopic(String topic,
String attrName)
Deprecated.
|
static String |
buildTopic(String topic,
String attrName,
String eventType)
Deprecated.
|
static boolean |
contains(Event event,
String propertyName,
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(String topic,
Map<String,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(String topic,
MUIElement changedElement)
Publish the topic to the changedElements global event bus.
|
public static final String TOPIC_SEP
public static final String ALL_SUB_TOPICS
public static final String UITopicBase
public static final String UIModelTopicBase
public static final String UIRendererTopicBase
public static final 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
checkSelector
public static final 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, String propertyName, 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 o
public static Iterable<?> asIterable(Event event, String propertyName)
event
- the event objectpropertyName
- the name of the propertypublic static boolean publishEvent(String topic, MUIElement changedElement)
topic
- to broadcastchangedElement
- the element that changedpublic static boolean publishEvent(String topic, Map<String,Object> argMap)
topic
- to broadcastargMap
- arguments map with a minimum of a changedElement@Deprecated public static String buildTopic(String topic)
@Deprecated public static String buildTopic(String topic, String attrName)
@Deprecated public static String buildTopic(String topic, String attrName, String eventType)
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.