public class Label extends OutlinePane
Pane.PriorityOrientable.Orientation| Constructor and Description |
|---|
Label(int length,
int height,
Font font)
Creates a new label
|
Label(int x,
int y,
int length,
int height,
Font font)
Creates a new label
|
Label(int x,
int y,
int length,
int height,
Pane.Priority priority,
Font font)
Creates a new label
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
click(Gui gui,
org.bukkit.event.inventory.InventoryClickEvent event,
int paneOffsetX,
int paneOffsetY,
int maxLength,
int maxHeight)
Called whenever there is being clicked on this pane
|
Font |
getFont()
Gets the character set currently used for the text in this label
|
String |
getText()
Gets the text currently displayed in this label
|
static Label |
load(Object instance,
Element element)
Loads a label from a given element
|
void |
setText(String text)
Sets the text to be displayed in this label
|
addItem, clear, display, doesRepeat, flipHorizontally, flipVertically, getGap, getItems, getOrientation, getPanes, getRotation, insertItem, isFlippedHorizontally, isFlippedVertically, removeItem, setGap, setOrientation, setRepeat, setRotationgetHeight, getLength, getPriority, getPropertyMappings, getX, getY, isVisible, load, loadItem, setHeight, setLength, setOnClick, setOnLocalClick, setPriority, setVisible, setX, setYclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadpublic Label(int x,
int y,
int length,
int height,
@NotNull
Pane.Priority priority,
@NotNull
Font font)
x - the x coordinatey - the y coordinatelength - the lengthheight - the widthpriority - the priorityfont - the character setpublic Label(int x,
int y,
int length,
int height,
@NotNull
Font font)
x - the x coordinatey - the y coordinatelength - the lengthheight - the widthfont - the character setpublic Label(int length,
int height,
@NotNull
Font font)
length - the lengthheight - the widthfont - the character setpublic void setText(@NotNull
String text)
text - the new textpublic boolean click(@NotNull
Gui gui,
@NotNull
org.bukkit.event.inventory.InventoryClickEvent event,
int paneOffsetX,
int paneOffsetY,
int maxLength,
int maxHeight)
click in class OutlinePanegui - the gui this event stems fromevent - the event that occurred while clicking on this itempaneOffsetX - the pane's offset on the x axispaneOffsetY - the pane's offset on the y axismaxLength - the maximum length of the panemaxHeight - the maximum height of the pane@Contract(pure=true) @NotNull public String getText()
@Contract(pure=true) @NotNull public Font getFont()
Copyright © 2019. All rights reserved.