Table of Contents
Java Academy
Part III: Advanced Java
Notes
Advanced Fonts
A DrawableString Class
DrawableString.java
A Subclass of Font
DrawableStringTest.java
DrawableStrings.java
DrawableStringsTest.java
HTML Parameters
Parameter Conversion
Parameter Conversion (cont’d)
Parameter Conversion (cont’d)
Advanced Geometry
A Geometry Package
The AWT Rectangle Class
AWT Rectangle Methods
The Rectangle Class
Rectangle Constructor #1
Rectangle Constructor #2
RectangleTest Applet
The Square Class
SquareTest Applet
Modulo Arithmetic
The Parallelogram Class
Representing a Parallelogram
Height and Displacement
Height and Displacement (cont’d)
Instance Variables
Parallelogram Constructor #1
Parallelogram Constructor #2
ParallelogramTest Applet
The Rhombus Class
RhombusTest Applet
RhombusTest Applet (cont’d)
The Quadrilateral Class
Quadrilateral Constructor #1
Quadrilateral Constructor #2
Quadrilateral Constructor #3
Other Classes of Polygons
HexagonTest Applet
TriangleTest Applet
Sierpinski’s Triangle
DrawablePolygon Class
The Drawable Interface
DrawablePolygon Constructor #1
DrawablePolygon Constructor #2
DrawablePolygon Constructor #3
Instance Methods
Instance Methods (cont’d)
Rotation Methods
The rotate Method
The centerRotate Method
Rotation About a Point
The DrawablePoint Class
Overview of DrawablePoint
A Mathematical Problem
A Derivation
A Result
Another rotate Method
Rotation About the Origin
Yet Another rotate Method
Some Remarks
Regular n-gons
DrawablePolygon Constructor #4
Animation
General Algorithm
Threads of Execution
The Runnable Interface
The start Methods
The stop Methods
The run Method
MovingSquare.java
Boundary Checking
The checkBounds Method
The MovablePolygon Class
MovablePolygon Constructors
MovablePolygon Methods
MovingPolygons.java
MovingPolygons.java (cont’d)
Double Buffering
Initializing the Buffer
The update Method
Some Comments
Advanced GUIs
The SystemColors Applet
The ScrollPane Class
The ScrollPane Constructor
The SystemColors2 Applet
|