|
8 | 8 | <xsl:output method="xml" indent="yes"/> |
9 | 9 |
|
10 | 10 | <xsl:template match="/"> |
| 11 | + |
| 12 | +<xsl:processing-instruction name="import">javafx.scene.layout.*</xsl:processing-instruction> |
| 13 | +<xsl:processing-instruction name="import">javafx.scene.paint.*</xsl:processing-instruction> |
| 14 | +<xsl:processing-instruction name="import">javafx.scene.control.*</xsl:processing-instruction> |
| 15 | +<xsl:processing-instruction name="import">javafx.geometry.*</xsl:processing-instruction> |
| 16 | +<xsl:processing-instruction name="import">xx.CheckboxOpt</xsl:processing-instruction> |
| 17 | +<VBox> |
| 18 | +<MenuBar> |
| 19 | + <Menu text="File"> |
| 20 | + <MenuItem text="Quit" /> |
| 21 | + </Menu> |
| 22 | +</MenuBar> |
| 23 | +<TabPane> |
| 24 | + |
| 25 | +<Tab> |
| 26 | + <xsl:attribute name="text"> |
| 27 | + <xsl:value-of select="/j:object/j:string[@name='name']"/> |
| 28 | + </xsl:attribute> |
| 29 | +<ScrollPane> |
| 30 | +<VBox alignment="CENTER_RIGHT" style="-fx-padding: 15px;"> |
11 | 31 | <xsl:apply-templates select="/j:object/j:array[@name='arguments']/j:object"/> |
| 32 | +</VBox> |
| 33 | +</ScrollPane> |
| 34 | + </Tab> |
| 35 | + |
| 36 | + <Tab text="Reference" > |
| 37 | + </Tab> |
| 38 | + |
| 39 | +</TabPane> |
| 40 | +</VBox> |
12 | 41 | </xsl:template> |
13 | 42 |
|
14 | | -<xsl:template match="j:object[j:string[@name='type'] = 'Boolean']"> |
| 43 | +<xsl:template match="j:object[j:string[@name='type'] = 'Boolean' or j:string[@name='type'] = 'boolean'] "> |
15 | 44 | <xsl:text> |
16 | 45 |
|
17 | 46 | </xsl:text> |
18 | | -<fx:root type="javafx.scene.layout.HBox" xmlns:fx="http://javafx.com/fxml"> |
19 | | - <TextField editable="false" fx:id="textField" /> |
20 | | - <Checbox text="Select..." onAction="#doSelectFile"> |
21 | | - <xsl:attribute name="text"> |
22 | | - <xsl:value-of select="j:string[@name='summary']"/> |
23 | | - </xsl:attribute> |
24 | | - </Checbox> |
25 | | - |
26 | | - <Button text="⌫" onAction="#doClear" > |
27 | | - <tooltip> |
28 | | - <Tooltip text="Remove File" /> |
29 | | - </tooltip> |
30 | | - </Button> |
31 | | -</fx:root> |
| 47 | +<BorderPane style="-fx-padding: 5 5 5 5;"> |
| 48 | + |
| 49 | + <center> |
| 50 | + <FlowPane style="-fx-padding: 5 0 5 0;"> |
| 51 | + <CheckBox style="-fx-font-weight:bold;" BorderPane.alignment="CENTER_LEFT" > |
| 52 | + <xsl:apply-templates select="." mode="variable"/> |
| 53 | + <xsl:attribute name="text"> |
| 54 | + <xsl:value-of select="j:string[@name='summary']"/> |
| 55 | + </xsl:attribute> |
| 56 | + <xsl:apply-templates select="." mode="tooltip"/> |
| 57 | + |
| 58 | + </CheckBox> |
| 59 | + </FlowPane> |
| 60 | + </center> |
| 61 | +</BorderPane> |
| 62 | +<Separator/> |
32 | 63 | <xsl:text> |
33 | 64 |
|
34 | 65 | </xsl:text> |
|
38 | 69 | <xsl:text> |
39 | 70 |
|
40 | 71 | </xsl:text> |
41 | | -<fx:root type="javafx.scene.layout.HBox" xmlns:fx="http://javafx.com/fxml"> |
42 | | - <TextField editable="false" fx:id="textField" /> |
43 | | - <Button text="Select..." onAction="#doSelectFile"> |
44 | | - <tooltip> |
45 | | - <Tooltip text="Select File... " /> |
46 | | - </tooltip> |
47 | | - </Button> |
48 | | - <Button text="⌫" onAction="#doClear" > |
49 | | - <tooltip> |
50 | | - <Tooltip text="Remove File" /> |
51 | | - </tooltip> |
52 | | - </Button> |
53 | | -</fx:root> |
| 72 | +<BorderPane style="-fx-padding: 5 5 5 5;"> |
| 73 | + <xsl:apply-templates select="." mode="summary"/> |
| 74 | + <center> |
| 75 | + <FlowPane style="-fx-padding: 5 0 5 20;"> |
| 76 | + <TextField prefColumnCount="50"> |
| 77 | + <xsl:apply-templates select="." mode="variable"/> |
| 78 | + <xsl:attribute name="promptText"> |
| 79 | + <xsl:value-of select="j:string[@name='summary']"/> |
| 80 | + </xsl:attribute> |
| 81 | + </TextField> |
| 82 | + </FlowPane> |
| 83 | + </center> |
| 84 | + <bottom> |
| 85 | + <CheckboxOpt/> |
| 86 | + </bottom> |
| 87 | +</BorderPane> |
| 88 | +<Separator/> |
54 | 89 | <xsl:text> |
55 | 90 |
|
56 | 91 | </xsl:text> |
57 | 92 | </xsl:template> |
58 | 93 |
|
| 94 | + |
| 95 | +<xsl:template match="j:object" mode="variable"> |
| 96 | +<xsl:attribute name="id"> |
| 97 | +<xsl:value-of select="substring(j:string[@name='name'],3)"/> |
| 98 | +</xsl:attribute> |
| 99 | +<xsl:attribute name="fx:id"> |
| 100 | +<xsl:value-of select="substring(j:string[@name='name'],3)"/> |
| 101 | +</xsl:attribute> |
| 102 | +</xsl:template> |
| 103 | + |
| 104 | +<xsl:template match="j:object" mode="summary"> |
| 105 | +<top> |
| 106 | +<Label style="-fx-font-weight:bold;"> |
| 107 | +<xsl:attribute name="text"> |
| 108 | +<xsl:value-of select="j:string[@name='summary']"/> |
| 109 | +</xsl:attribute> |
| 110 | +<xsl:apply-templates select="." mode="tooltip"/> |
| 111 | +</Label> |
| 112 | +</top> |
| 113 | +</xsl:template> |
| 114 | + |
| 115 | +<xsl:template match="j:object" mode="tooltip"> |
| 116 | +<tooltip> |
| 117 | + <Tooltip> |
| 118 | + <xsl:attribute name="text"> |
| 119 | + <xsl:value-of select="j:string[@name='fulltext']"/> |
| 120 | + </xsl:attribute> |
| 121 | + </Tooltip> |
| 122 | +</tooltip> |
| 123 | +</xsl:template> |
| 124 | + |
59 | 125 | </xsl:stylesheet> |
0 commit comments