|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.View
org.netbeans.editor.BaseView
org.netbeans.editor.LeafView
public class LeafView
Leaf view implementation. This corresponds and requires leaf element to be element for this view. The view has the following structure: +---------------------------------------------------------+ | insets.top area | A | | | insets.top | | V | +--------------------------------------------------+ | | | A | | | | | i | | | | n | | | | s | | | | e | | | | t | | | | s | | | | . | | | | l | | | | e | Main area of this view | | mainHeight | f | | | | t | | | | | | | | a | | | | r | | | | e | | | | a | | | | | | | | | | | | | | | | | | | | | | V | +--------------------------------------------------+ | insets.bottom area | A | | | insets.bottom | | V +---------------------------------------------------------+
| Field Summary | |
|---|---|
protected int |
mainHeight
Height of the area this view manages excluding areas managed by its children and excluding insets. |
| Fields inherited from class org.netbeans.editor.BaseView |
|---|
helperInd, insets, INSETS_BOTTOM, INSETS_TOP, MAIN_AREA, packed |
| Fields inherited from class javax.swing.text.View |
|---|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
|---|---|
LeafView(Element elem)
Construct new base view |
|
| Method Summary | |
|---|---|
void |
changedUpdate(DocumentEvent evt,
Shape a,
ViewFactory f)
Attributes were changed in the are this view is responsible for. |
int |
getBaseX(int y)
|
int |
getHeight()
Get total height of this view |
int |
getNextVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
!!! osetrit konec view -> jump na dalsi v branchview |
protected int |
getPaintAreas(Graphics g,
int clipY,
int clipHeight)
Returns binary composition of paint areas |
protected int |
getPosFromY(int y)
Get begin of line position from y-coord. |
View |
getView(int n)
Gets the n-th child view. |
int |
getViewCount()
Returns the number of child views in this view. |
protected int |
getViewStartY(BaseView view,
int helperInd)
Get child view's y base value. |
protected int |
getYFromPos(int pos)
Get y coordinate from position. |
void |
insertUpdate(DocumentEvent evt,
Shape a,
ViewFactory f)
Gives notification that something was inserted into the document in a location that this view is responsible for. |
Shape |
modelToView(int p0,
Position.Bias b0,
int p1,
Position.Bias b1,
Shape a)
|
Shape |
modelToView(int pos,
Shape a,
Position.Bias b)
|
void |
modelToViewDG(int pos,
org.netbeans.editor.DrawGraphics dg)
|
protected void |
paintAreas(Graphics g,
int clipY,
int clipHeight,
int paintAreas)
Paint either top insets, main area, or bottom insets depending on paintAreas variable |
void |
removeUpdate(DocumentEvent evt,
Shape a,
ViewFactory f)
Gives notification from the document that attributes were removed in a location that this view is responsible for. |
void |
setParent(View parent)
|
void |
updateMainHeight()
Compute and update main area height |
int |
viewToModel(float x,
float y,
Shape a,
Position.Bias[] biasReturn)
Get position from location on screen. |
| Methods inherited from class org.netbeans.editor.BaseView |
|---|
displayHierarchy, getAlignment, getComponent, getEditorUI, getInsets, getPreferredSpan, getStartY, invalidateStartY, isPacked, paint, setHelperInd, setPacked, toString |
| Methods inherited from class javax.swing.text.View |
|---|
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getResizeWeight, getStartOffset, getToolTipText, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, preferenceChanged, remove, removeAll, replace, setSize, updateChildren, updateLayout, viewToModel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int mainHeight
| Constructor Detail |
|---|
public LeafView(Element elem)
| Method Detail |
|---|
public void setParent(View parent)
protected int getPaintAreas(Graphics g, int clipY, int clipHeight)
getPaintAreas in class BaseViewg - Graphics to paint throughprotected void paintAreas(Graphics g, int clipY, int clipHeight, int paintAreas)
paintAreas in class BaseViewg - Graphics to paint throughpaintAreas - binary composition of paint areaspublic int getHeight()
public void updateMainHeight()
updateMainHeight in class BaseViewprotected int getPosFromY(int y)
getPosFromY in class BaseViewy - y-coord to inspect
always returns startOffset for y < start of main areaeol - means to return end of specified line instead of begining
public int getBaseX(int y)
public final int getViewCount()
getViewCount in class Viewpublic final View getView(int n)
public int getNextVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
throws BadLocationException
getNextVisualPositionFrom in class ViewBadLocationException
protected int getYFromPos(int pos)
throws BadLocationException
getYFromPos in class BaseViewBadLocationExceptionpublic Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException
modelToView in class ViewBadLocationExceptionpublic Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) throws BadLocationException
modelToView in class ViewBadLocationException
public void modelToViewDG(int pos,
org.netbeans.editor.DrawGraphics dg)
throws BadLocationException
modelToViewDG in class BaseViewBadLocationException
public int viewToModel(float x,
float y,
Shape a,
Position.Bias[] biasReturn)
viewToModel in class Viewx - the X coordinate >= 0y - the Y coordinate >= 0a - the allocated region to render into
public void insertUpdate(DocumentEvent evt, Shape a, ViewFactory f)
insertUpdate in class Viewe - the change information from the associated documenta - the current allocation of the viewf - the factory to use to rebuild if the view has childrenpublic void removeUpdate(DocumentEvent evt, Shape a, ViewFactory f)
removeUpdate in class Viewe - the change information from the associated documenta - the current allocation of the viewf - the factory to use to rebuild if the view has childrenpublic void changedUpdate(DocumentEvent evt, Shape a, ViewFactory f)
changedUpdate in class Viewe - the change information from the associated documenta - the current allocation of the viewf - the factory to use to rebuild if the view has childrenprotected int getViewStartY(BaseView view, int helperInd)
getViewStartY in class BaseViewview - is child view of this view for which
the offset should be computed.helperInd - is index that child view has cached to ease
the parent view to search for it in its children array.
If this index is correct, parent uses it. If it's incorrect
parent view searches through the whole array of its children
to find the child. It then calls children's
setParentInd() to correct its location index.
|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||