|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbelka.BelkaManager
public class BelkaManager
The object of this class manages the life of Belka as a program or applet. It performes two main functions:
Constructor Summary | |
---|---|
BelkaManager(Container drawContentPane,
String[] args)
Object constructor. |
|
BelkaManager(Container drawContentPane,
String[] args,
URL codeBase)
Object constructor meant to create object when Belka is used as an applet. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent evt)
|
boolean |
addMolecule(Molecule molecule)
|
int |
countMolecules()
|
void |
destroy()
The method nulls internal pointers and disassembles molecules to help garbage collector to clear memory. |
int |
getLargestGroup()
The function returns the largest group id assigned to any assembly. |
Component |
getMainComponent()
Returns the main component to draw on |
Molecule |
moleculeList()
|
boolean |
removeMolecule(Molecule molecule)
|
void |
run()
The function waits for user input and processes command. |
String |
runCommand(String command)
Runs the given command and updates screen view if necesary. |
String |
runCommand(String command,
boolean update)
Runs the given command and updates screen view depending on value of update. |
String |
runScript(String script)
Runs the script of command and updates screen view if necesary. |
void |
setUserInput(String input)
To set user input to the manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BelkaManager(Container drawContentPane, String[] args, URL codeBase)
drawContentPane
- main content pane for drawing. If it's null,
no graphical display is created.args
- input files to load upon start up.codeBase
- url where the input files are located. If null,
files are searched in current directory.public BelkaManager(Container drawContentPane, String[] args)
drawContentPane
- main content pane for drawing. If it's null,
no graphical display is created. This allows to use Belka in batch
mode.args
- input files to load upon start up. Files are searched in
current directory.Method Detail |
---|
public void destroy()
public void setUserInput(String input)
input
- user input.public Molecule moleculeList()
public boolean addMolecule(Molecule molecule)
public boolean removeMolecule(Molecule molecule)
public int countMolecules()
public Component getMainComponent()
public void run()
public String runScript(String script)
script
- string with script.public String runCommand(String command) throws Exception
command
- command to execute.
Exception
public String runCommand(String command, boolean update) throws Exception
command
- command to execute.update
- flag specifying whether screen must be updated.
Exception
public int getLargestGroup()
public void actionPerformed(ActionEvent evt)
actionPerformed
in interface ActionListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |