Public API
About: Pail API
This page is outdated!... most info will probably still work though...
Methods for manipulating tabs
Loading tabs:
/** * Loads the provided JPanel into the user interface under the given title. * If the title is null, it will be converted to the empty String. * @param panel The JPanel to load. * @param title The title of this panel. * @throws NullPointerException if the specified JPanel is null. * @throws IllegalArgumentException if the title is already taken. */ public void loadInterfaceComponent(String title, JPanel panel)
Getting panels by title
/** * Gets the interface component by the specified title, or null if it isn't loaded. * @param title The title of the component. * @return The component loaded with the specified title, or null if it doesn't exist. */ public JPanel getInterfaceComponent(String title)
Showing/hiding tabs
/** * Sets the activated (visible) status of the specified tab. Note: this will * refresh the tab layout to reflect changes immediately. * @param title The title of the panel. * @param activated True if the tab will be visible. */ public void setActivated(String title, boolean activated)
Working with waypoints
Getting a Waypoint
/** * Gets the waypoint with the specified name, or null if it doesn't exist. * @param name The name of the waypoint. * @return */ public Waypoint getWaypoint(String name)
Adding a waypoint
/** * Add the provided Waypoint to the list. * @param waypoint The Waypoint to add. */ public void addWaypoint(Waypoint waypoint)
Removing a waypoint
/** * Removes the waypoint with the given name from the list. * @param name The name of the Waypoint to remove. * @return True if a waypoint was indeed removed. */ public boolean removeWaypoint(String name)
Language & Translation
Getting the currently selected language
/** * Gets the currently selected language. * @return THe Language selected. */ public Language getLanguage()
Translating text
/** * Translates the given text to the currently selected language. * @param text The text to translate. * @return the translated text, or the original text if English is the * currently selected language. */ public String translate(String text)
Convenience methods
Getting the icon for a Material
/** * Gets the 25x25 pixel image icon for the provided Material. * @param material The material to get the icon for. * @return The 25x25px ImageIcon of the provided material. * @throws IllegalArgumentException if the Material is AIR. */ public ImageIcon getIcon(Material material)