FileManagerView.fxml
17.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<VBox prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.zhazhapan.util.visual.controller.FileManagerController">
<TabPane fx:id="fileManagerTab" prefHeight="272.0" prefWidth="600.0" side="BOTTOM" tabClosingPolicy="UNAVAILABLE"
VBox.vgrow="ALWAYS">
<Tab closable="false" text="重命名文件">
<SplitPane dividerPositions="0.4816666666666667" prefHeight="160.0" prefWidth="200.0">
<padding>
<Insets bottom="10.0" top="10.0"/>
</padding>
<VBox>
<padding>
<Insets left="10.0" right="10.0"/>
</padding>
<ListView fx:id="selectedFilesOfRenameTab" editable="true"
onDragDropped="#dragFileDropped" onDragOver="#dragFileOver"
prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<contextMenu>
<ContextMenu>
<items>
<MenuItem mnemonicParsing="false"
onAction="#removeFilesFromRenameTab" text="删除"/>
</items>
</ContextMenu>
</contextMenu>
<tooltip>
<Tooltip autoHide="true" text="拖曳文件至此"/>
</tooltip>
</ListView>
</VBox>
<VBox>
<padding>
<Insets left="10.0" right="10.0"/>
</padding>
<TabPane prefHeight="119.0" prefWidth="287.0" tabClosingPolicy="UNAVAILABLE"
VBox.vgrow="NEVER">
<Tab closable="false" text="格式化">
<VBox maxHeight="1.7976931348623157E308" prefHeight="72.0"
prefWidth="287.0">
<padding>
<Insets top="10.0"/>
</padding>
<TextField fx:id="filePrefixOfRenameTab"
onKeyReleased="#generateRenameDestFilesOfFormat"
promptText="文件前缀" VBox.vgrow="NEVER">
<tooltip>
<Tooltip autoHide="true"
text="支持变量:%DATE%, %TIME%"/>
</tooltip>
</TextField>
<HBox prefHeight="100.0" prefWidth="287.0">
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
<TextField fx:id="filePostfixOfRenameTab"
onKeyReleased="#generateRenameDestFilesOfFormat"
prefHeight="27.0" prefWidth="193.0"
promptText="文件后缀" HBox.hgrow="ALWAYS">
<tooltip>
<Tooltip autoHide="true"
text="支持变量:%DATE%, %TIME%"/>
</tooltip>
</TextField>
<TextField fx:id="startNumberOfRenameTab"
onKeyReleased="#generateRenameDestFilesOfFormat"
prefHeight="27.0" prefWidth="107.0"
promptText="开始数字" text="1"
HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
<tooltip>
<Tooltip autoHide="true"
text="支持变量:%DATE%, %TIME%"/>
</tooltip>
</TextField>
</HBox>
</VBox>
</Tab>
<Tab closable="false" text="替换文本">
<VBox>
<padding>
<Insets top="10.0"/>
</padding>
<TextField fx:id="fileQueryStringOfRenameTab"
onKeyReleased="#generateRenameDestFilesOfReplace"
promptText="查找" VBox.vgrow="NEVER"/>
<TextField fx:id="fileReplaceStringOfRenameTab"
onKeyReleased="#generateRenameDestFilesOfReplace"
promptText="替换成" VBox.vgrow="NEVER">
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
<tooltip>
<Tooltip autoHide="true"
text="支持变量:%DATE%, %TIME%"/>
</tooltip>
</TextField>
</VBox>
</Tab>
<Tab closable="false" text="添加文本">
<VBox>
<padding>
<Insets top="10.0"/>
</padding>
<TextField fx:id="fileAddableText"
onKeyReleased="#generateRenameDestFilesOfAddable"
promptText="文本内容" VBox.vgrow="NEVER">
<tooltip>
<Tooltip autoHide="true"
text="支持变量:%DATE%, %TIME%"/>
</tooltip>
</TextField>
<ComboBox fx:id="fileAddableCombo"
maxWidth="1.7976931348623157E308"
prefHeight="27.0" prefWidth="293.0"
VBox.vgrow="NEVER">
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
</ComboBox>
</VBox>
</Tab>
</TabPane>
<ListView fx:id="destFilesOfRenameTab" prefHeight="200.0" prefWidth="200.0"
VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets/>
</VBox.margin>
</ListView>
<Button maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
mnemonicParsing="false" onAction="#renameFiles" prefHeight="27.0"
prefWidth="293.0" text="批量重命名">
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
</Button>
</VBox>
</SplitPane>
</Tab>
<Tab closable="false" text="复制文件">
<VBox prefHeight="200.0" prefWidth="100.0">
<padding>
<Insets left="10.0" right="10.0" top="10.0"/>
</padding>
<HBox VBox.vgrow="NEVER">
<TextField fx:id="destFolderOfCopyTab" onDragDropped="#dragFileDroppedOfCopyTab"
onDragOver="#dragFileOver" promptText="目标文件夹" HBox.hgrow="ALWAYS">
<tooltip>
<Tooltip autoHide="true" text="拖曳文件至此"/>
</tooltip>
</TextField>
<Button mnemonicParsing="false" onAction="#browseSrcFolder" text="浏览"
HBox.hgrow="NEVER">
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
</Button>
</HBox>
<ListView fx:id="selectedFilesOfCopyTab" onDragDropped="#dragFileDroppedOfCopyTab"
onDragOver="#dragFileOver" prefHeight="200.0" prefWidth="200.0"
VBox.vgrow="ALWAYS">
<tooltip>
<Tooltip autoHide="true" text="拖曳文件至此"/>
</tooltip>
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
<contextMenu>
<ContextMenu>
<items>
<MenuItem mnemonicParsing="false" onAction="#removeFilesOfCopyTab"
text="删除"/>
</items>
</ContextMenu>
</contextMenu>
</ListView>
<HBox prefHeight="31.0" prefWidth="580.0" VBox.vgrow="NEVER">
<padding>
<Insets bottom="10.0" top="10.0"/>
</padding>
<CheckBox fx:id="isDeleteSrcOfCopyTab" mnemonicParsing="false" text="删除源文件">
<HBox.margin>
<Insets top="5.0"/>
</HBox.margin>
</CheckBox>
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false"
onAction="#copyFiles" prefHeight="27.0" prefWidth="368.0" text="批量复制文件"
HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
</Button>
</HBox>
</VBox>
</Tab>
<Tab closable="false" text="拆分文件">
<VBox prefHeight="200.0" prefWidth="100.0">
<padding>
<Insets left="10.0" right="10.0" top="10.0"/>
</padding>
<HBox prefHeight="24.0" prefWidth="580.0" VBox.vgrow="NEVER">
<TextField fx:id="destFolderOfSplitTab" onDragDropped="#dragFileDroppedOfSplitTab"
onDragOver="#dragFileOver" promptText="目标文件夹" HBox.hgrow="ALWAYS">
<tooltip>
<Tooltip autoHide="true" text="拖曳文件至此"/>
</tooltip>
</TextField>
<Button mnemonicParsing="false" onAction="#browseSrcFolder" text="浏览"
HBox.hgrow="NEVER">
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
</Button>
</HBox>
<TextArea fx:id="fileContent" onDragDropped="#dragFileDroppedOfSplitTab"
onDragOver="#dragFileOver" onMouseClicked="#generateSplitPoint" prefHeight="200.0"
prefWidth="200.0" promptText="文件内容, 可拖曳文件至此" VBox.vgrow="ALWAYS">
<tooltip>
<Tooltip autoHide="true" text="拖曳文件至此"/>
</tooltip>
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
</TextArea>
<TextField fx:id="splitPoint" onMouseClicked="#scrollTo" promptText="拆分点"
VBox.vgrow="NEVER">
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
</TextField>
<HBox prefHeight="31.0" prefWidth="580.0">
<padding>
<Insets bottom="10.0" top="10.0"/>
</padding>
<CheckBox fx:id="isDeleteSrcOfSplitTab" mnemonicParsing="false" text="删除源文件">
<HBox.margin>
<Insets top="5.0"/>
</HBox.margin>
</CheckBox>
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false"
onAction="#splitFile" prefHeight="27.0" prefWidth="368.0" text="拆分文件"
HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
</Button>
</HBox>
</VBox>
</Tab>
<Tab closable="false" text="合并文件">
<VBox prefHeight="200.0" prefWidth="100.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
</padding>
<ListView fx:id="selectedFilesOfMergeTab" onDragDropped="#dragFileDropped"
onDragOver="#dragFileOver" prefHeight="200.0" prefWidth="200.0"
VBox.vgrow="ALWAYS">
<tooltip>
<Tooltip autoHide="true" text="拖曳文件至此"/>
</tooltip>
<contextMenu>
<ContextMenu>
<items>
<MenuItem mnemonicParsing="false" onAction="#goForward" text="上移"/>
<MenuItem mnemonicParsing="false" onAction="#goBack" text="下移"/>
<MenuItem mnemonicParsing="false" onAction="#removeFilesOfMergeTab"
text="删除"/>
</items>
</ContextMenu>
</contextMenu>
</ListView>
<HBox prefHeight="23.0" prefWidth="580.0">
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
<TextField fx:id="contentFilter" promptText="文本过滤,过滤掉(正则表达式)匹配的字符串"
HBox.hgrow="ALWAYS"/>
<CheckBox fx:id="deleteSrcOfMergeTab" mnemonicParsing="false" text="删除源文件"
HBox.hgrow="NEVER">
<HBox.margin>
<Insets left="10.0" top="5.0"/>
</HBox.margin>
</CheckBox>
<Button mnemonicParsing="false" onAction="#mergeFiles" text="合并文件"
HBox.hgrow="NEVER">
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
</Button>
</HBox>
</VBox>
</Tab>
<Tab text="删除文件">
<VBox>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
</padding>
<TextField fx:id="srcFolderOfDeleteTab" promptText="源文件夹(支持拖曳)" VBox.vgrow="NEVER"
onDragDropped="#dragFileDroppedOfDeleteTab"
onDragOver="#dragFileOver">
<tooltip>
<Tooltip autoHide="true" text="拖曳文件至此"/>
</tooltip>
</TextField>
<TextArea fx:id="filenameOfDeleteTab" prefHeight="200.0" prefWidth="200.0"
promptText="待删除的文件名,用英文逗号分隔" VBox.vgrow="ALWAYS" onDragDropped="#dragFilesDroppedOfDeleteTab"
onDragOver="#dragFileOver">
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
<tooltip>
<Tooltip autoHide="true" text="拖曳文件至此"/>
</tooltip>
</TextArea>
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#deleteFiles"
text="删除文件夹下所有列出的文件" VBox.vgrow="NEVER">
<VBox.margin>
<Insets top="10.0"/>
</VBox.margin>
</Button>
</VBox>
</Tab>
</TabPane>
</VBox>