| 39 |
|
|
| 40 |
|
} |
| 41 |
|
|
| 42 |
+ |
//---PUBLIC METHODS--- |
| 43 |
+ |
|
| 44 |
|
public void writePage(String filename) throws IOException{ |
| 45 |
|
|
| 46 |
|
BufferedWriter bw = null; |
| 61 |
|
|
| 62 |
|
IscreamLayout.printTitle(bw, _title); |
| 63 |
|
|
| 64 |
< |
IscreamLayout.printLinkedList(bw, _filtered); |
| 64 |
> |
//IscreamLayout.printMachines(bw, _filtered); |
| 65 |
> |
makeCustomContents(bw, _filtered); |
| 66 |
|
|
| 67 |
|
IscreamLayout.printBottom(bw); |
| 68 |
|
|
| 69 |
|
bw.flush(); |
| 70 |
|
bw.close(); |
| 71 |
|
|
| 72 |
< |
System.out.println(" - Written SHTML Index page"); |
| 72 |
> |
System.out.println("Written SHTML Index page"); |
| 73 |
|
|
| 74 |
|
} |
| 72 |
– |
|
| 73 |
– |
//---PUBLIC METHODS--- |
| 75 |
|
|
| 75 |
– |
|
| 76 |
|
/** |
| 77 |
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
| 78 |
|
* method to provide clean logging (every class should have this). |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
//---PRIVATE METHODS--- |
| 87 |
+ |
|
| 88 |
+ |
// Override this method for customised index pages. |
| 89 |
+ |
private static void makeCustomContents(BufferedWriter bw, LinkedList list) throws IOException{ |
| 90 |
+ |
IscreamLayout.printAllMachines(bw, list); |
| 91 |
+ |
} |
| 92 |
|
|
| 93 |
|
//---ACCESSOR/MUTATOR METHODS--- |
| 94 |
|
|