public class Listener
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
Listener.EmptyStringException
The Class EmptyStringException.
|
Modifier and Type | Field and Description |
---|---|
private OceanInterface |
myOcean
The model interface
|
private OceanGUIInterface |
myOceanGUI
The view interface
|
Constructor and Description |
---|
Listener(OceanInterface model,
OceanGUIInterface view) |
Modifier and Type | Method and Description |
---|---|
protected OceanInterface |
getMyOcean() |
protected OceanGUIInterface |
getMyOceanGUI() |
protected void |
message(java.lang.String errorMsg) |
protected void |
repaintOcean()
Repaints the ocean.
|
protected void |
setMyModel(OceanInterface myOcean)
Sets the myOcean attribute.
|
protected void |
setMyView(OceanGUIInterface myOceanGUI)
Sets the myOceanGUI attribute.
|
protected void |
sleep(int ms)
This method let sleep up an unspecific Thread.
|
protected void |
updateGUI()
Updates the whole GUI.
|
protected void |
updateStatusPanel()
Updates the status panel.
|
private OceanGUIInterface myOceanGUI
private OceanInterface myOcean
public Listener(OceanInterface model, OceanGUIInterface view)
model
- the ocean we work withview
- the GUI we work withprotected OceanInterface getMyOcean()
protected OceanGUIInterface getMyOceanGUI()
protected void message(java.lang.String errorMsg)
errorMsg
- a String that is displayed in the messageprotected void repaintOcean()
protected void setMyModel(OceanInterface myOcean)
myOcean
- the ocean to setprotected void setMyView(OceanGUIInterface myOceanGUI)
myOceanGUI
- the OceanGUI to setprotected void sleep(int ms)
ms
- the time to sleep, in millisecondsprotected void updateGUI()
protected void updateStatusPanel()