|
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 |
public interface FlyView
Interface marking the flyweight views.
Flyweight views
are immutable view instances that can be shared in arbitrary number of
occurrences.
They are typically only leaf views usually built on top of flyweight
elements.
A view can be rendered differently in various rendering contexts. Rendering contexts can affect measurements done by the view. Therefore there are methods that can replicate the view into a new instance in a particular context.
Flyweight views cannot hold a reference to parent
and their getParent()
returns null.
A call to setParent()
would throw an exception.
Their getElement()
returns null
.
getStartOffset()
always returns 0.
getEndOffset()
returns length of the text
that they represent.
getContainer()
always returns null.
Nested Class Summary | |
---|---|
static interface |
FlyView.Parent
Interface that views capable of maintaining flyweight views as their children must implement. |
Method Summary | |
---|---|
FlyView |
flyInstance(View parent)
Create an instance of the view dependent on the context given by the parent view. |
CharSequence |
getText()
Get the text represented by this view. |
View |
regularInstance(View parent,
int startOffset,
int endOffset)
Create a regular instance that will act as a normal view. |
Method Detail |
---|
FlyView flyInstance(View parent)
parent
- instance of view that will act as parent for the view
in the given context. The possibly created instance of the view
can use the parent but it must not hold the reference to it permanently.
View regularInstance(View parent, int startOffset, int endOffset)
getText()
.
CharSequence getText()
|
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 |