JIDE 3.5.15

com.jidesoft.marker
Interface MarkerModel

All Known Subinterfaces:
MarkerModel
All Known Implementing Classes:
DefaultMarkerModel, DefaultMarkerModel

public interface MarkerModel

An interface to store the marker information.


Method Summary
 Marker addMarker(int start, int end, int type, String tooltip)
          Adds a marker.
 void addMarkerListener(MarkerListener l)
          Add a listener to the list that's notified each time a change to the line marker occurs.
 void clearMarkers()
          Removes all markers.
 MarkerListener[] getMarkerListeners()
          Returns an array of all the MarkerListeners added to this MarkerModel with addMarkerListener().
 List<Marker> getMarkers()
          Gets the list of markers.
 List<Marker> getMarkersAt(int start, int end)
          Gets the list of markers in the specified range.
 boolean isAdjusting()
          Checks if the marker model is adjusting.
 boolean removeMarker(Marker marker)
          Removes a previous added marker.
 void removeMarkerListener(MarkerListener l)
          Remove a listener from the list that's notified each time a change to the line marker occurs.
 void setAdjusting(boolean adjusting)
          Sets the marker model to adjusting mode.
 void updateMarker(Marker marker)
          Tells the marker model that this marker has been updated.
 

Method Detail

getMarkers

List<Marker> getMarkers()
Gets the list of markers. The list returned from this method should be unmodifiable.

Returns:
the list of markers.

getMarkersAt

List<Marker> getMarkersAt(int start,
                          int end)
Gets the list of markers in the specified range.

Parameters:
start - the start offset
end - the end offset
Returns:
Gets the markers in the specified range.

addMarker

Marker addMarker(int start,
                 int end,
                 int type,
                 String tooltip)
Adds a marker.

Parameters:
start - the start offset
end - the end offset
type - the type of the marker
tooltip - the tooltip of the marker
Returns:
the marker just added.

removeMarker

boolean removeMarker(Marker marker)
Removes a previous added marker.

Parameters:
marker - the marker
Returns:
true if the marker is removed. Otherwise the marker doesn't exist.

updateMarker

void updateMarker(Marker marker)
Tells the marker model that this marker has been updated.

Parameters:
marker - the marker

clearMarkers

void clearMarkers()
Removes all markers.


isAdjusting

boolean isAdjusting()
Checks if the marker model is adjusting.

Returns:
true if it is adjusting.

setAdjusting

void setAdjusting(boolean adjusting)
Sets the marker model to adjusting mode. If it's in adjusting mode, all marker events fired will have isAdjusting to be true.

Parameters:
adjusting - true or false.

addMarkerListener

void addMarkerListener(MarkerListener l)
Add a listener to the list that's notified each time a change to the line marker occurs.

Parameters:
l - the LineMarkerListener

removeMarkerListener

void removeMarkerListener(MarkerListener l)
Remove a listener from the list that's notified each time a change to the line marker occurs.

Parameters:
l - the LineMarkerListener
See Also:
addMarkerListener(com.jidesoft.marker.MarkerListener)

getMarkerListeners

MarkerListener[] getMarkerListeners()
Returns an array of all the MarkerListeners added to this MarkerModel with addMarkerListener().

Returns:
all of the MarkerListeners added or an empty array if no listeners have been added

JIDE 3.5.15