public class MultiTextUI extends javax.swing.plaf.TextUI
TextUI
instances, one from the primary look and feel, and one or more from the
auxiliary look and feel(s).UIManager.addAuxiliaryLookAndFeel(LookAndFeel)| Modifier and Type | Field and Description |
|---|---|
protected java.util.Vector |
uis
A list of references to the actual component UIs.
|
| Constructor and Description |
|---|
MultiTextUI()
Creates a new
MultiTextUI instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(javax.swing.JComponent c,
int x,
int y)
Calls the
ComponentUI.contains(JComponent, int, int) method for all
the UI delegates managed by this MultiTextUI,
returning the result for the UI delegate from the primary look and
feel. |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent target)
Creates a delegate object for the specified component.
|
void |
damageRange(javax.swing.text.JTextComponent tc,
int start,
int end)
Calls the
TextUI.damageRange(JTextComponent, int, int) method for
all the UI delegates managed by this MultiTextUI. |
void |
damageRange(javax.swing.text.JTextComponent tc,
int start,
int end,
javax.swing.text.Position.Bias startBias,
javax.swing.text.Position.Bias endBias)
Calls the
TextUI.damageRange(JTextComponent, int, int,
Position.Bias, Position.Bias) method for all the UI delegates managed by
this MultiTextUI. |
javax.accessibility.Accessible |
getAccessibleChild(javax.swing.JComponent c,
int i)
Calls the
ComponentUI.getAccessibleChild(JComponent, int) method
for all the UI delegates managed by this MultiTextUI,
returning the child for the UI delegate from the primary look and
feel. |
int |
getAccessibleChildrenCount(javax.swing.JComponent c)
Calls the
ComponentUI.getAccessibleChildrenCount(JComponent) method
for all the UI delegates managed by this MultiTextUI,
returning the count for the UI delegate from the primary look and
feel. |
javax.swing.text.EditorKit |
getEditorKit(javax.swing.text.JTextComponent tc)
Calls the
TextUI.getEditorKit(JTextComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the editor kit for the UI delegate from the primary look and
feel. |
java.awt.Dimension |
getMaximumSize(javax.swing.JComponent c)
Calls the
ComponentUI.getMaximumSize(JComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the maximum size for the UI delegate from the primary look and
feel. |
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c)
Calls the
ComponentUI.getMinimumSize(JComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the minimum size for the UI delegate from the primary look and
feel. |
int |
getNextVisualPositionFrom(javax.swing.text.JTextComponent tc,
int pos,
javax.swing.text.Position.Bias bias,
int direction,
javax.swing.text.Position.Bias[] outBias)
Calls the
TextUI.getNextVisualPositionFrom(JTextComponent, int,
Position.Bias, int, Position.Bias[]) method for all
the UI delegates managed by this MultiTextUI,
returning the position for the UI delegate from the primary look and
feel. |
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
Calls the
ComponentUI.getPreferredSize(JComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the preferred size for the UI delegate from the primary look and
feel. |
javax.swing.text.View |
getRootView(javax.swing.text.JTextComponent tc)
Calls the
TextUI.getRootView(JTextComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the view for the UI delegate from the primary look and
feel. |
javax.swing.plaf.ComponentUI[] |
getUIs()
Returns an array containing the UI delegates managed by this
MultiTextUI. |
void |
installUI(javax.swing.JComponent c)
Calls the
ComponentUI.installUI(JComponent) method for all
the UI delegates managed by this MultiTextUI. |
java.awt.Rectangle |
modelToView(javax.swing.text.JTextComponent tc,
int pos)
Calls the
TextUI.modelToView(JTextComponent, int) method for all
the UI delegates managed by this MultiTextUI,
returning the bounds for the UI delegate from the primary look and
feel. |
java.awt.Rectangle |
modelToView(javax.swing.text.JTextComponent tc,
int pos,
javax.swing.text.Position.Bias bias)
Calls the
TextUI.modelToView(JTextComponent, int, Position.Bias)
method for all the UI delegates managed by this MultiTextUI,
returning the bounds for the UI delegate from the primary look and
feel. |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
Calls the
paint(Graphics, JComponent) method for all the UI
delegates managed by this MultiTextUI. |
void |
uninstallUI(javax.swing.JComponent c)
Calls the
ComponentUI.uninstallUI(JComponent) method for all
the UI delegates managed by this MultiTextUI. |
void |
update(java.awt.Graphics g,
javax.swing.JComponent c)
Calls the
ComponentUI.update(Graphics, JComponent) method for all
the UI delegates managed by this MultiTextUI. |
int |
viewToModel(javax.swing.text.JTextComponent t,
java.awt.Point pt)
Calls the
TextUI.viewToModel(JTextComponent, Point) method for all
the UI delegates managed by this MultiTextUI,
returning the position for the UI delegate from the primary look and
feel. |
int |
viewToModel(javax.swing.text.JTextComponent tc,
java.awt.Point loc,
javax.swing.text.Position.Bias[] outBias)
Calls the
TextUI#viewToModel(JTextComponent, Point, Bias[]) method
for all the UI delegates managed by this MultiTextUI,
returning the position for the UI delegate from the primary look and
feel. |
protected java.util.Vector uis
public MultiTextUI()
MultiTextUI instance.createUI(JComponent)public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent target)
MultiTextUI is
returned, otherwise the UI from the default look and feel is returned.target - the component.MultiLookAndFeel.createUIs(ComponentUI, Vector, JComponent)public void installUI(javax.swing.JComponent c)
ComponentUI.installUI(JComponent) method for all
the UI delegates managed by this MultiTextUI.installUI in class javax.swing.plaf.ComponentUIc - the component.ComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()public void uninstallUI(javax.swing.JComponent c)
ComponentUI.uninstallUI(JComponent) method for all
the UI delegates managed by this MultiTextUI.uninstallUI in class javax.swing.plaf.ComponentUIc - the component.ComponentUI.installUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()public javax.swing.plaf.ComponentUI[] getUIs()
MultiTextUI. The first item in the array is always
the UI delegate from the installed default look and feel.public boolean contains(javax.swing.JComponent c, int x, int y)
ComponentUI.contains(JComponent, int, int) method for all
the UI delegates managed by this MultiTextUI,
returning the result for the UI delegate from the primary look and
feel.contains in class javax.swing.plaf.ComponentUIc - the component.x - the x-coordinate.y - the y-coordinate.true if the specified (x, y) coordinate falls within
the bounds of the component as rendered by the UI delegate in the
primary look and feel, and false otherwise.public void update(java.awt.Graphics g, javax.swing.JComponent c)
ComponentUI.update(Graphics, JComponent) method for all
the UI delegates managed by this MultiTextUI.update in class javax.swing.plaf.ComponentUIg - the graphics device.c - the component.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent),
JComponent.paintComponent(java.awt.Graphics)public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint(Graphics, JComponent) method for all the UI
delegates managed by this MultiTextUI.paint in class javax.swing.plaf.ComponentUIg - the graphics device.c - the component.public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
ComponentUI.getPreferredSize(JComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the preferred size for the UI delegate from the primary look and
feel.getPreferredSize in class javax.swing.plaf.ComponentUIc - the component.public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
ComponentUI.getMinimumSize(JComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the minimum size for the UI delegate from the primary look and
feel.getMinimumSize in class javax.swing.plaf.ComponentUIc - the component.public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
ComponentUI.getMaximumSize(JComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the maximum size for the UI delegate from the primary look and
feel.getMaximumSize in class javax.swing.plaf.ComponentUIc - the component.public int getAccessibleChildrenCount(javax.swing.JComponent c)
ComponentUI.getAccessibleChildrenCount(JComponent) method
for all the UI delegates managed by this MultiTextUI,
returning the count for the UI delegate from the primary look and
feel.getAccessibleChildrenCount in class javax.swing.plaf.ComponentUIc - the component.public javax.accessibility.Accessible getAccessibleChild(javax.swing.JComponent c, int i)
ComponentUI.getAccessibleChild(JComponent, int) method
for all the UI delegates managed by this MultiTextUI,
returning the child for the UI delegate from the primary look and
feel.getAccessibleChild in class javax.swing.plaf.ComponentUIc - the componenti - the child index.public java.awt.Rectangle modelToView(javax.swing.text.JTextComponent tc, int pos) throws javax.swing.text.BadLocationException
TextUI.modelToView(JTextComponent, int) method for all
the UI delegates managed by this MultiTextUI,
returning the bounds for the UI delegate from the primary look and
feel.modelToView in class javax.swing.plaf.TextUItc - the text component.pos - the zero-based index of the character into the
document model.javax.swing.text.BadLocationException - if pos does not
designate a valid position in the document model.ComponentView.modelToView(int, Shape, Position.Bias)public java.awt.Rectangle modelToView(javax.swing.text.JTextComponent tc, int pos, javax.swing.text.Position.Bias bias) throws javax.swing.text.BadLocationException
TextUI.modelToView(JTextComponent, int, Position.Bias)
method for all the UI delegates managed by this MultiTextUI,
returning the bounds for the UI delegate from the primary look and
feel.modelToView in class javax.swing.plaf.TextUItc - the text component.pos - the zero-based index of the character into the
document model.bias - whether to take the character before or after the
caret position indicated by pos. The value
must be either Position.Bias.Backward or Position.Bias.Forward.javax.swing.text.BadLocationException - if pos does not
designate a valid position in the document model.ComponentView.modelToView(int, Shape, Position.Bias)public int viewToModel(javax.swing.text.JTextComponent t, java.awt.Point pt)
TextUI.viewToModel(JTextComponent, Point) method for all
the UI delegates managed by this MultiTextUI,
returning the position for the UI delegate from the primary look and
feel.viewToModel in class javax.swing.plaf.TextUIt - the text component.pt - the point.TextUI.viewToModel(JTextComponent, Point, Position.Bias[])public int viewToModel(javax.swing.text.JTextComponent tc, java.awt.Point loc, javax.swing.text.Position.Bias[] outBias)
TextUI#viewToModel(JTextComponent, Point, Bias[]) method
for all the UI delegates managed by this MultiTextUI,
returning the position for the UI delegate from the primary look and
feel.viewToModel in class javax.swing.plaf.TextUItc - the text component.loc - the position in view coordinates.outBias - an array whose size must be at least one.
After the call, outBias[0] will indicate
whether loc is in the glyph before
(Position.Bias.Backward) or after
(Position.Bias.Forward) the returned
caret position.public int getNextVisualPositionFrom(javax.swing.text.JTextComponent tc, int pos, javax.swing.text.Position.Bias bias, int direction, javax.swing.text.Position.Bias[] outBias) throws javax.swing.text.BadLocationException
TextUI.getNextVisualPositionFrom(JTextComponent, int,
Position.Bias, int, Position.Bias[]) method for all
the UI delegates managed by this MultiTextUI,
returning the position for the UI delegate from the primary look and
feel.getNextVisualPositionFrom in class javax.swing.plaf.TextUItc - the text component.pos - the current caret position, a zero-based index
into the document model.bias - whether to take the character before or after the
caret position indicated by pos. The value
must be either Position.Bias.Backward or Position.Bias.Forward.direction - the visual direction. Pass
SwingConstants.WEST for the left
arrow key, SwingConstants.EAST
for the right arrow key, SwingConstants.NORTH for the up arrow
key, or SwingConstants.SOUTH
for the down arrow key.javax.swing.text.BadLocationException - if pos does not
designate a valid position in the document model.public void damageRange(javax.swing.text.JTextComponent tc, int start, int end)
TextUI.damageRange(JTextComponent, int, int) method for
all the UI delegates managed by this MultiTextUI.damageRange in class javax.swing.plaf.TextUItc - the component.start - the start position.end - the end position.public void damageRange(javax.swing.text.JTextComponent tc, int start, int end, javax.swing.text.Position.Bias startBias, javax.swing.text.Position.Bias endBias)
TextUI.damageRange(JTextComponent, int, int,
Position.Bias, Position.Bias) method for all the UI delegates managed by
this MultiTextUI.damageRange in class javax.swing.plaf.TextUItc - the component.start - the start position.end - the end position.startBias - the start bias.endBias - the end bias.public javax.swing.text.EditorKit getEditorKit(javax.swing.text.JTextComponent tc)
TextUI.getEditorKit(JTextComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the editor kit for the UI delegate from the primary look and
feel.getEditorKit in class javax.swing.plaf.TextUItc - the text component.public javax.swing.text.View getRootView(javax.swing.text.JTextComponent tc)
TextUI.getRootView(JTextComponent) method for all
the UI delegates managed by this MultiTextUI,
returning the view for the UI delegate from the primary look and
feel.getRootView in class javax.swing.plaf.TextUItc - the text component.