|
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.lib.editor.view.GapBoxView
org.netbeans.lib.editor.view.GapDocumentView
org.netbeans.editor.DrawEngineFakeDocView
public class DrawEngineFakeDocView
Fake view of the whole document supporting the code folding, operating from given startOffset to endOffset
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.netbeans.editor.view.spi.ViewLayoutState |
---|
ViewLayoutState.Parent |
Field Summary |
---|
Fields inherited from class org.netbeans.lib.editor.view.GapBoxView |
---|
GAP_BOX_VIEW_LAST_USED_STATUS_BIT |
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 |
Method Summary | |
---|---|
protected void |
attachListeners()
|
protected View |
createCustomView(ViewFactory f,
int startOffset,
int maxEndOffset,
int elementIndex)
Create custom child view starting at startOffset . |
protected void |
customReloadChildren(int index,
int removeLength,
int startOffset,
int endOffset)
Loads child views in a custom way. |
protected void |
finishCustomReloadChildren(FoldHierarchy hierarchy)
Free any resources required for custom reload of children. |
void |
foldHierarchyChanged(FoldHierarchyEvent evt)
|
int |
getEndOffset()
|
int |
getStartOffset()
|
int |
getYFromPos(int offset,
Shape a)
|
protected void |
initCustomReloadChildren(FoldHierarchy hierarchy,
int startOffset,
int endOffset)
Extra initialization for custom reload of children. |
protected boolean |
isChildrenResizeDisabled()
Return true if the children should not be attempted to resize once setSize() is called on this view. |
protected Fold |
nextCollapsedFold()
Find next collapsed fold in the given offset range. |
void |
paint(Graphics g,
Shape allocation)
Render the view using the given allocation and rendering surface. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
setParent(View parent)
Sets the parent of the view. |
void |
setSize(float width,
float height)
Sets the size of the view. |
protected boolean |
useCustomReloadChildren()
|
Methods inherited from class org.netbeans.lib.editor.view.GapDocumentView |
---|
changedUpdate, createChildren, directUpdateLayout, getLastAllocationHeight, getLastAllocationWidth, getLastAllocationX, getLastAllocationY, getLayoutQueue, insertUpdate, layoutLock, layoutUnlock, markRepaint, markSizeInvalid, processRepaint, reallocate, removeUpdate, renderWithUpdateLayout, repaint, resetEstimatedSpan |
Methods inherited from class javax.swing.text.View |
---|
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getGraphics, getParent, getResizeWeight, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, remove, removeAll, updateChildren, viewToModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int getStartOffset()
getStartOffset
in class View
public int getEndOffset()
getEndOffset
in class View
protected Fold nextCollapsedFold()
protected void attachListeners()
public void setParent(View parent)
GapBoxView
getViewCount()
)
or for preferred, minimum or maximum span of this view.
setParent
in class GapDocumentView
parent
- the parent of the view, null
if noneprotected boolean useCustomReloadChildren()
useCustomReloadChildren
in class GapBoxView
protected void initCustomReloadChildren(FoldHierarchy hierarchy, int startOffset, int endOffset)
protected void finishCustomReloadChildren(FoldHierarchy hierarchy)
protected void customReloadChildren(int index, int removeLength, int startOffset, int endOffset)
GapBoxView
customReloadChildren
in class GapBoxView
index
- index at which the views should be added/replaced.removeLength
- number of removed children views. It is useful
when rebuilding children for a portion of the view.startOffset
- starting offset from which the loading starts.endOffset
- ending offset where the loading ends.protected View createCustomView(ViewFactory f, int startOffset, int maxEndOffset, int elementIndex)
GapBoxView
startOffset
.
createCustomView
in class GapBoxView
f
- view factory to be used.startOffset
- offset at which the created view must start.maxEndOffset
- maximum ending offset to which the created view
may span.elementIndex
- index of the child element that best represents
the startOffset. The element is child of the element that this view
is responsible for. If this view is not based by element then this
parameter will be -1.public void foldHierarchyChanged(FoldHierarchyEvent evt)
foldHierarchyChanged
in interface FoldHierarchyListener
public void paint(Graphics g, Shape allocation)
GapBoxView
paint
in class GapDocumentView
g
- the rendering surface to useallocation
- the allocated region to render intoView.paint(java.awt.Graphics, java.awt.Shape)
public void setSize(float width, float height)
GapBoxView
The propagation of this operation to child views can be done asynchronously if appropriate.
setSize
in class GapDocumentView
width
- the width >= 0height
- the height >= 0protected boolean isChildrenResizeDisabled()
GapBoxView
setSize()
is called on this view.
setSize()
e.g. this should *not* be used if line-wrapping is turned on.
isChildrenResizeDisabled
in class GapBoxView
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public int getYFromPos(int offset, Shape a)
|
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 |