public class TreeWindowUserInterface
extends javax.swing.JFrame
| Constructor and Description |
|---|
TreeWindowUserInterface()
Creates a new TreeWindow object.
|
TreeWindowUserInterface(int width,
int height)
Creates a new TreeWindow object.
|
TreeWindowUserInterface(java.lang.String title,
int width,
int height)
Creates a new TreeWindow object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
drawLine(double length)
Draws a line with the pen, starting at the current position and angle
|
void |
drawLine(int length)
Draws a line of specified length, starting at the current position and angle
|
void |
refresh()
Refreshes the TreeWindow.
|
void |
turnLeft(double angle)
Turns the pen used to draw to the left
|
void |
turnRight(double angle)
Turns the pen used to draw to the right
|
public TreeWindowUserInterface()
public TreeWindowUserInterface(int width,
int height)
width - The width of the user interfaceheight - The height of the user interfacepublic TreeWindowUserInterface(java.lang.String title,
int width,
int height)
title - The title of the user interfacewidth - The width of the user interfaceheight - The height of the user interfacepublic void refresh()
public void drawLine(int length)
length - The length of the line to be dawnpublic void drawLine(double length)
length - The length of the line to be dawnpublic void turnLeft(double angle)
angle - The angle the pen will turn to the leftpublic void turnRight(double angle)
angle - The angle the pen will turn to the right