ide
Class VerilogPlainView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.PlainView
              |
              +--ide.VerilogPlainView

class VerilogPlainView
extends javax.swing.text.PlainView
implements javax.swing.event.DocumentListener

The highligted view of a verilog piece


Field Summary
(package private)  ColorProvider cp
           
(package private)  VerilogTextArea daddy
           
(package private)  byte[] lineTypes
          Here each line has one byte for its 'style' (for now the sole purpose is to tell whether this line is or not inside a multi-line comment: if we are inside a comment, the corresponding byte will be 1).
(package private) static byte lineTypesIncrement
          The amount with which lineTypes will grow when nedded.
(package private)  VerilogScanner vs
           
 
Fields inherited from class javax.swing.text.PlainView
font, lineBuffer, longLine, metrics, sel0, sel1, selected, tabBase, tabSize, unselected
 
Fields inherited from class javax.swing.text.View
BadBreakWeight, elem, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, parent, sharedBiasReturn, X_AXIS, Y_AXIS
 
Constructor Summary
(package private) VerilogPlainView(javax.swing.text.Element elem, VerilogTextArea daddy)
           
 
Method Summary
 void changedUpdate(javax.swing.event.DocumentEvent e)
           
protected  void drawLine(int lineIndex, java.awt.Graphics g, int x, int y)
          the core of the syntax highlighting:
 void insertUpdate(javax.swing.event.DocumentEvent e)
          this will ensure that lineTypes vector is long enough to keep us out of trouble.
 void removeUpdate(javax.swing.event.DocumentEvent e)
           
 
Methods inherited from class javax.swing.text.PlainView
adjustPaintRegion, calculateLongestLine, changedUpdate, damageLineRange, drawElement, drawSelectedText, drawUnselectedText, getLineBuffer, getLineWidth, getPreferredSpan, getTabSize, insertUpdate, lineToRect, modelToView, nextTabStop, paint, preferenceChanged, removeUpdate, updateDamage, updateMetrics, viewToModel
 
Methods inherited from class javax.swing.text.View
, breakView, createFragment, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, isVisible, modelToView, modelToView, setParent, setSize, viewToModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

daddy

VerilogTextArea daddy

cp

ColorProvider cp

vs

VerilogScanner vs

lineTypes

byte[] lineTypes
Here each line has one byte for its 'style' (for now the sole purpose is to tell whether this line is or not inside a multi-line comment: if we are inside a comment, the corresponding byte will be 1). *NOTE* The corresponding byte for line n is at index n-1.

lineTypesIncrement

static final byte lineTypesIncrement
The amount with which lineTypes will grow when nedded.
Constructor Detail

VerilogPlainView

VerilogPlainView(javax.swing.text.Element elem,
                 VerilogTextArea daddy)
Method Detail

drawLine

protected void drawLine(int lineIndex,
                        java.awt.Graphics g,
                        int x,
                        int y)
the core of the syntax highlighting:
Overrides:
drawLine in class javax.swing.text.PlainView

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)
Specified by:
changedUpdate in interface javax.swing.event.DocumentListener

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)
this will ensure that lineTypes vector is long enough to keep us out of trouble.
Specified by:
insertUpdate in interface javax.swing.event.DocumentListener

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)
Specified by:
removeUpdate in interface javax.swing.event.DocumentListener