Side of Software
Marker Bar Library 1.0

sos.marker
Interface Marker

All Known Implementing Classes:
DefaultMarker

public interface Marker

An object with a start and end percentage rendered on a marker bar. Markers are returned by a marker bar's list model, and each marker gives the start and end locations along the bar and a short description, which is used as a tooltip. The locations are a relative value between 0.0 and 1.0 (inclusive), where 0.0 indicates the start of the bar and 1.0 indicates the end. The start value should always be less than or equal to the end value.

The Marker Bar Library provides a default implementation of this interface: DefaultMarker. Alternatively, clients may choose to use their own implementation to fit their needs.

Markers are drawn on the bar using a MarkerRenderer. Note that the exact location of the drawn marker may not equal the marker's start and end locations because of the renderer's requirements and the marker bar's layout policy. To determine the final location of the drawn marker, use JMarkerBar.getMarkerBounds(int).

Since:
1.0
See Also:
JMarkerBar.setModel(javax.swing.ListModel), MarkerRenderer, DefaultMarker

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.
 

Method Detail

getStart

double getStart()
Returns this marker's relative start location along the marker bar.

Returns:
a value between 0.0 and 1.0 indicating where this marker starts along the marker bar
See Also:
getEnd()

getEnd

double getEnd()
Returns this marker's relative end location along the marker bar.

Returns:
a value between 0.0 and 1.0 indicating where this marker ends along the marker bar
See Also:
getStart()

getShortDescription

java.lang.String getShortDescription()
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.

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.