| Revision 38,
1.2 KB
checked in by bmcguffin, 9 years ago
(diff) |
|
Removed the newLine at the end of each openTag method.
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | * To change this license header, choose License Headers in Project Properties. |
|---|
| 3 | * To change this template file, choose Tools | Templates |
|---|
| 4 | * and open the template in the editor. |
|---|
| 5 | */ |
|---|
| 6 | package scriptbuilder.structures.events; |
|---|
| 7 | |
|---|
| 8 | import scriptbuilder.structures.ELEMENT; |
|---|
| 9 | import scriptbuilder.structures.I_XML_Writable; |
|---|
| 10 | import scriptbuilder.structures.ScriptEvent; |
|---|
| 11 | |
|---|
| 12 | /** |
|---|
| 13 | * Data model for a TMT Radio event. A TMT radio transmission has a string |
|---|
| 14 | * message. |
|---|
| 15 | * |
|---|
| 16 | * @author Bryan McGuffin |
|---|
| 17 | */ |
|---|
| 18 | public class TMTRadioEvent extends ScriptEvent implements I_XML_Writable |
|---|
| 19 | { |
|---|
| 20 | |
|---|
| 21 | public TMTRadioEvent() |
|---|
| 22 | { |
|---|
| 23 | super(ScriptEventType.TMT_RADIO_EVENT); |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | public String message = ""; |
|---|
| 27 | |
|---|
| 28 | @Override |
|---|
| 29 | public String toXML() |
|---|
| 30 | { |
|---|
| 31 | String output = openTag(ELEMENT.TMT_RADIO.tag); |
|---|
| 32 | output += message; |
|---|
| 33 | output += closeTag(ELEMENT.TMT_RADIO.tag); |
|---|
| 34 | return output; |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | @Override |
|---|
| 38 | public String openTag(String s) |
|---|
| 39 | { |
|---|
| 40 | return "<" + s + ">"; |
|---|
| 41 | } |
|---|
| 42 | |
|---|
| 43 | @Override |
|---|
| 44 | public String closeTag(String s) |
|---|
| 45 | { |
|---|
| 46 | return "</" + s + ">\n"; |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | @Override |
|---|
| 50 | public String emptyTag(String s) |
|---|
| 51 | { |
|---|
| 52 | return "<" + s + "/>\n"; |
|---|
| 53 | } |
|---|
| 54 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.