Package com.formdev.flatlaf.ui
Class FlatEditorPaneUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.TextUI
-
- javax.swing.plaf.basic.BasicTextUI
-
- javax.swing.plaf.basic.BasicEditorPaneUI
-
- com.formdev.flatlaf.ui.FlatEditorPaneUI
-
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
,ViewFactory
public class FlatEditorPaneUI extends BasicEditorPaneUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJEditorPane
.- UiDefault:
- EditorPane.font Font, EditorPane.background Color, EditorPane.foreground Color also used if not editable, EditorPane.caretForeground Color, EditorPane.selectionBackground Color, EditorPane.selectionForeground Color, EditorPane.disabledBackground Color used if not enabled, EditorPane.inactiveBackground Color used if not editable, EditorPane.inactiveForeground Color used if not enabled (yes, this is confusing; this should be named disabledForeground), EditorPane.border Border, EditorPane.margin Insets, EditorPane.caretBlinkRate int default is 500 milliseconds , Component.minimumWidth int, Component.isIntelliJTheme boolean, EditorPane.focusedBackground Color optional
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
disabledBackground
protected Color
focusedBackground
protected Color
inactiveBackground
protected boolean
isIntelliJTheme
protected int
minimumWidth
-
Constructor Summary
Constructors Constructor Description FlatEditorPaneUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyStyle(Object style)
protected Object
applyStyleProperty(String key, Object value)
protected Caret
createCaret()
static ComponentUI
createUI(JComponent c)
Dimension
getMinimumSize(JComponent c)
Dimension
getPreferredSize(JComponent c)
Map<String,Class<?>>
getStyleableInfos(JComponent c)
Object
getStyleableValue(JComponent c, String key)
protected void
installDefaults()
protected void
installListeners()
protected void
installStyle()
void
installUI(JComponent c)
protected void
paintBackground(Graphics g)
protected void
paintSafely(Graphics g)
protected void
propertyChange(PropertyChangeEvent e)
protected void
uninstallDefaults()
protected void
uninstallListeners()
-
Methods inherited from class javax.swing.plaf.basic.BasicEditorPaneUI
getEditorKit, getPropertyPrefix, uninstallUI
-
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, create, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getKeymapName, getMaximumSize, getNextVisualPositionFrom, getRootView, getToolTipText, getVisibleEditorRect, installKeyboardActions, modelChanged, modelToView, modelToView, modelToView2D, paint, setView, uninstallKeyboardActions, update, viewToModel, viewToModel, viewToModel2D
-
Methods inherited from class javax.swing.plaf.TextUI
getToolTipText2D
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
-
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in classBasicEditorPaneUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classBasicTextUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classBasicTextUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classBasicTextUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classBasicTextUI
-
createCaret
protected Caret createCaret()
- Overrides:
createCaret
in classBasicTextUI
-
propertyChange
protected void propertyChange(PropertyChangeEvent e)
- Overrides:
propertyChange
in classBasicEditorPaneUI
-
installStyle
protected void installStyle()
- Since:
- 2
-
applyStyle
protected void applyStyle(Object style)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
getPreferredSize
in classBasicTextUI
-
getMinimumSize
public Dimension getMinimumSize(JComponent c)
- Overrides:
getMinimumSize
in classBasicTextUI
-
paintSafely
protected void paintSafely(Graphics g)
- Overrides:
paintSafely
in classBasicTextUI
-
paintBackground
protected void paintBackground(Graphics g)
- Overrides:
paintBackground
in classBasicTextUI
-
-