Class Labeled

java.lang.Object
All Implemented Interfaces:
Styleable, EventTarget, Skinnable
Direct Known Subclasses:
ButtonBase, Cell, Label, TitledPane

@DefaultProperty("text") public abstract class Labeled extends Control
A Labeled Control is one which has as part of its user interface a textual content associated with it. For example, a Button displays text, as does a Label, a Tooltip, and many other controls.

Labeled is also a convenient base class from which to extend when building new Controls which, as part of their UI, display read-only textual content.

Example of how to place a graphic above the text:


  Image image = new Image(getClass().getResourceAsStream("image.png"));
  ImageView imageView = new ImageView();
  imageView.setImage(image);
  Label label = new Label("text", imageView);
  label.setContentDisplay(ContentDisplay.TOP);
 
Since:
JavaFX 2.0
See Also: