java.lang.Objectorg.nlogo.api.Logger
public class Logger
Field Summary | |
---|---|
static org.apache.log4j.Logger |
BUTTONS
|
static org.apache.log4j.Logger |
CODE
|
static org.apache.log4j.Logger |
GLOBALS
|
static org.apache.log4j.Logger |
GREENS
|
static org.apache.log4j.Logger |
LINKS
|
static org.apache.log4j.Logger |
SPEED
|
static org.apache.log4j.Logger |
TURTLES
|
static org.apache.log4j.Logger |
WIDGETS
|
Constructor Summary | |
---|---|
Logger(String name)
|
Method Summary | |
---|---|
void |
buttonPressed(String buttonName)
Called when the user presses a button in the NetLogo model. |
void |
buttonStopped(String buttonName)
Called when a button in the NetLogo model has finished running and pops back up. |
void |
changeLogDirectory(String path)
|
void |
chooserChanged(String name,
Object value,
boolean valueChanged)
Called when the value of a chooser changes. |
void |
close()
|
void |
commandEntered(String owner,
String text,
char agentType,
CompilerException error)
Called when the user enters text into the command center (and presses return). |
void |
deleteSessionFiles()
|
static void |
deleteSessionFiles(String path)
|
String |
getIPAddress()
|
void |
inputBoxChanged(String name,
Object value,
boolean valueChanged)
Called when the value of an input box changes. |
static void |
logAddWidget(String type,
String name)
|
static void |
logButtonPressed(String name)
|
static void |
logButtonStopped(String name,
boolean onceButton,
boolean stopping)
|
static void |
logGlobal(String name,
Object value,
boolean changed)
|
static void |
logLinkBirth(String name,
String breed)
|
static void |
logLinkDeath(String name,
String breed)
|
static void |
logSpeedSlider(double value)
|
static void |
logTurtleBirth(String name,
String breed)
|
static void |
logTurtleDeath(String name,
String breed)
|
static void |
logWidgetRemoved(String type,
String name)
|
void |
newFiles(Enumeration e,
String name)
|
void |
openModel(String name)
|
void |
sliderChanged(String name,
double value,
double min,
double increment,
double max,
boolean valueChanged,
boolean buttonReleased)
Called when the value of a slider changes. |
void |
switchChanged(String name,
boolean value,
boolean valueChanged)
Called when the value of a switch changes. |
void |
zipSessionFiles(String filename)
|
static void |
zipSessionFiles(String path,
String filename)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger BUTTONS
public static final org.apache.log4j.Logger GREENS
public static final org.apache.log4j.Logger CODE
public static final org.apache.log4j.Logger WIDGETS
public static final org.apache.log4j.Logger GLOBALS
public static final org.apache.log4j.Logger SPEED
public static final org.apache.log4j.Logger TURTLES
public static final org.apache.log4j.Logger LINKS
Constructor Detail |
---|
public Logger(String name)
Method Detail |
---|
public void changeLogDirectory(String path)
public void openModel(String name)
openModel
in interface NetLogoListener
public void newFiles(Enumeration e, String name)
public void close()
public static void logAddWidget(String type, String name)
public static void logWidgetRemoved(String type, String name)
public static void logSpeedSlider(double value)
public static void logTurtleBirth(String name, String breed)
public static void logTurtleDeath(String name, String breed)
public static void logLinkBirth(String name, String breed)
public static void logLinkDeath(String name, String breed)
public static void logButtonStopped(String name, boolean onceButton, boolean stopping)
public static void logButtonPressed(String name)
public void buttonPressed(String buttonName)
NetLogoListener
Note that the button may take some time to run and therefore
may not pop back up until some later. Use buttonStopped()
if you need to know when the button's action has completed.
buttonPressed
in interface NetLogoListener
public void buttonStopped(String buttonName)
NetLogoListener
The button may be a "once" button or a "forever" button. If it is a "once" button, it pops back up automatically when its action is completed. If it is a "forever" button, it will pop back up when clicked for a second time by the user. (Some forever buttons may also pop back up automatically, if the model is written that way.)
buttonStopped
in interface NetLogoListener
public void sliderChanged(String name, double value, double min, double increment, double max, boolean valueChanged, boolean buttonReleased)
NetLogoListener
sliderChanged
in interface NetLogoListener
public void switchChanged(String name, boolean value, boolean valueChanged)
NetLogoListener
switchChanged
in interface NetLogoListener
public void chooserChanged(String name, Object value, boolean valueChanged)
NetLogoListener
chooserChanged
in interface NetLogoListener
public void inputBoxChanged(String name, Object value, boolean valueChanged)
NetLogoListener
inputBoxChanged
in interface NetLogoListener
public void commandEntered(String owner, String text, char agentType, CompilerException error)
NetLogoListener
commandEntered
in interface NetLogoListener
owner
- name of the widget that owns the codetext
- the text the user enteredagentType
- O, T, or P depending whether the user was
addressing the observer, turtles, or patcheserror
- message the user receives if there is a compiler errorpublic static void logGlobal(String name, Object value, boolean changed)
public String getIPAddress()
public void deleteSessionFiles()
public static void deleteSessionFiles(String path)
public void zipSessionFiles(String filename)
public static void zipSessionFiles(String path, String filename)