com.mythicscape.batclient.interfaces
Interface ClientGUI


public interface ClientGUI

Interface to the client GUI.

Author:
Emil

Method Summary
 BatButton createBatButton(java.lang.String title, java.awt.event.ActionListener listener)
          Create a BatButton with an ActionListener that should be called when the button is pressed.
 javax.swing.JTextPane createBatTextArea()
           
 BatWindow createBatWindow(java.lang.String name, int x, int y, int width, int height)
          Creates a new BatWindow.
 BatScrollPane createScrollPane(java.awt.Component view)
          Create a default scrollpane with vertical and horizontal scrollbars AS NEEDED.
 BatScrollPane createScrollPane(java.awt.Component view, int verticalPolicy, int horizontalPolicy)
          Create a scrollpane with policies.
 void doCommand(java.lang.String cmd)
          Sends the command string to the command parser.
 void doCommand(java.lang.String cmd, java.util.ArrayList<java.lang.String> vars)
          Sends the command string to the command parser with an ArrayList of local variables.
 java.lang.String getBaseDirectory()
           
 BatTooltipManager getBatTooltipManager()
           
 SoundPlayer getSoundPlayer()
           
 void printAttributedString(java.lang.String channel, ParsedResult msg)
          Same as calling printAttributedString(channel, msg, true);
 void printAttributedString(java.lang.String channel, ParsedResult msg, boolean useTriggers)
           
 void printAttributedString(java.lang.String channel, ParsedResult msg, boolean useTriggers, boolean catchAll)
           
 void printAttributedStringToWindow(java.lang.String windowname, ParsedResult msg)
           
 void printAttributedStringToWindow(java.lang.String windowname, ParsedResult msg, boolean useTriggers)
           
 void printText(java.lang.String channel, java.lang.String msg)
          Prints a text message into at "channel" in the client.
 void printText(java.lang.String channel, java.lang.String msg, boolean useTriggers)
           
 void printText(java.lang.String channel, java.lang.String msg, boolean useTriggers, boolean catchAll)
           
 void printText(java.lang.String channel, java.lang.String msg, java.lang.String htmlColorCode)
          Prints a text message into a channel in the client and wraps the text in a particular color defined by a html color code.
 void printTextToWindow(java.lang.String windowname, java.lang.String msg)
          Prints text into a particular window (tab) name in the client.
 void printTextToWindow(java.lang.String windowname, java.lang.String msg, boolean useTriggers)
           
 void setActionButton(int type, int button, java.lang.String title, java.lang.String action, java.lang.String customImageURL)
           
 void setWallpaper(java.lang.String imagePath)
          Sets the wallpaper of the client.
 void setWallpaper(java.lang.String imagePath, float brightness)
          Sets the wallpaper of the client.
 

Method Detail

createBatTextArea

javax.swing.JTextPane createBatTextArea()

getBaseDirectory

java.lang.String getBaseDirectory()

createBatWindow

BatWindow createBatWindow(java.lang.String name,
                          int x,
                          int y,
                          int width,
                          int height)
Creates a new BatWindow. Notice that the window is not set to being visible by default. That has to be set on the window for it to be visible.

Returns:

getSoundPlayer

SoundPlayer getSoundPlayer()

getBatTooltipManager

BatTooltipManager getBatTooltipManager()

createBatButton

BatButton createBatButton(java.lang.String title,
                          java.awt.event.ActionListener listener)
Create a BatButton with an ActionListener that should be called when the button is pressed.

Parameters:
title -
listener -
Returns:

createScrollPane

BatScrollPane createScrollPane(java.awt.Component view)
Create a default scrollpane with vertical and horizontal scrollbars AS NEEDED.

Parameters:
view -
Returns:

createScrollPane

BatScrollPane createScrollPane(java.awt.Component view,
                               int verticalPolicy,
                               int horizontalPolicy)
Create a scrollpane with policies. Ex. JScrollPane.VERTICAL_SCROLLBAR_ALWAYS

Parameters:
view -
verticalPolicy -
horizontalPolicy -
Returns:

doCommand

void doCommand(java.lang.String cmd)
Sends the command string to the command parser.

Parameters:
cmd -

doCommand

void doCommand(java.lang.String cmd,
               java.util.ArrayList<java.lang.String> vars)
Sends the command string to the command parser with an ArrayList of local variables. String at index 0 in the list is the variable corresponding to "%1" from a regexp match.

Parameters:
cmd -
vars -

printText

void printText(java.lang.String channel,
               java.lang.String msg)
Prints a text message into at "channel" in the client.

Parameters:
channel -
msg -

printText

void printText(java.lang.String channel,
               java.lang.String msg,
               java.lang.String htmlColorCode)
Prints a text message into a channel in the client and wraps the text in a particular color defined by a html color code. Example FFFFFF for white. (Do not include the html # character).

Parameters:
channel -
msg -
htmlColorCode -

printText

void printText(java.lang.String channel,
               java.lang.String msg,
               boolean useTriggers)

printText

void printText(java.lang.String channel,
               java.lang.String msg,
               boolean useTriggers,
               boolean catchAll)

printAttributedString

void printAttributedString(java.lang.String channel,
                           ParsedResult msg)
Same as calling printAttributedString(channel, msg, true);

Parameters:
channel -
msg -

printAttributedString

void printAttributedString(java.lang.String channel,
                           ParsedResult msg,
                           boolean useTriggers)

printAttributedString

void printAttributedString(java.lang.String channel,
                           ParsedResult msg,
                           boolean useTriggers,
                           boolean catchAll)

printTextToWindow

void printTextToWindow(java.lang.String windowname,
                       java.lang.String msg)
Prints text into a particular window (tab) name in the client.

Parameters:
windowname -
msg -

printTextToWindow

void printTextToWindow(java.lang.String windowname,
                       java.lang.String msg,
                       boolean useTriggers)

printAttributedStringToWindow

void printAttributedStringToWindow(java.lang.String windowname,
                                   ParsedResult msg)

printAttributedStringToWindow

void printAttributedStringToWindow(java.lang.String windowname,
                                   ParsedResult msg,
                                   boolean useTriggers)

setWallpaper

void setWallpaper(java.lang.String imagePath)
Sets the wallpaper of the client. This will first look for the imagePath on the local filesystem. If not found it will look in the /wallapapers/ dir in the client resource bundle. If not found it will look for the wallpaper as an URL (from a webpage for example). When the wallpaper is set it will also save the path in the client settings.

Parameters:
imagePath -

setWallpaper

void setWallpaper(java.lang.String imagePath,
                  float brightness)
Sets the wallpaper of the client. This will first look for the imagePath on the local filesystem. If not found it will look in the /wallapapers/ dir in the client resource bundle. If not found it will look for the wallpaper as an URL (from a webpage for example). When the wallpaper is set it will also save the path in the client settings.

Parameters:
imagePath -
brightness - A value for brightness. 0.9 = 10% darker. 1.3 = 30 % brighter.

setActionButton

void setActionButton(int type,
                     int button,
                     java.lang.String title,
                     java.lang.String action,
                     java.lang.String customImageURL)
Parameters:
type - Either 1 for ActionButton1 frame, or 2 for ActionButton2 frame.
button - An integer between 0-23 representing the button index.
title -
action -
customImageURL - Either a local file path, or an URL to a website image.