1 | public void formatChanged(FormatChangedEvent event) {↵ | | 1 | public void formatChanged(FormatChangedEvent event) {↵
|
| | | 2 | // select the menu item corresponding to present format↵
|
2 | FormatInfo info = event.getInfo();↵ | | 3 | FormatInfo info = event.getInfo();↵
|
|
3 | if (info.isHeading1()) {↵ | | 4 | if (info.isHeading1()) {↵
|
4 | selectInParagraphComboBox(HTML.Tag.H1);↵ | | 5 | selectMenuItem(HTML.Tag.H1);↵
|
5 | } else if (info.isHeading2()) {↵ | | 6 | } else if (info.isHeading2()) {↵
|
6 | selectInParagraphComboBox(HTML.Tag.H2);↵ | | 7 | selectMenuItem(HTML.Tag.H2);↵
|
7 | } else if (info.isHeading3()) {↵ | | 8 | } else if (info.isHeading3()) {↵
|
8 | selectInParagraphComboBox(HTML.Tag.H3);↵ | | 9 | selectMenuItem(HTML.Tag.H3);↵
|
9 | } else if (info.isPreformattet()) {↵ | | 10 | } else if (info.isPreformattet()) {↵
|
10 | selectInParagraphComboBox(HTML.Tag.PRE);↵ | | 11 | selectMenuItem(HTML.Tag.PRE);↵
|
11 | } else if (info.isAddress()) {↵ | | 12 | } else if (info.isAddress()) {↵
|
12 | selectInParagraphComboBox(HTML.Tag.ADDRESS);↵ | | 13 | selectMenuItem(HTML.Tag.ADDRESS);↵
|
13 | } else {↵ | | 14 | } else {↵
|
14 | // select the "Normal" entry as default↵ | | 15 | // select the "Normal" entry as default↵
|
15 | selectInParagraphComboBox(HTML.Tag.P);↵ | | 16 | selectMenuItem(HTML.Tag.P);↵
|
16 | | | 17 |
|