public abstract class AbstractTextEditorPainter<E extends javax.swing.text.JTextComponent,U extends javax.swing.plaf.basic.BasicTextUI,D extends IDecoration<E,D>> extends AbstractDecorationPainter<E,U,D> implements IAbstractTextEditorPainter<E,U>, javax.swing.SwingConstants
| Modifier and Type | Field and Description |
|---|---|
protected com.alee.utils.general.Pair<DocumentChangeListener,java.beans.PropertyChangeListener> |
documentChangeListeners
Listeners.
|
protected boolean |
hideInputPromptOnFocus
Whether or not should hide input prompt on focus gain.
|
protected java.awt.Font |
inputPromptFont
Input prompt text font.
|
protected java.awt.Color |
inputPromptForeground
Input prompt tex foreground.
|
protected int |
inputPromptHorizontalPosition
Input prompt text horizontal position.
|
protected boolean |
inputPromptOnlyWhenEditable
Whether or not should display input prompt only when component is editable.
|
protected int |
inputPromptVerticalPosition
Input prompt text vertical position.
|
ancestor, DECORATION_STATES_PROPERTY, decorationCache, decorations, focused, focusStateTracker, hierarchyTracker, hover, hoverStateTracker, neighboursTracker, statescomponent, listeners, ltr, propertyChangeListener, ui| Constructor and Description |
|---|
AbstractTextEditorPainter() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<java.lang.String> |
getDecorationStates()
Returns current component decoration states.
|
protected java.awt.Rectangle |
getEditorRect()
Returns the bounding box for the root view.
|
void |
install(E c,
U ui)
Called when painter is installed onto some component.
|
boolean |
isInputPromptVisible()
Returns whether input prompt visible or not.
|
protected void |
paintContent(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
U ui)
Paints content decorated by this painter.
|
protected void |
paintInputPrompt(java.awt.Graphics2D g2d)
Draws input prompt text if it is available and should be visible at the moment.
|
void |
uninstall(E c,
U ui)
Called when painter is installed into some component.
|
adjustBounds, asList, collectDecorationStates, getBorders, getDecoration, getDecorations, getDecorationSize, getPreferredSize, getSectionPainters, installFocusListener, installHierarchyListener, installHoverListener, isDecorated, isDecorationPaintAllowed, isEnabled, isFocused, isHover, isOpaque, isOpaqueDecorated, isOpaqueUndecorated, isPlainBackgroundPaintAllowed, paint, propertyChange, provideShape, uninstallFocusListener, uninstallHierarchyListener, uninstallHoverListener, updateDecorationState, usesState, usesStateaddPainterListener, b, borderChange, getCompleteBorder, i, i, i, installPropertyChangeListener, isSectionPainter, isSettingsUpdateAllowed, orientationChange, p, removePainterListener, repaint, repaint, repaint, revalidate, saveOrientation, uninstallPropertyChangeListener, updateAll, updateBorder, updateOpacity, updateOrientationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputPromptaddPainterListener, getBorders, getPreferredSize, isOpaque, paint, removePainterListenerprotected int inputPromptHorizontalPosition
protected int inputPromptVerticalPosition
@XStreamConverter(value=com.alee.utils.xml.FontConverter.class) protected java.awt.Font inputPromptFont
protected java.awt.Color inputPromptForeground
protected boolean inputPromptOnlyWhenEditable
protected boolean hideInputPromptOnFocus
protected transient com.alee.utils.general.Pair<DocumentChangeListener,java.beans.PropertyChangeListener> documentChangeListeners
public void install(E c, U ui)
Painterinstall in interface Painter<E extends javax.swing.text.JTextComponent,U extends javax.swing.plaf.basic.BasicTextUI>install in class AbstractDecorationPainter<E extends javax.swing.text.JTextComponent,U extends javax.swing.plaf.basic.BasicTextUI,D extends IDecoration<E,D>>c - component this painter is being installed ontoui - component UIpublic void uninstall(E c, U ui)
Painteruninstall in interface Painter<E extends javax.swing.text.JTextComponent,U extends javax.swing.plaf.basic.BasicTextUI>uninstall in class AbstractDecorationPainter<E extends javax.swing.text.JTextComponent,U extends javax.swing.plaf.basic.BasicTextUI,D extends IDecoration<E,D>>c - component this painter is being uninstalled fromui - component UIprotected java.util.List<java.lang.String> getDecorationStates()
AbstractDecorationPaintergetDecorationStates in class AbstractDecorationPainter<E extends javax.swing.text.JTextComponent,U extends javax.swing.plaf.basic.BasicTextUI,D extends IDecoration<E,D>>protected void paintContent(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
U ui)
AbstractDecorationPainterpaintContent in class AbstractDecorationPainter<E extends javax.swing.text.JTextComponent,U extends javax.swing.plaf.basic.BasicTextUI,D extends IDecoration<E,D>>g2d - graphics contextbounds - painting boundsc - painted componentui - painted component UIprotected void paintInputPrompt(java.awt.Graphics2D g2d)
g2d - graphics contextprotected java.awt.Rectangle getEditorRect()
public boolean isInputPromptVisible()
IAbstractTextEditorPainterisInputPromptVisible in interface IAbstractTextEditorPainter<E extends javax.swing.text.JTextComponent,U extends javax.swing.plaf.basic.BasicTextUI>