< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/Labeled.java

Print this page

        

*** 133,142 **** --- 133,143 ---- * Properties * * * **************************************************************************/ /** * The text to display in the label. The text may be null. + * @return the text to display in the label */ public final StringProperty textProperty() { if (text == null) { text = new SimpleStringProperty(this, "text", ""); }
*** 147,156 **** --- 148,158 ---- public final String getText() { return text == null ? "" : text.getValue(); } /** * Specifies how the text and graphic within the Labeled should be * aligned when there is empty space within the Labeled. + * @return the alignment within this labeled */ public final ObjectProperty<Pos> alignmentProperty() { if (alignment == null) { alignment = new StyleableObjectProperty<Pos>(Pos.CENTER_LEFT) {
*** 178,187 **** --- 180,190 ---- /** * Specifies the behavior for lines of text <em>when text is multiline</em> * Unlike {@link #contentDisplayProperty} which affects the graphic and text, this setting * only affects multiple lines of text relative to the text bounds. + * @return the alignment of lines of text within this labeled */ public final ObjectProperty<TextAlignment> textAlignmentProperty() { if (textAlignment == null) { textAlignment = new StyleableObjectProperty<TextAlignment>(TextAlignment.LEFT) {
*** 208,217 **** --- 211,221 ---- public final TextAlignment getTextAlignment() { return textAlignment == null ? TextAlignment.LEFT : textAlignment.getValue(); } /** * Specifies the behavior to use if the text of the {@code Labeled} * exceeds the available space for rendering the text. + * @return the overrun behavior if the text exceeds the available space */ public final ObjectProperty<OverrunStyle> textOverrunProperty() { if (textOverrun == null) { textOverrun = new StyleableObjectProperty<OverrunStyle>(OverrunStyle.ELLIPSIS) {
*** 238,257 **** public final OverrunStyle getTextOverrun() { return textOverrun == null ? OverrunStyle.ELLIPSIS : textOverrun.getValue(); } /** * Specifies the string to display for the ellipsis when text is truncated. * ! * <table border="0" cellpadding="0" cellspacing="0"><tr><th>Examples</th></tr> * <tr class="altColor"><td align="right">"..."</td> <td>- Default value for most locales</td> * <tr class="rowColor"><td align="right">" . . . "</td> <td></td> * <tr class="altColor"><td align="right">" [...] "</td> <td></td> * <tr class="rowColor"><td align="right">"\u2026"</td> <td>- The Unicode ellipsis character '&hellip;'</td> * <tr class="altColor"><td align="right">""</td> <td>- No ellipsis, just display the truncated string</td> * </table> * * <p>Note that not all fonts support all Unicode characters. * * @see <a href="http://en.wikipedia.org/wiki/Ellipsis#Computer_representations">Wikipedia:ellipsis</a> * @since JavaFX 2.2 */ public final StringProperty ellipsisStringProperty() { if (ellipsisString == null) { --- 242,263 ---- public final OverrunStyle getTextOverrun() { return textOverrun == null ? OverrunStyle.ELLIPSIS : textOverrun.getValue(); } /** * Specifies the string to display for the ellipsis when text is truncated. * ! * <table summary="" border="0" cellpadding="0" cellspacing="0"><tr><th>Examples</th></tr> * <tr class="altColor"><td align="right">"..."</td> <td>- Default value for most locales</td> * <tr class="rowColor"><td align="right">" . . . "</td> <td></td> * <tr class="altColor"><td align="right">" [...] "</td> <td></td> * <tr class="rowColor"><td align="right">"\u2026"</td> <td>- The Unicode ellipsis character '&hellip;'</td> * <tr class="altColor"><td align="right">""</td> <td>- No ellipsis, just display the truncated string</td> * </table> * * <p>Note that not all fonts support all Unicode characters. * + * @return the ellipsis property on the string to display for the ellipsis + * when text is truncated * @see <a href="http://en.wikipedia.org/wiki/Ellipsis#Computer_representations">Wikipedia:ellipsis</a> * @since JavaFX 2.2 */ public final StringProperty ellipsisStringProperty() { if (ellipsisString == null) {
*** 277,286 **** --- 283,293 ---- /** * If a run of text exceeds the width of the Labeled, then this variable * indicates whether the text should wrap onto another line. + * @return the wrap property if a run of text exceeds the width of the Labeled */ public final BooleanProperty wrapTextProperty() { if (wrapText == null) { wrapText = new StyleableBooleanProperty() {
*** 317,326 **** --- 324,334 ---- /** * The default font to use for text in the Labeled. If the Label's text is * rich text then this font may or may not be used depending on the font * information embedded in the rich text, but in any case where a default * font is required, this font will be used. + * @return the default font to use for text in this labeled */ public final ObjectProperty<Font> fontProperty() { if (font == null) { font = new StyleableObjectProperty<Font>(Font.getDefault()) {
*** 392,401 **** --- 400,410 ---- * An optional icon for the Labeled. This can be positioned relative to the * text by using {@link #setContentDisplay}. The node specified for this * variable cannot appear elsewhere in the scene graph, otherwise * the {@code IllegalArgumentException} is thrown. See the class * description of {@link javafx.scene.Node Node} for more detail. + * @return the optional icon for this labeled */ public final ObjectProperty<Node> graphicProperty() { if (graphic == null) { graphic = new StyleableObjectProperty<Node>() {
*** 549,558 **** --- 558,568 ---- return imageUrl; } /** * Whether all text should be underlined. + * @return the underline property of all text in this labeled */ public final BooleanProperty underlineProperty() { if (underline == null) { underline = new StyleableBooleanProperty(false) {
*** 578,587 **** --- 588,598 ---- public final void setUnderline(boolean value) { underlineProperty().setValue(value); } public final boolean isUnderline() { return underline == null ? false : underline.getValue(); } /** * Specifies the space in pixel between lines. + * @return the line spacing property between lines in this labeled * @since JavaFX 8.0 */ public final DoubleProperty lineSpacingProperty() { if (lineSpacing == null) { lineSpacing = new StyleableDoubleProperty(0) {
*** 608,617 **** --- 619,629 ---- public final void setLineSpacing(double value) { lineSpacingProperty().setValue(value); } public final double getLineSpacing() { return lineSpacing == null ? 0 : lineSpacing.getValue(); } /** * Specifies the positioning of the graphic relative to the text. + * @return content display property of this labeled */ public final ObjectProperty<ContentDisplay> contentDisplayProperty() { if (contentDisplay == null) { contentDisplay = new StyleableObjectProperty<ContentDisplay>(ContentDisplay.LEFT) {
*** 641,650 **** --- 653,663 ---- * The padding around the Labeled's text and graphic content. * By default labelPadding is Insets.EMPTY and cannot be set to null. * Subclasses may add nodes outside this padding and inside the Labeled's padding. * * This property can only be set from CSS. + * @return the label padding property of this labeled */ public final ReadOnlyObjectProperty<Insets> labelPaddingProperty() { return labelPaddingPropertyImpl(); } private ObjectProperty<Insets> labelPaddingPropertyImpl() {
*** 685,694 **** --- 698,708 ---- private void setLabelPadding(Insets value) { labelPaddingPropertyImpl().set(value); } public final Insets getLabelPadding() { return labelPadding == null ? Insets.EMPTY : labelPadding.get(); } /** * The amount of space between the graphic and text + * @return the graphics text gap property of this labeled */ public final DoubleProperty graphicTextGapProperty() { if (graphicTextGap == null) { graphicTextGap = new StyleableDoubleProperty(4) {
*** 806,815 **** --- 820,830 ---- /** * Returns the initial alignment state of this control, for use * by the JavaFX CSS engine to correctly set its initial value. This method * is overridden to use Pos.CENTER_LEFT initially. * + * @return the initial alignment state of this control * @since 9 */ protected Pos getInitialAlignment() { return Pos.CENTER_LEFT; }
< prev index next >