|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.marker.MarkerArea com.jidesoft.editor.marker.MarkerArea
public class MarkerArea
MarkerArea
is an area next to code editor to display markers for error, warning, or whatever information
in the code you would like to display. There are two parts in a MarkerArea
. The top is an area called
MarkerEye
. It displays the current status of the code editor. You can use MarkerEyePainter
to customize how to paint it. For example, if there are errors in the code, you
can display a red box to indicate something is wrong. Or display a yellow box if there are just warnings. If
everything is OK, display a green box. You can even display an icon if you want using MarkerEyePainter
. The second part is called MarkerStripe
. It displays stripes to
indicate those errors or warnings or any other information. Each stripe is associated with a range of code and a
tooltip for the message. For example, an error stripe usually has a tooltip of why there is an error. MarkerStripePainter
is the painter class to paint the stripe.
MarkerModel
. Each code editor has
a MarkerModel
that stores all the markers. You can use code to add or remove markers to this model.
MarkerArea
will display them immediately when something is changed.
MarkerEye
,
MarkerStripe
,
MarkerModel
,
DefaultMarkerModel
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class com.jidesoft.marker.MarkerArea |
---|
_eye, _eyePainter, _inspecting, _markerSupport, _minimumMode, _mode, _stripe, _stripePainter, DEFAULT_ERROR_COLOR, DEFAULT_FINE_COLOR, DEFAULT_INSPECTING_COLOR, DEFAULT_WARNING_COLOR, MODE_ERROR, MODE_FINE, MODE_WARNING, PROPERTY_CLICK_TO_SELECT |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
MarkerArea(CodeEditor codeEditor)
|
Method Summary | |
---|---|
protected MarkerEye |
createMarkerEye()
Creates a default MarkerEye. |
protected MarkerStripe |
createMarkerStripe()
Creates a default MarkerStripe. |
void |
dispose()
Disposes the MarkerArea. |
CodeEditor |
getCodeEditor()
|
Color |
getColor(int type)
Deprecated. Please use MarkerArea.getMarkerColor(int) . From JIDE 3.2 release, this method will no longer use the
SyntaxStyle to figure out the color automatically because there is no clear one-to-one mapping
between the style and the marker type. If you would like to register more colors for the marker,
please use MarkerArea.registerMarkerColor(int, java.awt.Color) . By default, we only register the color
or error and warning. |
int |
getVisualLineCount()
|
void |
setCodeEditor(CodeEditor codeEditor)
|
void |
setStripePainter(MarkerStripePainter stripePainter)
|
void |
updateMarkerAreaHeight(int preferredHeight)
Update the height of the marker area according to the visibility of horizontal scroll bar in CodeEditor. |
Methods inherited from class com.jidesoft.marker.MarkerArea |
---|
applyMinimumMode, clearMarkerColors, getEyePainter, getMarkerColor, getMarkerEye, getMarkerStripe, getMarkerSupport, getMode, getResourceString, getStripePainter, isClickToSelect, isInspecting, markerChanged, registerMarkerColor, requireMinimumMode, setClickToSelect, setEyePainter, setInspecting, setMarkerSupport, setMode, unregisterMarkerColor |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MarkerArea(CodeEditor codeEditor)
Method Detail |
---|
protected MarkerStripe createMarkerStripe()
createMarkerStripe
in class MarkerArea
protected MarkerEye createMarkerEye()
createMarkerEye
in class MarkerArea
public void setStripePainter(MarkerStripePainter stripePainter)
setStripePainter
in class MarkerArea
public CodeEditor getCodeEditor()
public void setCodeEditor(CodeEditor codeEditor)
public int getVisualLineCount()
public void dispose()
MarkerArea
dispose
in class MarkerArea
@Deprecated public Color getColor(int type)
MarkerArea.getMarkerColor(int)
. From JIDE 3.2 release, this method will no longer use the
SyntaxStyle to figure out the color automatically because there is no clear one-to-one mapping
between the style and the marker type. If you would like to register more colors for the marker,
please use MarkerArea.registerMarkerColor(int, java.awt.Color)
. By default, we only register the color
or error and warning.
public void updateMarkerAreaHeight(int preferredHeight)
updateMarkerAreaHeight
in class MarkerArea
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |