input
stringlengths
10
828
output
stringlengths
5
107
public boolean get upload to imageshack return upload to imageshack
method to retrieve the flag indicating whether or not screen captures
private void trim text int length doc get length if length max text size int cut index length 2 try cut index doc get text 0 length index of n cut index if cut index 1 doc remove 0 cut index catch bad location exception ex log error failed to trim the irc text ex output area set caret position doc get length
helper method used to trim the code jtext area code if required
public void set current level short level current level level
method used to set the current level of the player
public void set target level short level target level level
method used to set the target level for the player
private void enable mail components boolean flag smtp server field set enabled flag smtp port field set enabled flag email address field set enabled flag reply to address field set enabled flag smtp use auth set enabled flag smtp sslconnection set enabled flag
helper method to enable disable the various email based settings
public boolean get upload to photobucket return upload to photobucket
method to retrieve the flag indicating whether or not screen captures
private jtext pane get topic value ircchannel model channel jtext pane text pane new jtext pane default styled document doc new default styled document text pane set focusable false text pane set editable false text pane set document doc irccolour util add coloured message doc channel get topic false return text pane
helper method used to retrieve a code jtext pane code containing the
public boolean get use best free world return use best free world
method used to retrieve the flag indicating if the best free world should
public boolean get use best members world return use best members world
method used to retrieve the flag indicating if the best members world
public boolean get use default timer sound return use default timer sound
method used to retrieve the flag indicating if the default sound should
private void init listeners submit button add action listener this first player name field get editor get editor component add key listener new key adapter public void key pressed key event e if e get key code key event vk enter action performed null second player name field get editor get editor component add key listener new key adapter public void key pressed key event e if e get key code key event vk enter action performed null
method to initialize the various component listeners
public boolean get use high detail return use high detail
method to retrieve the flag indicating if runescape worlds should be
public boolean get use mozilla return use mozilla
method to retrieve the flag indicating if metis should use the mozilla
private string get numeric string string str string builder sb new string builder char arr str to char array for char ch arr if character is digit ch sb append ch if sb length 0 sb append 0 return sb to string
helper method used to convert arbitrary strings to valid numeric values
private string format number long num number format formatter number format get instance return formatter format num
helper method use to format a long value to a string
private short get level long xp short last lvl short 1 for short i 0 i constants instance skill xp length i if xp constants instance skill xp i last lvl short i 1 else break return last lvl
helper method used to determine the level for a given set of xp
public boolean get use static worlds return use static worlds
method used to retrieve the flag indicating whether or not the static
private void init listeners back button add action listener new action listener public void action performed action event e web browser back forward button add action listener new action listener public void action performed action event e web browser forward reload button add action listener new action listener public void action performed action event e web browser refresh stop button add action listener new action listener public void action performed action event e web browser stop home button add action listener new action listener public void action performed action event e home
method used to initialize the listeners
private void refresh table worlds update thread thread new worlds update thread this thread start
helper method used to refresh the table
public void set bottom divider position int pos bottom divider position pos
method to set the bottom splitter position for the
private void init listeners submit button add action listener this user name field get editor get editor component add key listener new key adapter public void key pressed key event e if e get key code key event vk enter action performed null
method to initialize the various component listeners
public void set custom links list custom link model links custom links links
method used to retrieve the custom links available to browse to
private void init listeners
method to initialize the various component listeners
private void init listeners custom links table add mouse listener new mouse adapter public void mouse pressed mouse event e if e get click count 2 try to get the custom link int row custom links table get selected row if row 1 custom link model link custom link model custom links table get value at row 0 metis main frame get instance open link link true true
helper method used to initialize the various listeners for the
public void add string user if user null return ircuser name irc user new ircuser name user if user set add irc user determine the index of the new item and fire off the events accordingly int idx 0 for ircuser name usr user set if usr equals irc user fire off the related events fire contents changed this idx idx fire interval added this idx idx return idx
method to add a new user to the model
public void remove string user if user null return ircuser name irc user new ircuser name user if user set contains irc user determine the index of the item and fire off the events accordingly int idx 0 for ircuser name usr user set if usr equals irc user remove the user and fire off the related events user set remove irc user fire contents changed this idx idx fire interval removed this idx idx return idx
method to remove a user from the model
protected void init listeners connect button add action listener this port field add action listener this nick field add action listener this channel field add action listener this clear button add action listener new action listener public void action performed action event e configuration model config configuration util get configuration server field set selected index 0 port field set text 6667 nick field set text config get default player name channel field set text null
helper method used to initialize the listeners for the components
public void set best free world world button button best free world button button
method to set the best free world button for refresh
public void set best members world world button button best members world button button
method to set the best members only world button for refresh
public void set best free world world menu item menu item best free world menu item menu item
method to set the best free world menu item for refresh
public void set best members world world menu item menu item best members world menu item menu item
method to set the best members only world menu item for refresh
public void set least full free world world button button least full free world button button
method to set the most full free world button for refresh
public void set least full members world world button button least full members world button button
method to set the most full members only world button for refresh
public void set default player name string default player this default player default player
method to set the runescape player name used in the player comparisons
public void set most full free world world button button most full free world button button
method to set the most full free world button for refresh
public void set most full members world world button button most full members world button button
method to set the most full members only world button for refresh
public void set most full free world world menu item menu most full free world menu item menu
method to set the most full free world for refresh
public void set most full members world world menu item menu most full members world menu item menu
method to set the most full members only world for refresh
public void set least full free world world menu item menu item least full free world menu item menu item
method to set the least full free world menu item for refresh
public void set least full members world world menu item menu item least full members world menu item menu item
method to set the least full members only world menu item for refresh
public void stop thread this stop true interrupt
method used to stop the thread
public void reset thread synchronized lock lock notify
method to force a restart of the thread
public void set default skill guide filter filter model filter model default skill guide filter filter model set the corresponding system propery for this class system set property skill guide filter factory skill guide filter class default skill guide filter get class name
method to set the default code filter model code to use for skill
public void set default skin skin model skin model default skin skin model
method to set the default skin used by metis
protected void init components super init components
helper method used to initialize the swing gui components
protected void init listeners super init listeners
helper method used to initialize the listeners for the components
protected resource bundle get resource bundle return resource bundle get bundle timer panel class get name
method used to retrieve the code resource bundle code for this class
protected void init listeners start timer button add action listener this timer field add action listener this reset timer button add action listener new action listener public void action performed action event e if countdown timer null countdown timer cancel timer field set text get initial time start timer button set text get resource bundle get string start lbl
method to initialize the various component listeners
public void set email model email model model email model model
method to set the code email model code used for emailing image
protected metis timer get timer task return new metis timer timer field
helper method to retrieve the corresponding timer for this class
protected string get initial time return initial time null initial time get resource bundle get string initial timer
method used to return the initial time string used when resetting a
private void init labels skill labels new hash map string jlabel for string skill name constants instance skills jlabel label new jlabel skill name images get skill name jlabel trailing label set tool tip text skill name skill labels put skill name label
method used to create and initialize the skill labels
public void set frame maximized boolean flag frame maximized flag
method used to set a flag indicating if the metis main window is
public void set frame size dimension size frame size size
method used to set the size of the main metis window
private void print channel message final string channel final string msg launch the actual ui swing utilities invoke later new runnable public void run irc panel print channel message channel msg
method used to print a message to the channel
public void set imageshack pin string pin imageshack pin pin
method used to set the pin for a
private void print server message final string msg print server message msg new color 148 0 211 purple
helper method used to print a server message
private void print server message final string msg final color colour launch the actual ui swing utilities invoke later new runnable public void run irc panel print server message msg colour
helper method used to print a server message
protected void init components super init components members list new jlist new ircuser list model jscroll pane scroll pane new jscroll pane members list jscroll pane vertical scrollbar always jscroll pane horizontal scrollbar never members list set focusable false add scroll pane border layout east
helper method used to initialize the swing gui components
protected void init listeners super init listeners members list add mouse listener new mouse adapter public void mouse clicked mouse event e if e get click count 2 string nick string members list get selected value if nick null strip off any non valid characters for a nickname if nick char at 0 nick char at 0 nick nick substring 1 irc panel open private message panel nick
helper method used to initialize the listeners for the components
public void set mute loading music boolean flag mute loading music flag
method to set the flag indicating whether or not the loading music for
public void add member string name ircuser list model model ircuser list model members list get model model add name
method used to add a new member to the irc channel user list
public void remove member string name ircuser list model model ircuser list model members list get model model remove name
method used to remove a member from the irc channel user list
private void add world buttons if worlds null map short world model worlds map is members worlds get member worlds worlds get free worlds for map entry short world model entry worlds map entry set world model world model entry get value world button world button new world button world model button panel add world button check worlds thread get instance add world button
method to add all available code world button code s to this panel
private url validate string str try return new url str catch malformed urlexception ex log info failed to validate str log info ex get message return null
helper method used to test the validity of a url
private void init listeners add action listener new action listener public void action performed action event e main frame open link link model true
helper method used to initialize the component listeners
public quests controller get quests controller return quests
method to retrieve an initialized code quests controller code
public skill guides controller get skill guides controller return skills
method to retrieve an initialized code skills guide controller code
public worlds controller get worlds controller return worlds
method to retrieve an initialized code worlds controller code
public void set open links list custom link model links this open links links
method used to set the list of open links
private void update formula short op double value 0 0 string str input field get text if str null str length 0 try value double parse double str catch number format exception ex log debug failed to parse the number ex value 0 0 calc controller set next value value calc controller set operator op if calc model get answer null input field set text format value calc model get answer calc controller set next value calc model get answer reset input true
helper method used to update the formula for the specified operator
private void lookup user string username try high score model scores scores controller get scores username setup the table model skill planner table model table model new skill planner table model scores show members skills is selected table sorter sorter new table sorter table model sorter set column comparator high score model skill class new skill comparator refresh the table model skill table set model sorter sorter set table header skill table get table header skill table repaint catch exception ex log error failed to lookup the player s stats ex
helper method used to lookup a users stats
public void set photobucket pin string pin photobucket pin pin
method to set the pin for a
public configuration model get configuration model return config model
method to retrieve the fully populated code configuration model code
private void clear clear entry calc controller reset
helper method used to clear the input field
private void clear entry input field set text null
helper method used to clear a single entry from the calculation
private void backspace string str input field get text if str length 0 input field set text str substring 0 str length 1
helper method used to delete the last character in the input field
private void calculate string str input field get text double value 0 0 if str null str length 0 try value double parse double str catch number format exception ex log debug failed to parse the number ex value 0 0 else value 0 0 calc controller set next value value if calc model get second operand null return calc controller calculate calc model set operator calculator model no op if calc model get answer null calc controller reset operands input field set text format value calc model get answer reset input true else input field set text null
method used to calculate the final value
private void append char char ch string builder sb new string builder input field get text input field set text sb append ch to string
helper method to append a character to the input field
private string format value double value if value math floor value 0 0 return string value of value return string value of value long value
method used to format a double value for display
public world model get best free world short key best worlds filter get best free world id return world model get free worlds get key
method to retrieve the best free world
public void set quest filters filter model filters if filters null quest filters null else quest filters new filter model filters length system arraycopy filters 0 quest filters 0 filters length
method to set the array of available code quest filter model code s
public world model get best members world short key best worlds filter get best members world id return world model get member worlds get key
method to retrieve the best members only world
public void set operator short op calculate if model get answer null model set first operand null model set second operand null model set operator op
method used to set the operator for the equation
public void calculate double val1 model get first operand double val2 model get second operand short op model get operator if val1 null val2 null op calculator model no op return switch op case calculator model divide model set answer val1 val2 break case calculator model multiply model set answer val1 val2 break case calculator model add model set answer val1 val2 break case calculator model subtract model set answer val1 val2 break default do nothing
method to perform the actual calculation
public void set next value double value if model get first operand null model set first operand value else if model get second operand null model set second operand value
method used to set the next available value
public void refresh try quest filter null initialize catch metis exception ex log error failed to refresh the quests ex
method used to refresh the underlying model and get a new list
public void reset operands model set first operand null model set second operand null
method used to reset the operands for the underlying
public world model get world short id map short world model worlds all worlds filter get free worlds if worlds contains key id return worlds get id else worlds all worlds filter get member worlds if worlds contains key id return worlds get id no world matches so return null return null
method to retrieve a particular world id
public void reset reset operands model set answer null model set operator calculator model no op
method used to reset the underlying code calculator model code
public quest model get quest string name if name null return null list quest model quests quest filter get member quests for quest model quest model quests if name equals quest model get name return quest model quests quest filter get free quests for quest model quest model quests if name equals quest model get name return quest model return null
method used to retrieve a quest by name
public void set show bottom panel boolean flag show bottom panel flag
method to set the flag indicating whether or not to display the bottom
public skill planner model get skill plan string player string skill skill planner model model null map string map string skill planner model players handler get players if players contains key player map string skill planner model skills players get player if skills contains key skill model skills get skill return model
method to retrieve the code skill planner model code object for a
public void set show side panel boolean flag show side panel flag
method to set the flag indicating whether or not to display the side
public void parse input stream stream throws metis exception buff new string builder tasks new linked list skill model task try saxparser parser saxparser factory new instance new saxparser parser parse stream this catch saxexception ex log error ex get message ex throw new metis parse exception ex get message ex catch parser configuration exception ex should never happen log fatal ex get message ex string msg failed to create a saxparser throw new metis exception msg ex catch ioexception ex log error ex get message ex throw new metis parse exception ex get message ex
method used for parsing a particular code input stream code
public skill model get skill model return skill model
method used to retrieve the code skill model code that was created
public high score model get high score model return this model
method to retrieve the skills for the player
public void refresh try skill guide filter null initialize catch metis exception ex log error failed to refresh the quests ex
method used to refresh the underlying model and get a new list
public void set side divider position int pos side divider position pos
method to set the side splitter position for the code jsplit pane code
public skill guide model get skill guide string name if name null return null list skill guide model skills skill guide filter get member skills for skill guide model skill guide model skills if name equals skill guide model get name return skill guide model skills skill guide filter get free skills for skill guide model skill guide model skills if name equals skill guide model get name return skill guide model return null
method used to retrieve a skill guide by name