C
- component typeD
- decoration typeI
- content typepublic class AcceleratorText<C extends JMenuItem,D extends IDecoration<C,D>,I extends AcceleratorText<C,D,I>> extends AbstractTextContent<C,D,I>
color, halign, htmlSettings, htmlView, ignoreCustomColor, rasterization, shadow, shadowColor, shadowOpacity, shadowSize, truncate, valign
bounds, constraints, id, opacity, overwrite, padding, rotation, size
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor and Description |
---|
AcceleratorText() |
Modifier and Type | Method and Description |
---|---|
protected Color |
getColor(C c,
D d)
Returns text foreground color.
|
String |
getId() |
protected int |
getMnemonicIndex(C c,
D d)
Returns mnemonic index or
-1 if it shouldn't be displayed. |
protected String |
getText(C c,
D d)
Returns text to be painted.
|
boolean |
hasContentBaseline(C c,
D d)
Returns whether or not this content has a reasonable baseline.
|
cleanupHtml, deactivate, getAdjustedHorizontalAlignment, getContentBaseline, getContentBaselineResizeBehavior, getContentPreferredSize, getCustomColor, getFont, getFontMetrics, getHorizontalAlignment, getHtml, getPaintedText, getPreferredTextSize, getRasterization, getShadowColor, getShadowOpacity, getShadowSize, getTextX, getTextY, getVerticalAlignment, isEmpty, isHtmlText, isIgnoreCustomColor, isShadow, isTruncate, paintContent, paintHtml, paintMnemonic, paintText, paintTextFragment, paintTextShadow, paintTextString
activate, getActualRotation, getBaseline, getBaselineResizeBehavior, getBoundsType, getConstraints, getOpacity, getPadding, getPreferredSize, getRotation, getSize, hasBaseline, isLeftToRight, isOverwrite, paint
@NotNull public String getId()
getId
in interface Identifiable
getId
in class AbstractTextContent<C extends JMenuItem,D extends IDecoration<C,D>,I extends AcceleratorText<C,D,I>>
@NotNull protected Color getColor(@NotNull C c, @NotNull D d)
AbstractTextContent
getColor
in class AbstractTextContent<C extends JMenuItem,D extends IDecoration<C,D>,I extends AcceleratorText<C,D,I>>
c
- painted componentd
- painted decoration statepublic boolean hasContentBaseline(@NotNull C c, @NotNull D d)
AbstractContent
hasContentBaseline
in class AbstractTextContent<C extends JMenuItem,D extends IDecoration<C,D>,I extends AcceleratorText<C,D,I>>
c
- aligned componentd
- aligned component decoration statetrue
if this content has a reasonable baseline, false
otherwise@Nullable protected String getText(@NotNull C c, @NotNull D d)
AbstractTextContent
getText
in class AbstractTextContent<C extends JMenuItem,D extends IDecoration<C,D>,I extends AcceleratorText<C,D,I>>
c
- painted componentd
- painted decoration stateprotected int getMnemonicIndex(@NotNull C c, @NotNull D d)
AbstractTextContent
-1
if it shouldn't be displayed.getMnemonicIndex
in class AbstractTextContent<C extends JMenuItem,D extends IDecoration<C,D>,I extends AcceleratorText<C,D,I>>
c
- painted componentd
- painted decoration state-1
if it shouldn't be displayedCopyright © 2020. All rights reserved.