JIDE 3.5.15

com.jidesoft.margin
Interface Margin

All Known Subinterfaces:
Margin
All Known Implementing Classes:
AbstractLineMargin, AbstractMargin, AbstractMargin, AbstractRowMargin, CodeFoldingMargin, LineNumberMargin, LineOffsetMargin, RowNumberMargin

public interface Margin

An interface for the margin component. Margin is used for an accessory for a large component that has a vertical scroll bar such as table, list or tree.


Method Summary
 void addMarginPainter(MarginPainter painter)
          Adds a margin painter to paint extra information on top of the current margin painted by paintMargin method.
 Component getMarginComponent()
          Gets the margin component.
 MarginSupport getMarginSupport()
          Gets the code editor.
 int getPreferredWidth()
          Gets the preferred width of the margin.
 void paintMargin(Graphics g)
          Paints the margin.
 void removeMarginPainter(MarginPainter painter)
          Removes a margin painter added by addMarginPainter.
 void setMarginSupport(MarginSupport support)
          Sets the code editor.
 

Method Detail

getMarginSupport

MarginSupport getMarginSupport()
Gets the code editor.

Returns:
the code editor.

setMarginSupport

void setMarginSupport(MarginSupport support)
Sets the code editor.

Parameters:
support -

paintMargin

void paintMargin(Graphics g)
Paints the margin.

Parameters:
g -

addMarginPainter

void addMarginPainter(MarginPainter painter)
Adds a margin painter to paint extra information on top of the current margin painted by paintMargin method.

Parameters:
painter -

removeMarginPainter

void removeMarginPainter(MarginPainter painter)
Removes a margin painter added by addMarginPainter.

Parameters:
painter -

getPreferredWidth

int getPreferredWidth()
Gets the preferred width of the margin. Since the margin is placed vertical besides the code editor, the height is fixed. That's why it only needs to ask for the preferred width using this method.

Returns:
the preferred width.

getMarginComponent

Component getMarginComponent()
Gets the margin component. If you implement your margin by extending a Component, you simply "return this" when implementing this method.

Returns:
the margin component.

JIDE 3.5.15