com.jidesoft.editor
Class CodeEditorMarkerSupport
java.lang.Object
com.jidesoft.marker.AbstractMarkerSupport
com.jidesoft.marker.AbstractRowMarkerSupport
com.jidesoft.editor.CodeEditorMarkerSupport
- All Implemented Interfaces:
- MarkerSupport
public class CodeEditorMarkerSupport
- extends AbstractRowMarkerSupport
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CodeEditorMarkerSupport
public CodeEditorMarkerSupport(CodeEditor codeEditor)
getMarkerModel
public MarkerModel getMarkerModel()
- Description copied from interface:
MarkerSupport
- Gets the marker model. The marker model stores a list of markers.
- Specified by:
getMarkerModel
in interface MarkerSupport
- Overrides:
getMarkerModel
in class AbstractMarkerSupport
- Returns:
- the marker model
scrollTo
public void scrollTo(int start,
int end,
boolean select)
- Description copied from interface:
MarkerSupport
- Scrolls the view to show the items from the start index to the end index.
- Parameters:
start
- the index of the start elementend
- the index of the end elementselect
- true to select the elements. Otherwise false.
indexToPoint
public Point indexToPoint(int index,
int height)
- Description copied from interface:
MarkerSupport
- 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.
- Specified by:
indexToPoint
in interface MarkerSupport
- Overrides:
indexToPoint
in class AbstractRowMarkerSupport
- 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
public IntegerRange pointToIndexRange(Point p,
int height)
- Description copied from interface:
MarkerSupport
- 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.
- Specified by:
pointToIndexRange
in interface MarkerSupport
- Overrides:
pointToIndexRange
in class AbstractRowMarkerSupport
- Parameters:
p
- the Pointheight
- the total height of the marker stripe
- Returns:
- the range of the indices.
getRowHeight
public int getRowHeight()
- Specified by:
getRowHeight
in class AbstractRowMarkerSupport
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in class AbstractRowMarkerSupport