public class LockView extends View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Modifier and Type | Method and Description |
---|---|
View |
breakView(int axis,
float len,
Shape a) |
void |
changedUpdate(DocumentEvent e,
Shape a,
ViewFactory f) |
static LockView |
get(View view)
Find the
LockView instance in a view hierarchy
by traversing it up to the root view. |
float |
getAlignment(int axis) |
AttributeSet |
getAttributes()
Fetches the attributes to use when rendering.
|
Shape |
getChildAllocation(int index,
Shape a) |
Document |
getDocument() |
Element |
getElement() |
int |
getEndOffset() |
Thread |
getLockThread()
Return the thread that holds a lock on the view hierarchy.
|
float |
getMaximumSpan(int axis) |
float |
getMinimumSpan(int axis) |
int |
getNextVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet) |
float |
getPreferredSpan(int axis) |
int |
getResizeWeight(int axis) |
int |
getStartOffset() |
String |
getToolTipText(float x,
float y,
Shape allocation) |
View |
getView(int n)
Gets the n-th view in this container.
|
int |
getViewCount() |
static PriorityMutex |
getViewHierarchyMutex(JTextComponent component)
Get mutex used to lock the view hierarchy.
|
int |
getViewIndex(int pos,
Position.Bias b) |
void |
insertUpdate(DocumentEvent e,
Shape a,
ViewFactory f) |
boolean |
isPriorityThreadWaiting() |
void |
lock() |
Shape |
modelToView(int p0,
Position.Bias b0,
int p1,
Position.Bias b1,
Shape a) |
Shape |
modelToView(int pos,
Shape a,
Position.Bias b) |
void |
paint(Graphics g,
Shape allocation) |
void |
preferenceChanged(View child,
boolean width,
boolean height) |
void |
removeUpdate(DocumentEvent e,
Shape a,
ViewFactory f) |
void |
render(Runnable r) |
void |
setParent(View parent) |
protected void |
setParentLocked(View parent) |
void |
setSize(float width,
float height) |
void |
setView(View v)
Set a new single child of this view.
|
void |
unlock() |
int |
viewToModel(float x,
float y,
Shape a,
Position.Bias[] bias) |
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getBreakWeight, getContainer, getGraphics, getParent, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, replace, updateChildren, updateLayout, viewToModel
public LockView(View view)
public static PriorityMutex getViewHierarchyMutex(JTextComponent component)
LockView
itself uses this mutex
as well as the code folding hierarchy.public static LockView get(View view)
LockView
instance in a view hierarchy
by traversing it up to the root view.view
- view in the view hierarchy. null
is accepted too.LockView
or null
if there is no LockView
instance present
in the view hierarchy of the view is no longer
part of the view hierarchy.protected void setParentLocked(View parent)
public void setView(View v)
public void lock()
public void unlock()
public boolean isPriorityThreadWaiting()
public Thread getLockThread()
public void render(Runnable r)
public AttributeSet getAttributes()
getAttributes
in class View
public float getPreferredSpan(int axis)
getPreferredSpan
in class View
public float getMinimumSpan(int axis)
getMinimumSpan
in class View
public float getMaximumSpan(int axis)
getMaximumSpan
in class View
public void preferenceChanged(View child, boolean width, boolean height)
preferenceChanged
in class View
public float getAlignment(int axis)
getAlignment
in class View
public int getViewCount()
getViewCount
in class View
public View getView(int n)
public int getViewIndex(int pos, Position.Bias b)
getViewIndex
in class View
public Shape getChildAllocation(int index, Shape a)
getChildAllocation
in class View
public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException
modelToView
in class View
BadLocationException
public Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) throws BadLocationException
modelToView
in class View
BadLocationException
public int viewToModel(float x, float y, Shape a, Position.Bias[] bias)
viewToModel
in class View
public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) throws BadLocationException
getNextVisualPositionFrom
in class View
BadLocationException
public void insertUpdate(DocumentEvent e, Shape a, ViewFactory f)
insertUpdate
in class View
public void removeUpdate(DocumentEvent e, Shape a, ViewFactory f)
removeUpdate
in class View
public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
changedUpdate
in class View
public String getToolTipText(float x, float y, Shape allocation)
getToolTipText
in class View
public Document getDocument()
getDocument
in class View
public int getStartOffset()
getStartOffset
in class View
public int getEndOffset()
getEndOffset
in class View
public Element getElement()
getElement
in class View
public int getResizeWeight(int axis)
getResizeWeight
in class View