|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JInternalFrame
org.simbrain.world.odorworld.OdorWorldFrame
public class OdorWorldFrame
WorldPanel is the container for the world component. Handles toolbar buttons, and serializing of world
data. The main environment codes is in OdorWorld.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JInternalFrame |
|---|
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JInternalFrame |
|---|
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
OdorWorldFrame()
Default constructor. |
|
OdorWorldFrame(Workspace ws)
Construct a new world panel. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Responds to actions performed. |
ArrayList |
getAgentList()
Return the arraylist of agents. |
File |
getCurrentFile()
Return the current file. |
String |
getGenericPath()
|
OdorWorldFrameMenu |
getMenu()
|
String |
getPath()
|
int |
getTheHeight()
|
int |
getTheWidth()
|
Workspace |
getWorkspace()
|
OdorWorld |
getWorld()
Return the odor world. |
int |
getXpos()
|
int |
getYpos()
|
void |
init()
Initializes frame. |
void |
initBounds()
For Castor. |
void |
internalFrameActivated(InternalFrameEvent e)
Tasks to perform when frame is activated. |
void |
internalFrameClosed(InternalFrameEvent e)
Tasks to perform when frame is closed. |
void |
internalFrameClosing(InternalFrameEvent e)
Tasks to perform when frame is closing. |
void |
internalFrameDeactivated(InternalFrameEvent e)
Tasks to perform when frame is deactivated. |
void |
internalFrameDeiconified(InternalFrameEvent e)
Tasks to peform when frame is deiconified. |
void |
internalFrameIconified(InternalFrameEvent e)
Tasks to perform when frame is iconified. |
void |
internalFrameOpened(InternalFrameEvent e)
Tasks to peform when frame is opened. |
boolean |
isChangedSinceLastSave()
|
boolean |
openWorld()
Show the dialog for choosing a world to open. |
void |
readWorld(File theFile)
Read a world from a world-wld file. |
void |
saveWorld()
Opens a file-save dialog and saves world information to the specified file Called by "Save As". |
void |
saveWorld(File worldFile)
Save a specified file Called by "save". |
void |
setChangedSinceLastSave(boolean hasChangedSinceLastSave)
|
void |
setMenu(OdorWorldFrameMenu menu)
Sets odor world frame menu. |
void |
setPath(String path)
|
void |
setTheHeight(int theHeight)
|
void |
setTheWidth(int theWidth)
|
void |
setWorkspace(Workspace workspace)
|
void |
setWorldName(String name)
Sets the name of the world. |
void |
setXpos(int xpos)
|
void |
setYpos(int ypos)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OdorWorldFrame()
public OdorWorldFrame(Workspace ws)
ws - the workspace associated with this frame| Method Detail |
|---|
public void init()
public File getCurrentFile()
public OdorWorld getWorld()
public boolean openWorld()
public void readWorld(File theFile)
theFile - the wld file containing world informationpublic void saveWorld()
public void saveWorld(File worldFile)
worldFile - the file to save topublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenere - Action eventpublic void internalFrameOpened(InternalFrameEvent e)
internalFrameOpened in interface InternalFrameListenere - Internal frame eventpublic void internalFrameClosing(InternalFrameEvent e)
internalFrameClosing in interface InternalFrameListenere - Internal frame eventpublic void internalFrameClosed(InternalFrameEvent e)
internalFrameClosed in interface InternalFrameListenere - Internal frame eventpublic void internalFrameIconified(InternalFrameEvent e)
internalFrameIconified in interface InternalFrameListenere - Internal frame eventpublic void internalFrameDeiconified(InternalFrameEvent e)
internalFrameDeiconified in interface InternalFrameListenere - Internal frame eventpublic void internalFrameActivated(InternalFrameEvent e)
internalFrameActivated in interface InternalFrameListenere - Internal frame eventpublic void internalFrameDeactivated(InternalFrameEvent e)
internalFrameDeactivated in interface InternalFrameListenere - Internal frame eventpublic void setPath(String path)
path - The path to set; used in persistence.public String getPath()
public String getGenericPath()
public Workspace getWorkspace()
public void setWorkspace(Workspace workspace)
workspace - The workspace to set.public void initBounds()
public int getXpos()
public void setXpos(int xpos)
xpos - The xpos to set.public int getYpos()
public void setYpos(int ypos)
ypos - The ypos to set.public int getTheHeight()
public void setTheHeight(int theHeight)
theHeight - The theHeight to set.public int getTheWidth()
public void setTheWidth(int theWidth)
theWidth - The theWidth to set.public ArrayList getAgentList()
public void setWorldName(String name)
name - String value to be setpublic boolean isChangedSinceLastSave()
public void setChangedSinceLastSave(boolean hasChangedSinceLastSave)
hasChangedSinceLastSave - The changedSinceLastSave to set.public OdorWorldFrameMenu getMenu()
public void setMenu(OdorWorldFrameMenu menu)
menu - Menu
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||