1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 /*
5 * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7 *
8 * This code is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 only, as
10 * published by the Free Software Foundation. Oracle designates this
11 * particular file as subject to the "Classpath" exception as provided
12 * by Oracle in the LICENSE file that accompanied this code.
13 *
14 * This code is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * version 2 for more details (a copy is included in the LICENSE file that
18 * accompanied this code).
19 *
20 * You should have received a copy of the GNU General Public License version
21 * 2 along with this work; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
23 *
24 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
25 * or visit www.oracle.com if you need additional information or have any
26 * questions.
27 */
28 -->
29
30 <?import javafx.scene.control.Button?>
31 <?import javafx.scene.layout.AnchorPane?>
32
33 <!-- line # 33 --> <?language sqtmc?> <!-- do NOT compile scripts because compile PI turns it off: --> <?compile false?>
34
35 <AnchorPane fx:id="idRoot" prefHeight="240.0" prefWidth="480.0"
36 xmlns:fx="http://javafx.com/fxml/1">
37
38 <!-- line # 38 --> <fx:script source="demo_02_topscript.sqtmc" />
39
40 <children>
41
42 <!-- line # 42 --> <Button fx:id="idButton" text="Press me!"
43 layoutX="210.0" layoutY="137.0"
44 onMouseClicked="demo_02_off.fxml embedded event - MouseClicked - line # 44 (PCDATA)"
45 onAction="demo_02_off.fxml embedded event - ActionEvent - line # 45 - LF entity (&#10;) forces linebreak in attribute value:
46 (this is on a new line) these characters in attribute values need to be escaped: <, >, &, these if used as delimiters: ", ' (PCDATA)" />
47
48 <!-- line # 48 --> <fx:script source="demo_02_middlescript.sqtmc" />
49
50 </children>
51
52 <!-- line # 52 --> <fx:script>demo_02_off.fxml embedded script sqtmc - line # 52</fx:script>
53
54 <!-- line # 54 --> <fx:script source="demo_02_bottomscript.sqtmc" />
55
56 <!-- line # 56 --> <fx:script>something (line # 56)(PCDATA)
57 in a=&b (line # 57)
58 the b>1 (line # 58)
59 news c<2 (line # 59) </fx:script> <fx:script><![CDATA[demo_02_off.fxml (line # 59):
60 CDATA-section ("<![CDATA[") allows any characters including <, > and & !! (no need to escape (line # 60)
61 these special characters; it is plain CDATA which does not get processed, just passed on (line # 61)
62 including LF etc. (line # 62)
63 in a=&b (line # 63)
64 the b>1 (line # 64)
65 news c<2 (line # 65)
66 Watch out that in the code there is no string that exactly matches the end tag (line # 66)
67 for a CDATA-section (close-square-bracket+close-square-bracket+greater-character (line # 67) ]]></fx:script>
68
69 </AnchorPane>
70