public class BaseTextUI extends BasicTextUI implements PropertyChangeListener, DocumentListener, AtomicLockListener
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor and Description |
---|
BaseTextUI() |
Modifier and Type | Method and Description |
---|---|
void |
atomicLock(AtomicLockEvent evt) |
void |
atomicUnlock(AtomicLockEvent evt) |
void |
changedUpdate(DocumentEvent evt)
The change in document notification.
|
View |
create(Element elem)
Creates a view for an element.
|
View |
create(Element elem,
int p0,
int p1)
Creates a view for an element.
|
void |
damageRange(JTextComponent t,
int p0,
int p1,
Position.Bias p0Bias,
Position.Bias p1Bias) |
int |
getBaseX(int y) |
EditorKit |
getEditorKit(JTextComponent c)
Fetches the EditorKit for the UI.
|
EditorUI |
getEditorUI()
Get extended UI.
|
static JTextComponent |
getFocusedComponent() |
int |
getNextVisualPositionFrom(JTextComponent t,
int pos,
Position.Bias b,
int direction,
Position.Bias[] biasRet)
Next visually represented model location where caret can be placed.
|
int |
getPosFromY(int y) |
protected String |
getPropertyPrefix() |
int |
getYFromPos(int pos)
Return y coordinate value for given offset.
|
void |
insertUpdate(DocumentEvent evt)
Insert to document notification.
|
protected void |
installKeyboardActions() |
void |
installUI(JComponent c)
Installs the UI for a component.
|
void |
invalidateStartY() |
protected boolean |
isRootViewReplaceNecessary() |
protected void |
modelChanged()
Called when the model of component is changed
|
void |
preferenceChanged(boolean width,
boolean height)
Specifies that some preference has changed.
|
void |
propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed.
|
protected void |
refresh() |
void |
removeUpdate(DocumentEvent evt)
Remove from document notification.
|
protected void |
rootViewReplaceNotify() |
void |
uninstallUI(JComponent c)
Deinstalls the UI for a component
|
int |
viewToModel(JTextComponent c,
int x,
int y) |
createCaret, createHighlighter, createKeymap, damageRange, getComponent, getKeymapName, getMaximumSize, getMinimumSize, getPreferredSize, getRootView, getToolTipText, getVisibleEditorRect, installDefaults, installListeners, modelToView, modelToView, modelToView2D, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, update, viewToModel, viewToModel, viewToModel2D
getToolTipText2D
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
protected String getPropertyPrefix()
getPropertyPrefix
in class BasicTextUI
public static JTextComponent getFocusedComponent()
protected boolean isRootViewReplaceNecessary()
protected void rootViewReplaceNotify()
protected void modelChanged()
modelChanged
in class BasicTextUI
protected void installKeyboardActions()
installKeyboardActions
in class BasicTextUI
public void installUI(JComponent c)
installUI
in class BasicTextUI
public void uninstallUI(JComponent c)
uninstallUI
in class BasicTextUI
public int getYFromPos(int pos) throws BadLocationException
pos
- offset in a read-locked documentBadLocationException
- in case offset is not in document's bounds.public int getPosFromY(int y) throws BadLocationException
BadLocationException
public int getBaseX(int y)
public int viewToModel(JTextComponent c, int x, int y)
public void damageRange(JTextComponent t, int p0, int p1, Position.Bias p0Bias, Position.Bias p1Bias)
damageRange
in class BasicTextUI
public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException
getNextVisualPositionFrom
in class BasicTextUI
BadLocationException
public EditorKit getEditorKit(JTextComponent c)
getEditorKit
in class BasicTextUI
public EditorUI getEditorUI()
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
propertyChange
in class BasicTextUI
public void insertUpdate(DocumentEvent evt)
insertUpdate
in interface DocumentListener
public void removeUpdate(DocumentEvent evt)
removeUpdate
in interface DocumentListener
public void changedUpdate(DocumentEvent evt)
changedUpdate
in interface DocumentListener
evt
- The change notification from the currently associated document.public void atomicLock(AtomicLockEvent evt)
atomicLock
in interface AtomicLockListener
public void atomicUnlock(AtomicLockEvent evt)
atomicUnlock
in interface AtomicLockListener
public View create(Element elem)
create
in interface ViewFactory
create
in class BasicTextUI
elem
- the elementpublic View create(Element elem, int p0, int p1)
create
in class BasicTextUI
elem
- the elementp0
- the starting offset >= 0p1
- the ending offset >= p0public void preferenceChanged(boolean width, boolean height)
public void invalidateStartY()
protected void refresh()