|
TextLine |
|
1 // joi/3/shapes/TextLine.java
2 //
3 //
4 // Copyright 2003 Bill Campbell and Ethan Bolker
5
6 // This file contains stubs for the methods.
7
8 /**
9 * A horizontal line of character text.
10 *
11 * @version 3
12 */
13
14 public class TextLine
15 {
16 /**
17 * Construct a TextLine.
18 *
19 * @param text the text of the line.
20 */
21
22 public TextLine( String text )
23 {
24 }
25
26 /**
27 * Paint this TextLine on Screen s at position (x,y).
28 *
29 * @param s the Screen on which this line is to be painted.
30 * @param x the x position for the line.
31 * @param y the y position for the line.
32 */
33
34 public void paintOn( Screen s, int x, int y )
35 {
36 }
37
38 /**
39 * Draw the TextLine to Screen s at position (0,0).
40 *
41 * @param s the Screen on which this line is to be painted.
42 */
43
44 public void paintOn( Screen s )
45 {
46 paintOn( s, 0, 0 );
47 }
48
49 /**
50 * Get the length of this line.
51 *
52 * @return the length in (character) pixels.
53 */
54
55 public int getLength()
56 {
57 return 0; // replace with the right answer
58 }
59
60 /**
61 * Unit test for class.TextLine,
62 * assuming Screen and Terminal work.
63 */
64
65 public static void main( String[] args )
66 {
67 }
68 }
69
|
TextLine |
|