Side of Software
Marker Bar Library 1.0

sos.marker
Class DefaultMarker

java.lang.Object
  extended by sos.marker.DefaultMarker
All Implemented Interfaces:
Marker

public class DefaultMarker
extends java.lang.Object
implements Marker

A default implementation of the Marker interface that stores the start percentage, end percentage, and short description in fields.

Since:
1.0

Constructor Summary
DefaultMarker(double offset)
          Creates an instance of DefaultMarker with start and end locations of offset and no short description.
DefaultMarker(double start, double end)
          Creates an instance of DefaultMarker with the specified start and end locations and no short description.
DefaultMarker(double start, double end, java.lang.String shortDescription)
          Creates an instance of DefaultMarker with the specified start and end locations and specified short description.
 
Method Summary
 double getEnd()
          Returns this marker's relative end location along the marker bar.
 java.lang.String getShortDescription()
          Returns a short description describing this marker.
 double getStart()
          Returns this marker's relative start location along the marker bar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMarker

public DefaultMarker(double offset)
Creates an instance of DefaultMarker with start and end locations of offset and no short description.

Parameters:
offset - location of this marker, relative to a marker bar
Throws:
java.lang.IllegalArgumentException - if offset < 0.0 or offset > 1.0

DefaultMarker

public DefaultMarker(double start,
                     double end)
Creates an instance of DefaultMarker with the specified start and end locations and no short description.

Parameters:
start - start location of this marker, relative to a marker bar
end - end location of this marker, relative to a marker bar
Throws:
java.lang.IllegalArgumentException - if start < 0.0, end > 1.0, or end < start

DefaultMarker

public DefaultMarker(double start,
                     double end,
                     java.lang.String shortDescription)
Creates an instance of DefaultMarker with the specified start and end locations and specified short description.

Parameters:
start - start location of this marker, relative to a marker bar
end - end location of this marker, relative to a marker bar
shortDescription - a short description of this marker, which is typically used as a tooltip
Throws:
java.lang.IllegalArgumentException - if start < 0.0, end > 1.0, or end < start
Method Detail

getStart

public double getStart()
Description copied from interface: Marker
Returns this marker's relative start location along the marker bar.

Specified by:
getStart in interface Marker
Returns:
a value between 0.0 and 1.0 indicating where this marker starts along the marker bar
See Also:
Marker.getEnd()

getEnd

public double getEnd()
Description copied from interface: Marker
Returns this marker's relative end location along the marker bar.

Specified by:
getEnd in interface Marker
Returns:
a value between 0.0 and 1.0 indicating where this marker ends along the marker bar
See Also:
Marker.getStart()

getShortDescription

public java.lang.String getShortDescription()
Description copied from interface: Marker
Returns a short description describing this marker. The short description is typically used as the marker's tooltip. A null return value indicates that this marker does not have a short description.

Specified by:
getShortDescription in interface Marker
Returns:
this marker's short description (may be null)

Side of Software
Marker Bar Library 1.0

Copyright 2009 Side of Software (SOS). All rights reserved.