Class EventPlotInfo

  • All Implemented Interfaces:
    PlotInfo, TimePlotInfo

    public class EventPlotInfo
    extends TimePlotInfoWrapper
    implements TimePlotInfo

    A handle to one of the plotting areas making up a StackedTimePlot2D. This is a specialized plotting area which supports display and manipulation of Event objects.

    For an example of this plot in use, see com.mcom.metsci.glimpse.examples.stacked.CollapsibleTimelinePlotExample.

    Author:
    ulman
    • Method Detail

      • setDefaultIconSize

        public void setDefaultIconSize​(int size)
      • getDefaultIconSize

        public int getDefaultIconSize()
      • isUseDefaultIconSize

        public boolean isUseDefaultIconSize()
      • setUseDefaultIconSize

        public void setUseDefaultIconSize​(boolean useDefaultIconSize)
      • setAggregateNearbyEvents

        public void setAggregateNearbyEvents​(boolean aggregate)
      • isAggregateNearbyEvents

        public boolean isAggregateNearbyEvents()
      • setEventToolTipHandler

        public void setEventToolTipHandler​(EventToolTipHandler toolTipHandler)
      • isMouseDragEnabled

        public boolean isMouseDragEnabled()
      • setMouseDragEnabled

        public void setMouseDragEnabled​(boolean enabled)
      • addEventPlotListener

        public void addEventPlotListener​(EventPlotListener listener)
      • removeEventPlotListener

        public void removeEventPlotListener​(EventPlotListener listener)
      • isStackOverlappingEvents

        public boolean isStackOverlappingEvents()
      • setStackOverlappingEvents

        public void setStackOverlappingEvents​(boolean stack)
      • getRow

        public int getRow​(Object eventId)
      • setRowSize

        public void setRowSize​(int size)
        Sets the size of a single row of events. An EventPlotInfo may contain multiple rows of events if some of those events overlap in time.
      • getRowSize

        public int getRowSize()
      • getRowSize

        public double getRowSize​(GlimpseBounds bounds)
      • setGrow

        public void setGrow​(boolean grow)
        Description copied from interface: PlotInfo

        Sets the plot to fill all available space. First, fixed size plots are given their space (set by PlotInfo.setSize(int)) and then all plots set to grow fill the remaining space.

        Setting the plot size to a negative value is the same as setting grow to true (but this behavior is deprecated and PlotInfo.setGrow(boolean) should be used). Setting size to a positive value will set grow to false.

        Specified by:
        setGrow in interface PlotInfo
        Overrides:
        setGrow in class PlotInfoWrapper
      • setSize

        public void setSize​(int size)
        Description copied from interface: PlotInfo

        Sets the size in pixels for this plot. If size < 0, then the plot will attempt to fill all available space, sharing space evenly with other plots with negative size.

        For a VERTICAL oriented plot, setSize( ) adjusts the plot height, for a HORIZONTAL oriented plot, the width is adjusted.

        Specified by:
        setSize in interface PlotInfo
        Overrides:
        setSize in class PlotInfoWrapper
        Parameters:
        size - the size of the plot in pixels.
      • setEventPadding

        public void setEventPadding​(int size)
      • getEventPadding

        public int getEventPadding()
      • setRowMaxCount

        public void setRowMaxCount​(int count)
      • getRowMaxCount

        public int getRowMaxCount()
      • setRowMinCount

        public void setRowMinCount​(int count)
      • getRowMinCount

        public int getRowMinCount()
      • getRowCount

        public int getRowCount()
      • updateSize

        public void updateSize()
      • isTextColorSet

        public boolean isTextColorSet()
      • isBackgroundColorSet

        public boolean isBackgroundColorSet()
      • isBorderColorSet

        public boolean isBorderColorSet()
      • getDefaultIconId

        public Object getDefaultIconId()
      • setDefaultEventBorderThickness

        public void setDefaultEventBorderThickness​(float thickness)
      • getDefaultEventBorderThickness

        public float getDefaultEventBorderThickness()
      • setDefaultEventBackgroundColor

        public void setDefaultEventBackgroundColor​(float[] backgroundColor)
      • getDefaultEventBackgroundColor

        public float[] getDefaultEventBackgroundColor()
      • getDefaultEventBorderColor

        public float[] getDefaultEventBorderColor()
      • setDefaultEventTextColor

        public void setDefaultEventTextColor​(float[] textColor)
      • getTextColorNoBackground

        public float[] getTextColorNoBackground()
      • getTextColor

        public float[] getTextColor()
      • setFont

        public void setFont​(Font font,
                            boolean antialias)
      • getEvents

        public Set<Event> getEvents()
      • addEvent

        public void addEvent​(Event event)
      • removeEvent

        public void removeEvent​(Event event)
      • removeEvent

        public void removeEvent​(Object id)
      • removeAllEvents

        public void removeAllEvents()
      • setTextRenderingMode

        public void setTextRenderingMode​(Event.TextRenderingMode mode)
        Sets the TextRenderingMode for all Event children of this EventPlotInfo. This value will also be the default of any newly created Events. The value can be overridden on a per-Event basis using Event#setTextRenderingMode(OverlapRenderingMode). However, the next call to EventPlotInfo#setTextRenderingMode(OverlapRenderingMode) will reset all Events to the same value.
        See Also:
        Event.setOverlapMode(OverlapRenderingMode)
      • validate

        public void validate()