public static enum SubstanceSlices.FocusKind extends java.lang.Enum<SubstanceSlices.FocusKind>
| Enum Constant | Description |
|---|---|
ALL |
Focus indication around the whole component.
|
ALL_INNER |
Focus indication around the whole component, but moved 1 pixel inside the component.
|
ALL_STRONG_INNER |
Focus indication around the whole component, but moved 1 pixel inside the component.
|
NONE |
No focus indication.
|
STRONG_UNDERLINE |
Strong focus indication under the component text.
|
TEXT |
Focus indication around the text.
|
UNDERLINE |
Focus indication under the component text.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected static float |
getDashGap(int fontSize) |
Returns DPI-aware dash gap for dash-based focus painting.
|
protected static float |
getDashLength(int fontSize) |
Returns DPI-aware dash length for dash-based focus painting.
|
boolean |
isAnimated() |
Returns indication whether
this focus kind can be animated. |
abstract void |
paintFocus(java.awt.Component mainComp,
java.awt.Component focusedComp,
org.pushingpixels.substance.internal.animation.TransitionAwareUI transitionAwareUI,
java.awt.Graphics2D graphics,
java.awt.Shape focusShape,
java.awt.Rectangle textRect,
float extraPadding) |
Paints the focus ring on the specified component.
|
static SubstanceSlices.FocusKind |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static SubstanceSlices.FocusKind[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SubstanceSlices.FocusKind NONE
public static final SubstanceSlices.FocusKind TEXT
public static final SubstanceSlices.FocusKind ALL
public static final SubstanceSlices.FocusKind ALL_INNER
public static final SubstanceSlices.FocusKind ALL_STRONG_INNER
public static final SubstanceSlices.FocusKind UNDERLINE
public static final SubstanceSlices.FocusKind STRONG_UNDERLINE
public static SubstanceSlices.FocusKind[] values()
for (SubstanceSlices.FocusKind c : SubstanceSlices.FocusKind.values()) System.out.println(c);
public static SubstanceSlices.FocusKind valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic abstract void paintFocus(java.awt.Component mainComp,
java.awt.Component focusedComp,
org.pushingpixels.substance.internal.animation.TransitionAwareUI transitionAwareUI,
java.awt.Graphics2D graphics,
java.awt.Shape focusShape,
java.awt.Rectangle textRect,
float extraPadding)
mainComp - The main component for the focus painting.focusedComp - The actual component that has the focus. For example, the main
component can be a JSpinner, while the focused component
is a text field inside the the spinner editor.transitionAwareUI - Transition-aware UI implementation.graphics - Graphics context.focusShape - Focus shape. May be null - in this case, the
bounds of
mainComp will be used.textRect - Text rectangle (if relevant).extraPadding - Extra padding between the component bounds and the focus ring
painting.protected static float getDashLength(int fontSize)
fontSize - The font size of the component for focus painting.protected static float getDashGap(int fontSize)
fontSize - The font size of the component for focus painting.public boolean isAnimated()
this focus kind can be animated. For example,
focus rings painted with solid lines are generally static.true if this focus kind can be animated,
false otherwise.