public abstract class VariableBar extends Pane implements Orientable, Flippable
Pane.PriorityOrientable.Orientation| Modifier and Type | Field and Description |
|---|---|
protected OutlinePane |
backgroundPane
The green and the red parts of the slider
|
protected OutlinePane |
fillPane
The green and the red parts of the slider
|
protected boolean |
flipHorizontally
Whether the pane is flipped horizontally or vertically
|
protected boolean |
flipVertically
Whether the pane is flipped horizontally or vertically
|
protected Orientable.Orientation |
orientation
The orientation of the slider
|
protected float |
value
The value this slider is at.
|
| Modifier | Constructor and Description |
|---|---|
protected |
VariableBar(int length,
int height) |
protected |
VariableBar(int x,
int y,
int length,
int height) |
protected |
VariableBar(int x,
int y,
int length,
int height,
Pane.Priority priority) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the entire pane of any items/panes.
|
void |
display(Gui gui,
org.bukkit.inventory.Inventory inventory,
org.bukkit.inventory.PlayerInventory playerInventory,
int paneOffsetX,
int paneOffsetY,
int maxLength,
int maxHeight)
Has to set all the items in the right spot inside the inventory
|
void |
flipHorizontally(boolean flipHorizontally)
Sets whether this pane should flip its items horizontally
|
void |
flipVertically(boolean flipVertically)
Sets whether this pane should flip its items vertically
|
Collection<GuiItem> |
getItems()
Gets all the items in this pane and all underlying panes
|
Orientable.Orientation |
getOrientation()
Gets the orientation of this outline pane
|
Collection<Pane> |
getPanes()
Gets all the panes in this panes, including any child panes from other panes
|
boolean |
isFlippedHorizontally()
Gets whether this pane's items are flipped horizontally
|
boolean |
isFlippedVertically()
Gets whether this pane's items are flipped vertically
|
void |
setBackgroundItem(GuiItem item)
Sets the background item
|
void |
setFillItem(GuiItem item)
Sets the fill item (foreground)
|
void |
setHeight(int height)
Set the height of this pane
|
void |
setLength(int length)
Set the length of this pane
|
void |
setOrientation(Orientable.Orientation orientation)
Sets the orientation of this outline pane
|
void |
setX(int x)
Set the x coordinate of this pane
|
void |
setY(int y)
Set the y coordinate of this pane
|
click, getHeight, getLength, getPriority, getPropertyMappings, getX, getY, isVisible, load, loadItem, setOnClick, setOnLocalClick, setPriority, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitload@NotNull protected final OutlinePane fillPane
@NotNull protected final OutlinePane backgroundPane
protected float value
@NotNull protected Orientable.Orientation orientation
protected boolean flipHorizontally
protected boolean flipVertically
protected VariableBar(int length,
int height)
protected VariableBar(int x,
int y,
int length,
int height,
@NotNull
Pane.Priority priority)
protected VariableBar(int x,
int y,
int length,
int height)
public void setLength(int length)
public void setHeight(int height)
public void setOrientation(@NotNull
Orientable.Orientation orientation)
setOrientation in interface Orientableorientation - the new orientationpublic void display(@NotNull
Gui gui,
@NotNull
org.bukkit.inventory.Inventory inventory,
@NotNull
org.bukkit.inventory.PlayerInventory playerInventory,
int paneOffsetX,
int paneOffsetY,
int maxLength,
int maxHeight)
display in class Panegui - the gui for which we're renderinginventory - the inventory that the items should be displayed inplayerInventory - the player's inventorypaneOffsetX - 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 panepublic void setX(int x)
public void setY(int y)
public void setFillItem(@NotNull
GuiItem item)
item - the new itempublic void setBackgroundItem(@NotNull
GuiItem item)
item - the new item@NotNull public Collection<GuiItem> getItems()
@NotNull public Collection<Pane> getPanes()
public void flipHorizontally(boolean flipHorizontally)
flipHorizontally in interface FlippableflipHorizontally - whether the pane should flip items horizontallypublic void flipVertically(boolean flipVertically)
flipVertically in interface FlippableflipVertically - whether the pane should flip items vertically@NotNull public Orientable.Orientation getOrientation()
getOrientation in interface Orientablepublic boolean isFlippedHorizontally()
isFlippedHorizontally in interface Flippablepublic boolean isFlippedVertically()
isFlippedVertically in interface FlippableCopyright © 2019. All rights reserved.