|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TextUI
org.jdesktop.swingx.plaf.ContextMenuAuxTextUI
public class ContextMenuAuxTextUI
Constructor Summary | |
---|---|
ContextMenuAuxTextUI()
|
Method Summary | |
---|---|
static ComponentUI |
createUI(JComponent c)
|
void |
damageRange(JTextComponent t,
int p0,
int p1)
Causes the portion of the view responsible for the given part of the model to be repainted. |
void |
damageRange(JTextComponent t,
int p0,
int p1,
Position.Bias firstBias,
Position.Bias secondBias)
Causes the portion of the view responsible for the given part of the model to be repainted. |
EditorKit |
getEditorKit(JTextComponent t)
Fetches the binding of services that set a policy for the type of document being edited. |
int |
getNextVisualPositionFrom(JTextComponent t,
int pos,
Position.Bias b,
int direction,
Position.Bias[] biasRet)
Provides a way to determine the next visually represented model location that one might place a caret. |
View |
getRootView(JTextComponent t)
Fetches a View with the allocation of the associated text component (i.e. |
void |
installUI(JComponent comp)
Configures the specified component appropriate for the look and feel. |
Rectangle |
modelToView(JTextComponent t,
int pos)
Converts the given location in the model to a place in the view coordinate system. |
Rectangle |
modelToView(JTextComponent t,
int pos,
Position.Bias bias)
Converts the given location in the model to a place in the view coordinate system. |
void |
uninstallUI(JComponent comp)
Reverses configuration which was done on the specified component during installUI . |
void |
update(Graphics g,
JComponent c)
Notifies this UI delegate that it's time to paint the specified component. |
int |
viewToModel(JTextComponent t,
Point pt)
Converts the given place in the view coordinate system to the nearest representative location in the model. |
int |
viewToModel(JTextComponent t,
Point pt,
Position.Bias[] biasReturn)
Provides a mapping from the view coordinate space to the logical coordinate space of the model. |
Methods inherited from class javax.swing.plaf.TextUI |
---|
getToolTipText |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextMenuAuxTextUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent comp)
javax.swing.plaf.ComponentUI
ComponentUI
instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
LayoutManager
on the component if necessary.
PropertyChangeListener
on the component in order
to detect and respond to component property changes appropriately.
installUI
in class ComponentUI
comp
- the component where this UI delegate is being installedComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent comp)
javax.swing.plaf.ComponentUI
installUI
. This method is invoked when this
UIComponent
instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI
, being careful to
leave the JComponent
instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
uninstallUI
in class ComponentUI
comp
- the component from which this UI delegate is being removed;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
public void update(Graphics g, JComponent c)
javax.swing.plaf.ComponentUI
JComponent
when the specified component is being painted.
By default this method will fill the specified component with
its background color (if its opaque
property is
true
) and then immediately call paint
.
In general this method need not be overridden by subclasses;
all look-and-feel rendering code should reside in the paint
method.
update
in class ComponentUI
g
- the Graphics
context in which to paintc
- the component being painted;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
,
JComponent.paintComponent(java.awt.Graphics)
public Rectangle modelToView(JTextComponent t, int pos) throws BadLocationException
javax.swing.plaf.TextUI
modelToView
in class TextUI
pos
- the local location in the model to translate >= 0
BadLocationException
- if the given position does not
represent a valid location in the associated documentpublic Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias) throws BadLocationException
javax.swing.plaf.TextUI
modelToView
in class TextUI
pos
- the local location in the model to translate >= 0
BadLocationException
- if the given position does not
represent a valid location in the associated documentpublic int viewToModel(JTextComponent t, Point pt)
javax.swing.plaf.TextUI
viewToModel
in class TextUI
pt
- the location in the view to translate. This
should be in the same coordinate system as the mouse
events.
public int viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn)
javax.swing.plaf.TextUI
viewToModel
in class TextUI
pt
- the location in the view to translate.
This should be in the same coordinate system
as the mouse events.biasReturn
- filled in by this method to indicate whether
the point given is closer to the previous or the next
character in the model
public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException
javax.swing.plaf.TextUI
getNextVisualPositionFrom
in class TextUI
pos
- the position to convert >= 0direction
- the direction from the current position that can
be thought of as the arrow keys typically found on a keyboard.
This may be SwingConstants.WEST, SwingConstants.EAST,
SwingConstants.NORTH, or SwingConstants.SOUTH.
BadLocationException
public void damageRange(JTextComponent t, int p0, int p1)
javax.swing.plaf.TextUI
damageRange
in class TextUI
p0
- the beginning of the range >= 0p1
- the end of the range >= p0public void damageRange(JTextComponent t, int p0, int p1, Position.Bias firstBias, Position.Bias secondBias)
javax.swing.plaf.TextUI
damageRange
in class TextUI
p0
- the beginning of the range >= 0p1
- the end of the range >= p0public EditorKit getEditorKit(JTextComponent t)
javax.swing.plaf.TextUI
getEditorKit
in class TextUI
public View getRootView(JTextComponent t)
javax.swing.plaf.TextUI
getRootView
in class TextUI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |