public class SynthEditorPaneUI extends BasicEditorPaneUIimplements SynthUI
JEditorPane.
BasicTextUI.BasicCaret , BasicTextUI.BasicHighlighter DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| Constructor and Description |
|---|
SynthEditorPaneUI()
|
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent
Creates a new UI object for the given component.
|
SynthContext |
getContext(JComponent
Returns the Context for the specified component.
|
protected void |
installDefaults()
Initializes component properties, such as font, foreground, background, caret color, selection color, selected text color, disabled text color, and border color.
|
protected void |
paint(SynthContext
Paints the specified component.
|
protected void |
paintBackground(Graphics
Paints a background for the view.
|
void |
paintBorder(SynthContext
Paints the border.
|
protected void |
propertyChange(PropertyChangeEvent
This method gets called when a bound property is changed on the associated JTextComponent.
|
protected void |
uninstallDefaults()
Sets the component properties that have not been explicitly overridden to
null.
|
void |
update(Graphics
Notifies this UI delegate to repaint the specified component.
|
getEditorKit, getPropertyPrefix, installUI, uninstallUIcreate, create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, getVisibleEditorRect, installKeyboardActions, installListeners, modelChanged, modelToView, modelToView, paint, paintSafely, setView, uninstallKeyboardActions, uninstallListeners, viewToModel, viewToModelcontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehaviorpublic static ComponentUIcreateUI(JComponent c)
c - component to create UI object for
protected void installDefaults()
installDefaults in class
BasicTextUI
BasicTextUI.uninstallDefaults() ,
BasicTextUI.installUI(javax.swing.JComponent)
protected void uninstallDefaults()
null. A property is considered overridden if its current value is not a
UIResource.
uninstallDefaults in class
BasicTextUI
BasicTextUI.installDefaults() ,
BasicTextUI.uninstallUI(javax.swing.JComponent)
protected void propertyChange(PropertyChangeEventevt)
propertyChange in class
BasicEditorPaneUI
evt - the property change event
public SynthContextgetContext(JComponent c)
getContext in interface
SynthUI
c - Component requesting SynthContext.
public void update(Graphicsg, JComponent c)
paint(SynthContext,Graphics) method.
In general, this method does not need to be overridden by subclasses. All Look and Feel rendering code should reside in the paint method.
update in class
BasicTextUI
g - the
Graphics object used for painting
c - the component being painted
paint(SynthContext,Graphics)
protected void paint(SynthContextcontext, Graphics g)
context - context for the component being painted
g - the
Graphics object used for painting
update(Graphics,JComponent)
protected void paintBackground(Graphicsg)
paintBackground in class
BasicTextUI
g - the graphics context
public void paintBorder(SynthContextcontext, Graphics g, int x, int y, int w, int h)
paintBorder in interface
SynthUI
context - a component context
g -
Graphics to paint on
x - the X coordinate
y - the Y coordinate
w - width of the border
h - height of the border