|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
ikg.eleven.turtle.Turtle
public class Turtle
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
javax.swing.JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
java.awt.Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
java.awt.Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
black
|
static int |
blau
|
static int |
blue
|
static java.awt.Color[] |
colors
|
static int |
gelb
|
static int |
grau
|
static int |
gray
|
static int |
green
|
static int |
gruen
|
static int |
hellgrau
|
static int |
lightGray
|
static int |
orange
|
static int |
red
|
static int[] |
rgbColor
|
static int |
rot
|
static int |
schwarz
|
static int |
weiss
|
static int |
white
|
static int |
yellow
|
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| 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, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Turtle()
|
|
Turtle(int b,
int h)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
|
void |
clearScreen()
clears the Screen, not the informations about the turtles |
void |
copyPixel(int x,
int y,
int xTarget,
int yTarget)
Copy of a pixel. |
void |
drawCircle(double radius)
Draw a circle. |
void |
drehe(double degree)
|
void |
fillCircle(double radius)
Fills a circle with the current color. |
void |
fuelleKreis(double r)
|
void |
geheImBogen(double arc,
double r)
|
void |
geheNach(double newX,
double newY)
|
int |
getColor()
get the pencolor |
double |
getDirection()
|
double |
getMaxX()
|
double |
getMaxY()
|
int |
getPixelColor()
|
double |
getXPos()
|
double |
getYPos()
|
void |
hebeStift()
|
protected void |
hideFrame()
|
void |
hideTurtle()
hide the turtle |
int |
liesFarbe()
|
double |
liesMaxX()
|
double |
liesMaxY()
|
int |
liesPixelFarbe()
|
double |
liesRichtung()
|
double |
liesX()
|
double |
liesY()
|
void |
mouseClicked(java.awt.event.MouseEvent me)
|
void |
mouseDragged(java.awt.event.MouseEvent me)
|
void |
mouseEntered(java.awt.event.MouseEvent me)
|
void |
mouseExited(java.awt.event.MouseEvent me)
|
void |
mouseMoved(java.awt.event.MouseEvent me)
|
void |
mousePressed(java.awt.event.MouseEvent me)
|
void |
mouseReleased(java.awt.event.MouseEvent me)
|
void |
move(double steps)
the turtle moves forward in the current direction |
void |
moveArc(double arcAngle,
double radius)
Move along the outline of a circular arc |
void |
moveTo(double nextX,
double nextY)
move to a new position (shortest way) |
void |
paint(java.awt.Graphics gr)
|
void |
penDown()
puts the pen down. |
void |
penUp()
no drawing while moving, because the pen is up |
void |
plotPixel()
Plots a pixel at the current position in the current color |
static void |
register(EventStation er)
|
void |
restoreWindow()
restores the window |
void |
ruhe(int time)
|
void |
schaueNach(double x,
double y)
|
void |
schreibe(java.lang.String s)
|
void |
senkeStift()
|
void |
setColor(int c)
color of the pen (and of the turtle) |
void |
setDirection(double angle)
changes the direction of movement. |
void |
setDirection(double deltaX,
double deltaY)
sets the direction as gradient with deltaX and deltaY |
void |
setSpeed(int s)
|
void |
setzeFarbe(int c)
|
void |
setzeRichtung(double degree)
|
void |
setzeRichtung(double deltaX,
double deltaY)
|
void |
setzeTempo(int s)
|
void |
showTurtle()
show the turtle, the turtle is visible as a triangle |
void |
sleep(int time)
|
void |
toStartingPoint(double sx,
double sy)
fixing a starting point |
void |
turn(double angle)
Rotation |
void |
turnTo(double x,
double y)
facing to the point (x,y) |
void |
verstecke()
|
void |
vor(double l)
|
void |
write(java.lang.String s)
Write a string, beginning at the current Position (horizontal). |
void |
zeichneKreis(double r)
|
void |
zeige()
|
void |
zumStart(double sx,
double sy)
|
| Methods inherited from class javax.swing.JFrame |
|---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.awt.Window |
|---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static java.awt.Color[] colors
public static final int black
public static final int green
public static final int blue
public static final int yellow
public static final int red
public static final int gray
public static final int lightGray
public static final int orange
public static final int white
public static int[] rgbColor
public static final int schwarz
public static final int gruen
public static final int blau
public static final int gelb
public static final int rot
public static final int grau
public static final int hellgrau
public static final int weiss
| Constructor Detail |
|---|
public Turtle()
public Turtle(int b,
int h)
| Method Detail |
|---|
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListenerpublic void clearScreen()
protected void hideFrame()
public void restoreWindow()
public void paint(java.awt.Graphics gr)
paint in class java.awt.Containerpublic void move(double steps)
steps - number of pixelunitspublic void penUp()
public void penDown()
public void setDirection(double angle)
angle - -360 <= angle <= 360, 0 = right, 180 = leftpublic double getDirection()
public double getXPos()
public double getYPos()
public double getMaxX()
public double getMaxY()
public void turn(double angle)
angle - -350 <= angle <= 360public void setColor(int c)
c - colors: black=0, green=1, blue=2, yellow=3, red=4, gray=5, lightGrau=6, white=8public int getColor()
public void turnTo(double x,
double y)
x - x-valuey - y-valuepublic void write(java.lang.String s)
s - a stringpublic void setSpeed(int s)
s - 0 <= s <= 10public void hideTurtle()
public void showTurtle()
public void toStartingPoint(double sx,
double sy)
sx - x-coordinatesy - y-coordinate
public void moveTo(double nextX,
double nextY)
nextX - x-coordinate of the new positionnextY - y-coordinate of the new position
public void moveArc(double arcAngle,
double radius)
arcAngle - -360 <= angle <= 360radius - radius of the circle
public void setDirection(double deltaX,
double deltaY)
public void drawCircle(double radius)
radius - radius of the circlepublic void fillCircle(double radius)
radius - radius of the circle.public void plotPixel()
public void sleep(int time)
time - in milliseconds
public void copyPixel(int x,
int y,
int xTarget,
int yTarget)
x - x-coordinate of the sourcey - y-coordinate of the sourcexTarget - x-coordinate of the targetyTarget - y-coordinate of the targetpublic int getPixelColor()
public static void register(EventStation er)
public void mousePressed(java.awt.event.MouseEvent me)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent me)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent me)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent me)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseDragged(java.awt.event.MouseEvent me)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void vor(double l)
public void hebeStift()
public void senkeStift()
public void setzeRichtung(double degree)
public void setzeRichtung(double deltaX,
double deltaY)
public double liesRichtung()
public double liesX()
public double liesY()
public double liesMaxX()
public double liesMaxY()
public void drehe(double degree)
public void setzeFarbe(int c)
public int liesFarbe()
public void schaueNach(double x,
double y)
public void schreibe(java.lang.String s)
public void setzeTempo(int s)
public void verstecke()
public void zeige()
public void zumStart(double sx,
double sy)
public void geheNach(double newX,
double newY)
public void geheImBogen(double arc,
double r)
public void zeichneKreis(double r)
public void fuelleKreis(double r)
public void ruhe(int time)
public int liesPixelFarbe()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||