Class ContentEvent


  • public class ContentEvent
    extends NotificationEvent
    Notification event that says that the contents of a container have changed. The target element is the container.

    If content is moved from one container element to another, the event with REMOVEand that with ADDare received respectively.

    • Field Detail

      • SHIFT

        public static final int SHIFT
        Content element is shifted in the same container element.
        See Also:
        Constant Field Values
      • focus

        protected org.eclipse.birt.report.model.core.ContainerContext focus
    • Constructor Detail

      • ContentEvent

        public ContentEvent​(org.eclipse.birt.report.model.core.DesignElement theContainer,
                            org.eclipse.birt.report.model.core.DesignElement theContent,
                            int theSlot,
                            int theAction)
        Constructs the content event with the container element, content element, the slot within this container and the event operation kind.
        Parameters:
        theContainer - the container element
        theContent - the content element
        theSlot - the slot within the container
        theAction - the action causing this event
      • ContentEvent

        public ContentEvent​(org.eclipse.birt.report.model.core.ContainerContext containerInfo,
                            org.eclipse.birt.report.model.core.DesignElement theContent,
                            int theAction)
        Parameters:
        containerInfo -
        theContent -
        theAction -
    • Method Detail

      • getEventType

        public int getEventType()
        Description copied from class: NotificationEvent
        Returns the event type. The following event types are defined:
        • CONTENT_EVENT
        • ELEMENT_DELETE_EVENT
        • EXTENDS_EVENT
        • NAME_EVENT
        • NAME_SPACE_EVENT
        • PROPERTY_EVENT
        • STYLE_EVENT
        • USER_PROP_EVENT
        • CUSTOM_MSG_EVENT
        • EXTENSION_PROPERTY_DEFINITION_EVENT
        • NOTIFICATION_EVENT
        • VALIDATION_EVENT
        • LIBRARY_EVENT
        • ATTRIBUTE_EVENT
        • DISPOSE_EVENT
        • CONTENT_REPLACE_EVENT
        • TEMPLATE_TRANSFORM_EVENT
        Specified by:
        getEventType in class NotificationEvent
        Returns:
        the event type.
      • getAction

        public int getAction()
        Returns the type of action. One of ADD,REMOVE, or SHIFT.
        Returns:
        the action causing this event.
      • getSlot

        public int getSlot()
        Returns the slot id within the container.
        Returns:
        the slot id within the container
      • getContent

        public IDesignElement getContent()
        Returns the content element causing this event.
        Returns:
        the content element causing this event.
      • isSame

        public boolean isSame​(NotificationEvent event)
        Description copied from class: NotificationEvent
        Compares and justifies whether this event and the given event is the same.
        Overrides:
        isSame in class NotificationEvent
        Parameters:
        event - the event to compare
        Returns:
        true if the two events are the same, otherwise false