java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
AbiTurtle
public class AbiTurtle
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, java.awt.Window.Type |
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
(package private) static int |
barHeight
|
static int |
black
|
static int |
blau
|
static int |
blue
|
(package private) static javax.swing.JButton |
closeButton
|
static java.awt.Color[] |
colors
|
(package private) static java.awt.Container |
container
|
(package private) static int |
currentHeight
|
(package private) static int |
currentWidth
|
(package private) static javax.swing.JButton |
eraseButton
|
(package private) static boolean |
firstCall
|
(package private) static java.awt.Graphics |
g
|
static int |
gelb
|
static int |
grau
|
static int |
gray
|
static int |
green
|
static int |
gruen
|
static int |
grün
|
(package private) static java.awt.Graphics |
gWithoutTurtle
|
(package private) static java.awt.Graphics |
gWithTurtle
|
static int |
hellgrau
|
(package private) static java.awt.image.BufferedImage |
iWithoutTurtle
|
(package private) static java.awt.image.BufferedImage |
iWithTurtle
|
(package private) static javax.swing.JFrame |
jFrame
|
static int |
lightGray
|
(package private) int |
maxHeight
|
(package private) int |
maxWidth
|
(package private) static javax.swing.JMenuBar |
menueBar
|
static int |
orange
|
static int |
red
|
(package private) static javax.swing.JButton |
restoreButton
|
static int[] |
rgbColor
|
static int |
rot
|
static int |
schwarz
|
(package private) static java.util.Vector |
tList
|
(package private) static int |
tNumber
|
static int |
weiss
|
static int |
weiß
|
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 | |
---|---|
AbiTurtle()
|
|
AbiTurtle(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 |
closeButton_ActionPerformed(java.awt.event.ActionEvent evt)
|
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 |
dreheNach(double x,
double y)
|
void |
dreheRechts(double degree)
|
void |
eraseButton_ActionPerformed(java.awt.event.ActionEvent evt)
|
void |
fillCircle(double radius)
Fills a circle with the current color. |
void |
fuelleKreis(double r)
|
void |
gehe(double l)
|
void |
geheImBogen(double arc,
double r)
|
void |
geheZu(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 |
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 |
void |
restoreButton_ActionPerformed(java.awt.event.ActionEvent evt)
|
void |
restoreWindow()
|
void |
ruhe(int time)
|
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 |
static void |
setFilled(boolean filled)
|
void |
setSpeed(int s)
|
void |
setzeAufStartpunkt(double sx,
double sy)
|
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 |
turnRight(double angle)
Rotation |
void |
turnTo(double x,
double y)
facing to the point (x,y) |
void |
verstecke()
|
void |
write(java.lang.String s)
Write a string, beginning at the current Position (horizontal). |
void |
zeichneKreis(double r)
|
void |
zeige()
|
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
static int barHeight
public static final int black
public static final int blau
public static final int blue
static javax.swing.JButton closeButton
public static java.awt.Color[] colors
static java.awt.Container container
static int currentHeight
static int currentWidth
static javax.swing.JButton eraseButton
static boolean firstCall
static java.awt.Graphics g
public static final int gelb
public static final int grau
public static final int gray
public static final int green
public static final int gruen
public static final int grün
static java.awt.Graphics gWithoutTurtle
static java.awt.Graphics gWithTurtle
public static final int hellgrau
static java.awt.image.BufferedImage iWithoutTurtle
static java.awt.image.BufferedImage iWithTurtle
static javax.swing.JFrame jFrame
public static final int lightGray
final int maxHeight
final int maxWidth
static javax.swing.JMenuBar menueBar
public static final int orange
public static final int red
static javax.swing.JButton restoreButton
public static int[] rgbColor
public static final int rot
public static final int schwarz
static final java.util.Vector tList
static int tNumber
public static final int weiss
public static final int weiß
public static final int white
public static final int yellow
Constructor Detail |
---|
public AbiTurtle()
public AbiTurtle(int b, int h)
Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent evt)
public void clearScreen()
public void closeButton_ActionPerformed(java.awt.event.ActionEvent evt)
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 void drawCircle(double radius)
radius
- radius of the circlepublic void drehe(double degree)
public void dreheNach(double x, double y)
public void dreheRechts(double degree)
public void eraseButton_ActionPerformed(java.awt.event.ActionEvent evt)
public void fillCircle(double radius)
radius
- radius of the circle.public void fuelleKreis(double r)
public void gehe(double l)
public void geheImBogen(double arc, double r)
public void geheZu(double newX, double newY)
public int getColor()
public double getDirection()
public double getMaxX()
public double getMaxY()
public int getPixelColor()
public double getXPos()
public double getYPos()
public void hebeStift()
protected void hideFrame()
public void hideTurtle()
public int liesFarbe()
public double liesMaxX()
public double liesMaxY()
public int liesPixelFarbe()
public double liesRichtung()
public double liesX()
public double liesY()
public void move(double steps)
public void moveArc(double arcAngle, double radius)
arcAngle
- -360 <= angle <= 360radius
- radius of the circlepublic void moveTo(double nextX, double nextY)
nextX
- x-coordinate of the new positionnextY
- y-coordinate of the new positionpublic void paint(java.awt.Graphics gr)
paint
in class java.awt.Window
public void penDown()
public void penUp()
public void plotPixel()
public void restoreButton_ActionPerformed(java.awt.event.ActionEvent evt)
public void restoreWindow()
public void ruhe(int time)
public void schreibe(java.lang.String s)
public void senkeStift()
public void setColor(int c)
c
- colors: black=0, green=1, blue=2, yellow=3, red=4, gray=5, lightGrau=6, white=8public void setDirection(double angle)
angle
- -360 <= angle <= 360, 0 = right, 180 = leftpublic void setDirection(double deltaX, double deltaY)
public static void setFilled(boolean filled)
public void setSpeed(int s)
s
- 0 <= s <= 10public void setzeAufStartpunkt(double sx, double sy)
public void setzeFarbe(int c)
public void setzeRichtung(double degree)
public void setzeRichtung(double deltaX, double deltaY)
public void setzeTempo(int s)
public void showTurtle()
public void sleep(int time)
time
- in millisecondspublic void toStartingPoint(double sx, double sy)
sx
- x-coordinatesy
- y-coordinatepublic void turn(double angle)
angle
- -350 <= angle <= 360public void turnRight(double angle)
angle
- -350 <= angle <= 360public void turnTo(double x, double y)
x
- x-valuey
- y-valuepublic void verstecke()
public void write(java.lang.String s)
s
- a stringpublic void zeichneKreis(double r)
public void zeige()