Class RadiancePasswordFieldUI.RadiancePasswordView
java.lang.Object
javax.swing.text.View
javax.swing.text.PlainView
javax.swing.text.FieldView
org.pushingpixels.radiance.theming.internal.ui.RadiancePasswordFieldUI.RadiancePasswordView
- All Implemented Interfaces:
SwingConstants, TabExpander
- Enclosing class:
RadiancePasswordFieldUI
Custom password view.
-
Field Summary
FieldsFields inherited from class View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISFields inherited from interface SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRadiancePasswordView(JPasswordField field, Element element) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate floatdrawEchoCharacter(Graphics g, float x, float y, boolean isSelected) Draws the echo character(s) for a single password field character.protected floatdrawSelectedText(Graphics2D g, float x, float y, int p0, int p1) protected floatdrawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) private intReturns the advance of a single password field character.floatgetPreferredSpan(int axis) modelToView(int pos, Shape a, Position.Bias b) intviewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Methods inherited from class FieldView
adjustAllocation, getFontMetrics, getResizeWeight, insertUpdate, paint, removeUpdateMethods inherited from class PlainView
changedUpdate, damageLineRange, drawLine, drawLine, drawSelectedText, drawUnselectedText, getLineBuffer, getTabSize, lineToRect, nextTabStop, setSize, updateDamage, updateMetricsMethods inherited from class View
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, updateChildren, updateLayout, viewToModel
-
Field Details
-
field
The associated password field.
-
-
Constructor Details
-
RadiancePasswordView
Simple constructor.- Parameters:
field- The associated password field.element- The element
-
-
Method Details
-
drawEchoCharacter
Draws the echo character(s) for a single password field character. The number of echo characters is defined byRadianceSynapse.PASSWORD_ECHO_PER_CHARclient property.- Parameters:
g- Graphics contextx- X coordinate of the first echo character to draw.y- Y coordinate of the first echo character to draw.isSelected- Indicates whether the password field character is selected.- Returns:
- The X location of the next echo character.
- See Also:
-
getEchoCharAdvance
private int getEchoCharAdvance()Returns the advance of a single password field character. The advance is the pixel distance between first echo characters of consecutive password field characters. TheRadianceSynapse.PASSWORD_ECHO_PER_CHARcan be used to specify that more than one echo character is used for each password field character.- Returns:
- The advance of a single password field character
-
drawSelectedText
protected float drawSelectedText(Graphics2D g, float x, float y, int p0, int p1) throws BadLocationException - Overrides:
drawSelectedTextin classPlainView- Throws:
BadLocationException
-
drawUnselectedText
protected float drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) throws BadLocationException - Overrides:
drawUnselectedTextin classPlainView- Throws:
BadLocationException
-
modelToView
- Overrides:
modelToViewin classFieldView- Throws:
BadLocationException
-
viewToModel
- Overrides:
viewToModelin classFieldView
-
getPreferredSpan
public float getPreferredSpan(int axis) - Overrides:
getPreferredSpanin classFieldView
-