Package mdlaf.components.textfield
Class MaterialComponentField
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.TextUI
-
- javax.swing.plaf.basic.BasicTextUI
-
- javax.swing.plaf.basic.BasicTextFieldUI
-
- mdlaf.components.textfield.MaterialComponentField
-
- All Implemented Interfaces:
javax.swing.text.ViewFactory
- Direct Known Subclasses:
MaterialFormattedTextFieldUI,MaterialPasswordFieldUI,MaterialTextFieldUI
public abstract class MaterialComponentField extends javax.swing.plaf.basic.BasicTextFieldUI
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classMaterialComponentField.FocusListenerColorLineprotected classMaterialComponentField.MaterialPropertyChangeListener
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.ColoractiveBackgroundprotected java.awt.ColoractiveForegroundprotected java.awt.Colorbackgroundprotected java.awt.ColorcolorLineprotected java.awt.ColorcolorLineActiveprotected java.awt.ColorcolorLineInactiveprotected java.awt.ColordisabledBackgroundprotected java.awt.ColordisabledForegroundprotected booleandrawLineprotected booleanfocusedprotected java.awt.event.FocusListenerfocusListenerColorLineprotected java.awt.Colorforegroundprotected java.awt.ColorinactiveBackgroundprotected java.awt.ColorinactiveForegroundprotected static java.lang.StringPROPERTY_ENABLED_COMPONENTprotected static java.lang.StringPROPERTY_LINE_COLORprotected static java.lang.StringPROPERTY_SELECTION_COLORprotected static java.lang.StringPROPERTY_SELECTION_TEXT_COLORprotected java.beans.PropertyChangeListenerpropertyChangeListenerprotected java.beans.PropertyChangeSupportpropertyChangeSupportprotected javax.swing.text.JTextComponenttextComponent
-
Constructor Summary
Constructors Constructor Description MaterialComponentField()MaterialComponentField(boolean drawLine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidchangeColorOnFocus(java.awt.Graphics g)protected voidfirePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)protected voidinstallMyDefaults(javax.swing.JComponent component)protected voidlogicForChangeColorOnFocus(javax.swing.JComponent component, java.awt.Color background, java.awt.Color foreground)protected voidlogicForPropertyChange(java.awt.Color newColor, boolean isForeground)protected voidpaintLine(java.awt.Graphics graphics)-
Methods inherited from class javax.swing.plaf.basic.BasicTextFieldUI
create, createUI, getBaseline, getBaselineResizeBehavior, getPropertyPrefix
-
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, modelToView2D, paint, paintBackground, paintSafely, propertyChange, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel, viewToModel2D
-
-
-
-
Field Detail
-
PROPERTY_LINE_COLOR
protected static final java.lang.String PROPERTY_LINE_COLOR
- See Also:
- Constant Field Values
-
PROPERTY_SELECTION_COLOR
protected static final java.lang.String PROPERTY_SELECTION_COLOR
- See Also:
- Constant Field Values
-
PROPERTY_SELECTION_TEXT_COLOR
protected static final java.lang.String PROPERTY_SELECTION_TEXT_COLOR
- See Also:
- Constant Field Values
-
PROPERTY_ENABLED_COMPONENT
protected static final java.lang.String PROPERTY_ENABLED_COMPONENT
- See Also:
- Constant Field Values
-
drawLine
protected boolean drawLine
-
focused
protected boolean focused
-
textComponent
protected javax.swing.text.JTextComponent textComponent
-
background
protected java.awt.Color background
-
foreground
protected java.awt.Color foreground
-
activeBackground
protected java.awt.Color activeBackground
-
activeForeground
protected java.awt.Color activeForeground
-
inactiveBackground
protected java.awt.Color inactiveBackground
-
inactiveForeground
protected java.awt.Color inactiveForeground
-
disabledBackground
protected java.awt.Color disabledBackground
-
disabledForeground
protected java.awt.Color disabledForeground
-
colorLineInactive
protected java.awt.Color colorLineInactive
-
colorLineActive
protected java.awt.Color colorLineActive
-
colorLine
protected java.awt.Color colorLine
-
focusListenerColorLine
protected java.awt.event.FocusListener focusListenerColorLine
-
propertyChangeListener
protected java.beans.PropertyChangeListener propertyChangeListener
-
propertyChangeSupport
protected java.beans.PropertyChangeSupport propertyChangeSupport
-
-
Method Detail
-
logicForChangeColorOnFocus
protected void logicForChangeColorOnFocus(javax.swing.JComponent component, java.awt.Color background, java.awt.Color foreground)
-
installMyDefaults
protected void installMyDefaults(javax.swing.JComponent component)
-
logicForPropertyChange
protected void logicForPropertyChange(java.awt.Color newColor, boolean isForeground)
-
changeColorOnFocus
protected void changeColorOnFocus(java.awt.Graphics g)
-
firePropertyChange
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
-
paintLine
protected void paintLine(java.awt.Graphics graphics)
-
-