JIDE 3.5.15

com.jidesoft.editor
Class CodeEditorMarkerSupport

java.lang.Object
  extended by com.jidesoft.marker.AbstractMarkerSupport
      extended by com.jidesoft.marker.AbstractRowMarkerSupport
          extended by com.jidesoft.editor.CodeEditorMarkerSupport
All Implemented Interfaces:
MarkerSupport

public class CodeEditorMarkerSupport
extends AbstractRowMarkerSupport


Constructor Summary
CodeEditorMarkerSupport(CodeEditor codeEditor)
           
 
Method Summary
 MarkerModel getMarkerModel()
          Gets the marker model.
 int getRowCount()
           
 int getRowHeight()
           
 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.
 
Methods inherited from class com.jidesoft.marker.AbstractMarkerSupport
createMarkerModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeEditorMarkerSupport

public CodeEditorMarkerSupport(CodeEditor codeEditor)
Method Detail

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 element
end - the index of the end element
select - 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 Point
height - 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

JIDE 3.5.15