public class SimbrainDesktop
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) bsh.Interpreter |
interpreter
Interpreter for terminal.
|
Constructor and Description |
---|
SimbrainDesktop(Workspace workspace)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDesktopComponent(WorkspaceComponent workspaceComponent)
Add a new SimbrainComponent.
|
void |
addInternalFrame(javax.swing.JInternalFrame internalFrame)
Add internal frame.
|
void |
clearDesktop()
Clear desktop of all components.
|
(package private) static GuiComponent<?> |
createDesktopComponent(GenericFrame parentFrame,
WorkspaceComponent component)
Creates an instance of the proper wrapper class around the provided
instance.
|
javax.swing.JDesktopPane |
getDesktop()
Returns the internal desktop object.
|
static SimbrainDesktop |
getDesktop(Workspace workspace) |
GuiComponent<?> |
getDesktopComponent(java.lang.String componentName)
Returns the desktop component corresponding to a named workspace
component.
|
GuiComponent<?> |
getDesktopComponent(WorkspaceComponent component)
Returns the desktop component corresponding to a workspace component.
|
javax.swing.JFrame |
getFrame()
Returns the main frame for the desktop.
|
double |
getHeight()
Returns the height of the visible portion of the desktop.
|
static java.util.Map<Workspace,SimbrainDesktop> |
getInstances() |
double |
getWidth()
Returns the width of the visible portion of the desktop.
|
Workspace |
getWorkspace()
Returns the workspace.
|
static void |
main(java.lang.String[] args)
Simbrain main method.
|
void |
openWorkspace()
Shows the dialog for opening a workspace file.
|
void |
printToTerminal(java.lang.String toPrint)
Print text to terminal.
|
void |
quit(boolean forceQuit)
Quit application.
|
void |
registerComponentInstance(WorkspaceComponent workspaceComponent,
GuiComponent guiComponent)
Registers instance of guiComponents.
|
void |
save()
If changes exist, show a change dialog, otherwise just save the current
file.
|
void |
saveAs()
Show a save-as dialog.
|
static void |
showJFrame(WorkspaceComponent component)
Show Gui View of a workspace component.
|
void |
toggleDock()
Provisional Code for toggling tab dock's visibility.
|
void |
updateTimeLabel()
Update time label.
|
public SimbrainDesktop(Workspace workspace)
workspace
- The workspace for this desktop.public static java.util.Map<Workspace,SimbrainDesktop> getInstances()
public static SimbrainDesktop getDesktop(Workspace workspace)
public void printToTerminal(java.lang.String toPrint)
toPrint
- text to printpublic Workspace getWorkspace()
public javax.swing.JFrame getFrame()
public GuiComponent<?> getDesktopComponent(WorkspaceComponent component)
component
- component to check withpublic GuiComponent<?> getDesktopComponent(java.lang.String componentName)
componentName
- name of desktop component to returnpublic void addInternalFrame(javax.swing.JInternalFrame internalFrame)
internalFrame
- the frame to add.public void registerComponentInstance(WorkspaceComponent workspaceComponent, GuiComponent guiComponent)
workspaceComponent
- Workspace componentguiComponent
- GUI componentpublic void addDesktopComponent(WorkspaceComponent workspaceComponent)
workspaceComponent
- Workspace Componentstatic GuiComponent<?> createDesktopComponent(GenericFrame parentFrame, WorkspaceComponent component)
component
- The component to wrap.parentFrame
- The frame of this componentpublic void openWorkspace()
public static void showJFrame(WorkspaceComponent component)
component
- component to viewpublic void saveAs()
public void save()
public void clearDesktop()
public static void main(java.lang.String[] args)
args
- currently not usedpublic void quit(boolean forceQuit)
forceQuit
- should quit be forced.public void toggleDock()
public void updateTimeLabel()
public double getWidth()
public double getHeight()
public javax.swing.JDesktopPane getDesktop()