Skip to content

Commit

Permalink
Changes for the new TurtleSpace design.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Apr 4, 2001
1 parent a0f785b commit e820040
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
9 changes: 9 additions & 0 deletions last/toby/gui/TobyMenuBar.java
Expand Up @@ -292,7 +292,16 @@ else if (mi == stepItem)
doStep();

else if (mi == clearItem)
{
try
{
parent.getTobyPanel().getTurtleSpace().cleanup();
} // try
catch (ExecException ee)
{
// don't care.
} // catch
} // else if
} // actionPerformed


Expand Down
14 changes: 8 additions & 6 deletions last/toby/gui/TobyPanel.java
Expand Up @@ -20,8 +20,8 @@
package last.toby.gui;
import java.awt.*;
import javax.swing.*;
import last.toby.turtlespace.swing.SwingRenderer;
import last.toby.turtlespace.TurtleSpace;
import last.toby.turtlespace.swing.JTurtleSpace;
import last.toby.interpreter.VarWatcher;

/**
Expand All @@ -31,7 +31,8 @@
*/
public final class TobyPanel extends JComponent implements LayoutManager
{
private JTurtleSpace tspace = null;
private TurtleSpace tspace = null;
private SwingRenderer renderer = null;
private TobyInputArea tia = null;
private VarViewer varViewer = null;
private JScrollPane varScrollPane = null;
Expand All @@ -57,8 +58,9 @@ private void buildComponents()
* returns : void. The panel will have a bunch more stuff, though.
*/
{
tspace = new JTurtleSpace();
add(tspace);
renderer = new SwingRenderer();
tspace = new TurtleSpace(renderer);
add(renderer);

tia = new TobyInputArea(frame);
add(tia);
Expand Down Expand Up @@ -127,8 +129,8 @@ public void layoutContainer(Container target)

height -= (insets.top + insets.bottom);

tspace.setSize(widthHalf, height);
tspace.setLocation(insets.left, insets.top);
renderer.setSize(widthHalf, height);
renderer.setLocation(insets.left, insets.top);

tia.setSize(widthHalf, (int) (height * 0.75));
tia.setLocation(insets.left + widthHalf, insets.top);
Expand Down

0 comments on commit e820040

Please sign in to comment.