JIDE 3.5.15

com.jidesoft.marker
Interface MarkerSupport

All Known Implementing Classes:
AbstractMarkerSupport, AbstractRowMarkerSupport, CodeEditorMarkerSupport, ListMarkerSupport, TableRowMarkerSupport, TextAreaRowMarkerSupport, TreeMarkerSupport

public interface MarkerSupport

MarkerSupport is an adapter that provides the marker support for various components. There are several implementations which provides the marker support for JList, JTable, JTree etc.


Method Summary
 MarkerModel getMarkerModel()
          Gets the marker model.
 Point indexToPoint(int index, int height)
          MarkerArea shows information of some elements from a potential large range in a condensed stripe.
 IntegerRange pointToIndexRange(Point p, int height)
          Finds out the index range that represented by the point.
 void scrollTo(int start, int end, boolean select)
          Scrolls the view to show the items from the start index to the end index.
 

Method Detail

getMarkerModel

MarkerModel getMarkerModel()
Gets the marker model. The marker model stores a list of markers.

Returns:
the marker model

scrollTo

void scrollTo(int start,
              int end,
              boolean select)
Scrolls the view to show the items from the start index to the end index.

Parameters:
start - the index of the start element
end - the index of the end element
select - true to select the elements. Otherwise false.

indexToPoint

Point indexToPoint(int index,
                   int height)
MarkerArea shows information of some elements from a potential large range in a condensed stripe. Since the space of the stripe is limited, we need a way to convert the position of the element to a point on the stripe. This method is used to find out the point based on the element index. For vertical stripe, what matters if the y of the point while x is usually 0.

Parameters:
index - the element index.
height - the total height of the marker stripe
Returns:
the position on the stripe that represents the element at the index. Null if the index is out of the range.

pointToIndexRange

IntegerRange pointToIndexRange(Point p,
                               int height)
Finds out the index range that represented by the point. The range could be one index or an index range. The reason is there could be more elements than the number of pixels vertically on the stripe. For example, if there are 10000 elements and only 100 vertical pixels, each pixel will represent 100 elements. That's why we need to return a range here.

Parameters:
p - the Point
height - the total height of the marker stripe
Returns:
the range of the indices.

JIDE 3.5.15