src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java

Print this page




  38      * When leaf Views (such as LabelView) are rendering they should
  39      * call into this method. If a highlight is in the given region it will
  40      * be drawn immediately.
  41      *
  42      * @param g Graphics used to draw
  43      * @param p0 starting offset of view
  44      * @param p1 ending offset of view
  45      * @param viewBounds Bounds of View
  46      * @param editor JTextComponent
  47      * @param view View instance being rendered
  48      */
  49     public abstract void paintLayeredHighlights(Graphics g, int p0, int p1,
  50                                                 Shape viewBounds,
  51                                                 JTextComponent editor,
  52                                                 View view);
  53 
  54 
  55     /**
  56      * Layered highlight renderer.
  57      */
  58     static public abstract class LayerPainter implements Highlighter.HighlightPainter {
  59         /**
  60          * @return a shape
  61          * @param g Graphics used to draw
  62          * @param p0 starting offset of view
  63          * @param p1 ending offset of view
  64          * @param viewBounds Bounds of View
  65          * @param editor JTextComponent
  66          * @param view View instance being rendered
  67          */
  68         public abstract Shape paintLayer(Graphics g, int p0, int p1,
  69                                         Shape viewBounds,JTextComponent editor,
  70                                         View view);
  71     }
  72 }


  38      * When leaf Views (such as LabelView) are rendering they should
  39      * call into this method. If a highlight is in the given region it will
  40      * be drawn immediately.
  41      *
  42      * @param g Graphics used to draw
  43      * @param p0 starting offset of view
  44      * @param p1 ending offset of view
  45      * @param viewBounds Bounds of View
  46      * @param editor JTextComponent
  47      * @param view View instance being rendered
  48      */
  49     public abstract void paintLayeredHighlights(Graphics g, int p0, int p1,
  50                                                 Shape viewBounds,
  51                                                 JTextComponent editor,
  52                                                 View view);
  53 
  54 
  55     /**
  56      * Layered highlight renderer.
  57      */
  58     public abstract static class LayerPainter implements Highlighter.HighlightPainter {
  59         /**
  60          * @return a shape
  61          * @param g Graphics used to draw
  62          * @param p0 starting offset of view
  63          * @param p1 ending offset of view
  64          * @param viewBounds Bounds of View
  65          * @param editor JTextComponent
  66          * @param view View instance being rendered
  67          */
  68         public abstract Shape paintLayer(Graphics g, int p0, int p1,
  69                                         Shape viewBounds,JTextComponent editor,
  70                                         View view);
  71     }
  72 }