JIDE 3.5.15

com.jidesoft.editor.margin
Class DefaultCodeFoldingPainter

java.lang.Object
  extended by com.jidesoft.editor.margin.DefaultCodeFoldingPainter
All Implemented Interfaces:
CodeFoldingPainter

public class DefaultCodeFoldingPainter
extends Object
implements CodeFoldingPainter

The default painter for code folding.


Constructor Summary
DefaultCodeFoldingPainter()
           
 
Method Summary
 int getPreferredWidth()
          Gets preferred width.
 void paintBackground(Component c, Graphics g, Rectangle rect)
          Paints the background of the code folding area.
 void paintCollapsedFolding(Component c, Graphics g, Span span, Rectangle rect, int state)
          Paints the collapsed folding.
 void paintExpandedFolding(Component c, Graphics g, Span span, Rectangle rect, int state)
          Paints the expanded folding.
 int paintFoldingEnd(Component c, Graphics g, Span span, Rectangle rect, int state)
          Paints the end of the folding.
 void paintFoldingLine(Component c, Graphics g, Span span, Rectangle rect, int state)
          Paints the folding line between the start and the end of the folding.
 int paintFoldingStart(Component c, Graphics g, Span span, Rectangle rect, int state)
          Paints the start of the folding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCodeFoldingPainter

public DefaultCodeFoldingPainter()
Method Detail

paintFoldingStart

public int paintFoldingStart(Component c,
                             Graphics g,
                             Span span,
                             Rectangle rect,
                             int state)
Description copied from interface: CodeFoldingPainter
Paints the start of the folding.

Specified by:
paintFoldingStart in interface CodeFoldingPainter
Returns:
return the y value after the start of the folding is paint. paintFoldingLine method will use this y value as the starting point of the line.

paintFoldingEnd

public int paintFoldingEnd(Component c,
                           Graphics g,
                           Span span,
                           Rectangle rect,
                           int state)
Description copied from interface: CodeFoldingPainter
Paints the end of the folding.

Specified by:
paintFoldingEnd in interface CodeFoldingPainter
Returns:
return the y value at where the end of the folding is painted. paintFoldingLine method will use this y value as the ending point of the line.

paintCollapsedFolding

public void paintCollapsedFolding(Component c,
                                  Graphics g,
                                  Span span,
                                  Rectangle rect,
                                  int state)
Description copied from interface: CodeFoldingPainter
Paints the collapsed folding.

Specified by:
paintCollapsedFolding in interface CodeFoldingPainter

paintExpandedFolding

public void paintExpandedFolding(Component c,
                                 Graphics g,
                                 Span span,
                                 Rectangle rect,
                                 int state)
Description copied from interface: CodeFoldingPainter
Paints the expanded folding.

Specified by:
paintExpandedFolding in interface CodeFoldingPainter

paintFoldingLine

public void paintFoldingLine(Component c,
                             Graphics g,
                             Span span,
                             Rectangle rect,
                             int state)
Description copied from interface: CodeFoldingPainter
Paints the folding line between the start and the end of the folding.

Specified by:
paintFoldingLine in interface CodeFoldingPainter

paintBackground

public void paintBackground(Component c,
                            Graphics g,
                            Rectangle rect)
Description copied from interface: CodeFoldingPainter
Paints the background of the code folding area. It's for the whole code folding margin, not just for one code folding.

Specified by:
paintBackground in interface CodeFoldingPainter

getPreferredWidth

public int getPreferredWidth()
Description copied from interface: CodeFoldingPainter
Gets preferred width.

Specified by:
getPreferredWidth in interface CodeFoldingPainter
Returns:
the preferred width.

JIDE 3.5.15