de.eventhorizongilde.ehfs.chart
Class BoxAnnotation

java.lang.Object
  extended by de.eventhorizongilde.ehfs.chart.BoxAnnotation
All Implemented Interfaces:
IAnnotation

public class BoxAnnotation
extends Object
implements IAnnotation

An annotation that is shown as a box. Horizontally, it starts/ends at specified times during the fight. Vertically, it goes from the graph's top to its bottom.


Method Summary
static BoxAnnotation createForOverview(int startSeconds, int endSeconds)
          Creates a box annotation that is visible on overview graphs only.
static BoxAnnotation createForUnit(int startSeconds, int endSeconds, String unitGuid)
          Creates a box annotation that is visible on graphs for a specific unit only.
static BoxAnnotation createGlobal(int startSeconds, int endSeconds)
          Creates a box annotation that is visible on all graphs.
 boolean isLegendIconAsBox()
          

Returns whether this annotation's legend icon should be shown as a box instead of a line.

 boolean isVisibleOnChartsForUnit(String guid)
          Returns whether this annotation should be visible on graphs shown for a specific unit.
 boolean isVisibleOnOverview()
          Returns whether this annotation should be visible on overview graphs.
 XYAnnotation toXYAnnotation(XYPlot plot, Color color, IParseContext context)
          Creates a JFreeChart XYAnnotation for this annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createGlobal

public static BoxAnnotation createGlobal(int startSeconds,
                                         int endSeconds)
Creates a box annotation that is visible on all graphs.

Parameters:
startSeconds - seconds into the fight where the box annotation should start
endSeconds - seconds into the fight where the box annotation should end

createForUnit

public static BoxAnnotation createForUnit(int startSeconds,
                                          int endSeconds,
                                          String unitGuid)
Creates a box annotation that is visible on graphs for a specific unit only.

Parameters:
startSeconds - seconds into the fight where the box annotation should start
endSeconds - seconds into the fight where the box annotation should end
unitGuid - the unit's GUID

createForOverview

public static BoxAnnotation createForOverview(int startSeconds,
                                              int endSeconds)
Creates a box annotation that is visible on overview graphs only.

Parameters:
startSeconds - seconds into the fight where the box annotation should start
endSeconds - seconds into the fight where the box annotation should end

toXYAnnotation

public XYAnnotation toXYAnnotation(XYPlot plot,
                                   Color color,
                                   IParseContext context)
Creates a JFreeChart XYAnnotation for this annotation.

Specified by:
toXYAnnotation in interface IAnnotation
Parameters:
plot - the plot the XYAnnotation is created for
color - the annotation's color on the plot
context - the current fight's parse context

isVisibleOnChartsForUnit

public boolean isVisibleOnChartsForUnit(String guid)
Returns whether this annotation should be visible on graphs shown for a specific unit.

Specified by:
isVisibleOnChartsForUnit in interface IAnnotation

isVisibleOnOverview

public boolean isVisibleOnOverview()
Returns whether this annotation should be visible on overview graphs.

Specified by:
isVisibleOnOverview in interface IAnnotation

isLegendIconAsBox

public boolean isLegendIconAsBox()

Returns whether this annotation's legend icon should be shown as a box instead of a line.

Note that this doesn't really make sense for single annotations. Instead, as annotations are grouped by AnnotationGroups, those take on the value returned here.

Specified by:
isLegendIconAsBox in interface IAnnotation


Event Horizon Fight Statistics