APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.plaf.synth

public Class SynthEditorPaneUI

extends BasicEditorPaneUI
implements SynthUI
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.synth.SynthUI, javax.swing.plaf.synth.SynthConstants
Known Direct Subclasses
javax.swing.plaf.synth.SynthTextPaneUI
Imports
java.awt.*, javax.swing.*, javax.swing.text.*, javax.swing.plaf.*, javax.swing.plaf.basic.BasicEditorPaneUI, java.beans.PropertyChangeEvent

Provides the Synth L&F UI delegate for javax.swing.JEditorPane.
Author
Shannon Hickey
Since
1.7

Field Summary

Modifier and TypeField and Description
private Boolean
private SynthStyle
private boolean

Constructor Summary

AccessConstructor and Description
public
SynthEditorPaneUI()

Constructs a SynthEditorPaneUI.

Method Summary

Modifier and TypeMethod and Description
public static ComponentUI

Returns:

the UI object
createUI
(JComponent
component to create UI object for
c
)

Hides javax.swing.plaf.basic.BasicEditorPaneUI.createUI.

Creates a new UI object for the given component.

private int
public SynthContext
getContext(JComponent c)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.

private SynthContext
getContext(JComponent c, int state)

protected void
installDefaults()

Overrides javax.swing.plaf.basic.BasicTextUI.installDefaults.

Initializes component properties, such as font, foreground, background, caret color, selection color, selected text color, disabled text color, border, and margin.

protected void
paint(SynthContext
context for the component being painted
context
,
Graphics
the Graphics object used for painting
g
)

Paints the specified component.

protected void
paintBackground(Graphics g)

Overrides javax.swing.plaf.basic.BasicTextUI.paintBackground.

Paints a background for the view.

pack-priv void
public void
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.

protected void
propertyChange(PropertyChangeEvent
the property change event
evt
)

Overrides javax.swing.plaf.basic.BasicEditorPaneUI.propertyChange.

This method gets called when a bound property is changed on the associated JTextComponent.

protected void
uninstallDefaults()

Overrides javax.swing.plaf.basic.BasicTextUI.uninstallDefaults.

Sets the component properties that have not been explicitly overridden to null.

public void
update(Graphics
the Graphics object used for painting
g
,
JComponent
the component being painted
c
)

Overrides javax.swing.plaf.basic.BasicTextUI.update.

Notifies this UI delegate to repaint the specified component.

private void
updateStyle(JTextComponent comp, boolean updateKBAction)

Inherited from javax.swing.plaf.basic.BasicEditorPaneUI:
getEditorKitgetPropertyPrefixinstallUIuninstallUI

Field Detail

localTrueback to summary
private Boolean localTrue
styleback to summary
private SynthStyle style
updateKBActionback to summary
private boolean updateKBAction

Constructor Detail

SynthEditorPaneUIback to summary
public SynthEditorPaneUI()

Constructs a SynthEditorPaneUI.

Method Detail

createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.basic.BasicEditorPaneUI.createUI.

Creates a new UI object for the given component.

Parameters
c:JComponent

component to create UI object for

Returns:ComponentUI

the UI object

getComponentStateback to summary
private int getComponentState(JComponent c)
getContextback to summary
public SynthContext getContext(JComponent c)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Doc from javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.

Annotations
@Override
getContextback to summary
private SynthContext getContext(JComponent c, int state)
installDefaultsback to summary
protected void installDefaults()

Overrides javax.swing.plaf.basic.BasicTextUI.installDefaults.

Doc from javax.swing.plaf.basic.BasicTextUI.installDefaults.

Initializes component properties, such as font, foreground, background, caret color, selection color, selected text color, disabled text color, border, and margin. Each property is set if its current value is either null or a UIResource.

Annotations
@Override
paintback to summary
protected void paint(SynthContext context, Graphics g)

Paints the specified component.

Parameters
context:SynthContext

context for the component being painted

g:Graphics

the Graphics object used for painting

See Also
update(Graphics, JComponent)
paintBackgroundback to summary
protected void paintBackground(Graphics g)

Overrides javax.swing.plaf.basic.BasicTextUI.paintBackground.

Doc from javax.swing.plaf.basic.BasicTextUI.paintBackground.

Paints a background for the view. This will only be called if isOpaque() on the associated component is true. The default is to paint the background color of the component.

Annotations
@Override
paintBackgroundback to summary
pack-priv void paintBackground(SynthContext context, Graphics g, JComponent c)
paintBorderback to summary
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Doc from javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.

Annotations
@Override
propertyChangeback to summary
protected void propertyChange(PropertyChangeEvent evt)

Overrides javax.swing.plaf.basic.BasicEditorPaneUI.propertyChange.

This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses. This is implemented to rebuild the ActionMap based upon an EditorKit change.

Parameters
evt:PropertyChangeEvent

the property change event

Annotations
@Override
uninstallDefaultsback to summary
protected void uninstallDefaults()

Overrides javax.swing.plaf.basic.BasicTextUI.uninstallDefaults.

Doc from javax.swing.plaf.basic.BasicTextUI.uninstallDefaults.

Sets the component properties that have not been explicitly overridden to null. A property is considered overridden if its current value is not a UIResource.

Annotations
@Override
updateback to summary
public void update(Graphics g, JComponent c)

Overrides javax.swing.plaf.basic.BasicTextUI.update.

Notifies this UI delegate to repaint the specified component. This method paints the component background, then calls the 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.

Parameters
g:Graphics

the Graphics object used for painting

c:JComponent

the component being painted

Annotations
@Override
See Also
paint(SynthContext, Graphics)
updateStyleback to summary
private void updateStyle(JTextComponent comp, boolean updateKBAction)