• R/O
  • SSH
  • HTTPS

pdf-brewer: コミット


コミットメタ情報

リビジョン12 (tree)
日時2020-01-04 12:38:55
作者hirukawa_ryo

ログメッセージ

* pdf-brewer 0.4

変更サマリ

差分

--- pdf-brewer-javafx/trunk/javadoc.css (revision 11)
+++ pdf-brewer-javafx/trunk/javadoc.css (nonexistent)
@@ -1,885 +0,0 @@
1-/*
2- * Javadoc style sheet
3- */
4-
5-/*
6- * 'DejaVu Sans' -> 'Meiryo'
7- * 'DejaVu Serif' -> 'Meiryo'
8- * 'DejaVu Sans Mono' -> 'Meiryo'
9-
10-@import url('resources/fonts/dejavu.css');
11- */
12-
13-/*
14- * Styles for individual HTML elements.
15- *
16- * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular
17- * HTML element throughout the page.
18- */
19-
20-body {
21- background-color:#ffffff;
22- color:#353833;
23- font-family:'Meiryo', Arial, Helvetica, sans-serif;
24- font-size:14px;
25- margin:0;
26- padding:0;
27- height:100%;
28- width:100%;
29-}
30-iframe {
31- margin:0;
32- padding:0;
33- height:100%;
34- width:100%;
35- overflow-y:scroll;
36- border:none;
37-}
38-a:link, a:visited {
39- text-decoration:none;
40- color:#4A6782;
41-}
42-a[href]:hover, a[href]:focus {
43- text-decoration:none;
44- color:#bb7a2a;
45-}
46-a[name] {
47- color:#353833;
48-}
49-a[name]:before, a[name]:target, a[id]:before, a[id]:target {
50- content:"";
51- display:inline-block;
52- position:relative;
53- padding-top:129px;
54- margin-top:-129px;
55-}
56-pre {
57- font-family:'Meiryo', monospace;
58- font-size:14px;
59-}
60-h1 {
61- font-size:20px;
62-}
63-h2 {
64- font-size:18px;
65-}
66-h3 {
67- font-size:16px;
68- font-style:italic;
69-}
70-h4 {
71- font-size:13px;
72-}
73-h5 {
74- font-size:12px;
75-}
76-h6 {
77- font-size:11px;
78-}
79-ul {
80- list-style-type:disc;
81-}
82-code, tt {
83- font-family:'Meiryo', monospace;
84- font-size:14px;
85- padding-top:4px;
86- margin-top:8px;
87- line-height:1.4em;
88-}
89-dt code {
90- font-family:'Meiryo', monospace;
91- font-size:14px;
92- padding-top:4px;
93-}
94-table tr td dt code {
95- font-family:'Meiryo', monospace;
96- font-size:14px;
97- vertical-align:top;
98- padding-top:4px;
99-}
100-sup {
101- font-size:8px;
102-}
103-button {
104- font-family: 'Meiryo', Arial, Helvetica, sans-serif;
105- font-size: 14px;
106-}
107-/*
108- * Styles for HTML generated by javadoc.
109- *
110- * These are style classes that are used by the standard doclet to generate HTML documentation.
111- */
112-
113-/*
114- * Styles for document title and copyright.
115- */
116-.clear {
117- clear:both;
118- height:0px;
119- overflow:hidden;
120-}
121-.aboutLanguage {
122- float:right;
123- padding:0px 21px;
124- font-size:11px;
125- z-index:200;
126- margin-top:-9px;
127-}
128-.legalCopy {
129- margin-left:.5em;
130-}
131-.bar a, .bar a:link, .bar a:visited, .bar a:active {
132- color:#FFFFFF;
133- text-decoration:none;
134-}
135-.bar a:hover, .bar a:focus {
136- color:#bb7a2a;
137-}
138-.tab {
139- background-color:#0066FF;
140- color:#ffffff;
141- padding:8px;
142- width:5em;
143- font-weight:bold;
144-}
145-/*
146- * Styles for navigation bar.
147- */
148-.bar {
149- background-color:#4D7A97;
150- color:#FFFFFF;
151- padding:.8em .5em .4em .8em;
152- height:auto;/*height:1.8em;*/
153- font-size:11px;
154- margin:0;
155-}
156-.navPadding {
157- padding-top: 107px;
158-}
159-.fixedNav {
160- position:fixed;
161- width:100%;
162- z-index:999;
163- background-color:#ffffff;
164-}
165-.topNav {
166- background-color:#4D7A97;
167- color:#FFFFFF;
168- float:left;
169- padding:0;
170- width:100%;
171- clear:right;
172- height:2.8em;
173- padding-top:10px;
174- overflow:hidden;
175- font-size:12px;
176-}
177-.bottomNav {
178- margin-top:10px;
179- background-color:#4D7A97;
180- color:#FFFFFF;
181- float:left;
182- padding:0;
183- width:100%;
184- clear:right;
185- height:2.8em;
186- padding-top:10px;
187- overflow:hidden;
188- font-size:12px;
189-}
190-.subNav {
191- background-color:#dee3e9;
192- float:left;
193- width:100%;
194- overflow:hidden;
195- font-size:12px;
196-}
197-.subNav div {
198- clear:left;
199- float:left;
200- padding:0 0 5px 6px;
201- text-transform:uppercase;
202-}
203-.subNav .navList {
204- padding-top:5px;
205-}
206-ul.navList, ul.subNavList {
207- float:left;
208- margin:0 25px 0 0;
209- padding:0;
210-}
211-ul.navList li{
212- list-style:none;
213- float:left;
214- padding: 5px 6px;
215- text-transform:uppercase;
216-}
217-ul.navListSearch {
218- float:right;
219- margin:0 0 0 0;
220- padding:0;
221-}
222-ul.navListSearch li {
223- list-style:none;
224- float:right;
225- padding: 5px 6px;
226- text-transform:uppercase;
227-}
228-ul.navListSearch li label {
229- position:relative;
230- right:-16px;
231-}
232-ul.subNavList li {
233- list-style:none;
234- float:left;
235- padding-top:10px;
236-}
237-.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
238- color:#FFFFFF;
239- text-decoration:none;
240- text-transform:uppercase;
241-}
242-.topNav a:hover, .bottomNav a:hover {
243- text-decoration:none;
244- color:#bb7a2a;
245- text-transform:uppercase;
246-}
247-.navBarCell1Rev {
248- background-color:#F8981D;
249- color:#253441;
250- margin: auto 5px;
251-}
252-.skipNav {
253- position:absolute;
254- top:auto;
255- left:-9999px;
256- overflow:hidden;
257-}
258-/*
259- * Styles for page header and footer.
260- */
261-.header, .footer {
262- clear:both;
263- margin:0 20px;
264- padding:5px 0 0 0;
265-}
266-.indexNav {
267- position:relative;
268- font-size:12px;
269- background-color:#dee3e9;
270-}
271-.indexNav ul {
272- margin-top:0;
273- padding:5px;
274-}
275-.indexNav ul li {
276- display:inline;
277- list-style-type:none;
278- padding-right:10px;
279- text-transform:uppercase;
280-}
281-.indexNav h1 {
282- font-size:13px;
283-}
284-.title {
285- color:#2c4557;
286- margin:10px 0;
287-}
288-.subTitle {
289- margin:5px 0 0 0;
290-}
291-.header ul {
292- margin:0 0 15px 0;
293- padding:0;
294-}
295-.footer ul {
296- margin:20px 0 5px 0;
297-}
298-.header ul li, .footer ul li {
299- list-style:none;
300- font-size:13px;
301-}
302-/*
303- * Styles for headings.
304- */
305-div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
306- background-color:#dee3e9;
307- border:1px solid #d0d9e0;
308- margin:0 0 6px -8px;
309- padding:7px 5px;
310-}
311-ul.blockList ul.blockList ul.blockList li.blockList h3 {
312- background-color:#dee3e9;
313- border:1px solid #d0d9e0;
314- margin:0 0 6px -8px;
315- padding:7px 5px;
316-}
317-ul.blockList ul.blockList li.blockList h3 {
318- padding:0;
319- margin:15px 0;
320-}
321-ul.blockList li.blockList h2 {
322- padding:0px 0 20px 0;
323-}
324-/*
325- * Styles for page layout containers.
326- */
327-.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer,
328-.allClassesContainer, .allPackagesContainer {
329- clear:both;
330- padding:10px 20px;
331- position:relative;
332-}
333-.indexContainer {
334- margin:10px;
335- position:relative;
336- font-size:12px;
337-}
338-.indexContainer h2 {
339- font-size:13px;
340- padding:0 0 3px 0;
341-}
342-.indexContainer ul {
343- margin:0;
344- padding:0;
345-}
346-.indexContainer ul li {
347- list-style:none;
348- padding-top:2px;
349-}
350-.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
351- font-size:12px;
352- font-weight:bold;
353- margin:10px 0 0 0;
354- color:#4E4E4E;
355-}
356-.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
357- margin:5px 0 10px 0px;
358- font-size:14px;
359- font-family:'Meiryo', Georgia, "Times New Roman", Times, serif;
360-}
361-.serializedFormContainer dl.nameValue dt {
362- margin-left:1px;
363- font-size:1.1em;
364- display:inline;
365- font-weight:bold;
366-}
367-.serializedFormContainer dl.nameValue dd {
368- margin:0 0 0 1px;
369- font-size:1.1em;
370- display:inline;
371-}
372-/*
373- * Styles for lists.
374- */
375-li.circle {
376- list-style:circle;
377-}
378-ul.horizontal li {
379- display:inline;
380- font-size:0.9em;
381-}
382-ul.inheritance {
383- margin:0;
384- padding:0;
385-}
386-ul.inheritance li {
387- display:inline;
388- list-style:none;
389-}
390-ul.inheritance li ul.inheritance {
391- margin-left:15px;
392- padding-left:15px;
393- padding-top:1px;
394-}
395-ul.blockList, ul.blockListLast {
396- margin:10px 0 10px 0;
397- padding:0;
398-}
399-ul.blockList li.blockList, ul.blockListLast li.blockList {
400- list-style:none;
401- margin-bottom:15px;
402- line-height:1.4;
403-}
404-ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
405- padding:0px 20px 5px 10px;
406- border:1px solid #ededed;
407- background-color:#f8f8f8;
408-}
409-ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
410- padding:0 0 5px 8px;
411- background-color:#ffffff;
412- border:none;
413-}
414-ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
415- margin-left:0;
416- padding-left:0;
417- padding-bottom:15px;
418- border:none;
419-}
420-ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
421- list-style:none;
422- border-bottom:none;
423- padding-bottom:0;
424-}
425-table tr td dl, table tr td dl dt, table tr td dl dd {
426- margin-top:0;
427- margin-bottom:1px;
428-}
429-/*
430- * Styles for tables.
431- */
432-.overviewSummary table, .memberSummary table, .typeSummary table, .useSummary table, .constantsSummary table, .deprecatedSummary table,
433-.requiresSummary table, .packagesSummary table, .providesSummary table, .usesSummary table {
434- width:100%;
435- border-spacing:0;
436- border-left:1px solid #EEE;
437- border-right:1px solid #EEE;
438- border-bottom:1px solid #EEE;
439-}
440-.overviewSummary table, .memberSummary table, .requiresSummary table, .packagesSummary table, .providesSummary table, .usesSummary table {
441- padding:0px;
442-}
443-.overviewSummary caption, .memberSummary caption, .typeSummary caption,
444-.useSummary caption, .constantsSummary caption, .deprecatedSummary caption,
445-.requiresSummary caption, .packagesSummary caption, .providesSummary caption, .usesSummary caption {
446- position:relative;
447- text-align:left;
448- background-repeat:no-repeat;
449- color:#253441;
450- font-weight:bold;
451- clear:none;
452- overflow:hidden;
453- padding:0px;
454- padding-top:10px;
455- padding-left:1px;
456- margin:0px;
457- white-space:pre;
458-}
459-.constantsSummary caption a:link, .constantsSummary caption a:visited,
460-.useSummary caption a:link, .useSummary caption a:visited {
461- color:#1f389c;
462-}
463-.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
464-.deprecatedSummary caption a:link,
465-.requiresSummary caption a:link, .packagesSummary caption a:link, .providesSummary caption a:link,
466-.usesSummary caption a:link,
467-.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
468-.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
469-.requiresSummary caption a:hover, .packagesSummary caption a:hover, .providesSummary caption a:hover,
470-.usesSummary caption a:hover,
471-.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
472-.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
473-.requiresSummary caption a:active, .packagesSummary caption a:active, .providesSummary caption a:active,
474-.usesSummary caption a:active,
475-.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
476-.deprecatedSummary caption a:visited,
477-.requiresSummary caption a:visited, .packagesSummary caption a:visited, .providesSummary caption a:visited,
478-.usesSummary caption a:visited {
479- color:#FFFFFF;
480-}
481-.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
482-.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span,
483-.requiresSummary caption span, .packagesSummary caption span, .providesSummary caption span,
484-.usesSummary caption span {
485- white-space:nowrap;
486- padding-top:5px;
487- padding-left:12px;
488- padding-right:12px;
489- padding-bottom:7px;
490- display:inline-block;
491- float:left;
492- background-color:#F8981D;
493- border: none;
494- height:16px;
495-}
496-.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
497-.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd,
498-.requiresSummary .tabEnd, .packagesSummary .tabEnd, .providesSummary .tabEnd, .usesSummary .tabEnd {
499- display:none;
500- width:5px;
501- position:relative;
502- float:left;
503- background-color:#F8981D;
504-}
505-.overviewSummary [role=tablist] button, .memberSummary [role=tablist] button,
506-.typeSummary [role=tablist] button, .packagesSummary [role=tablist] button {
507- border: none;
508- cursor: pointer;
509- padding: 5px 12px 7px 12px;
510- font-weight: bold;
511- margin-right: 3px;
512-}
513-.overviewSummary [role=tablist] .activeTableTab, .memberSummary [role=tablist] .activeTableTab,
514-.typeSummary [role=tablist] .activeTableTab, .packagesSummary [role=tablist] .activeTableTab {
515- background: #F8981D;
516- color: #253441;
517-}
518-.overviewSummary [role=tablist] .tableTab, .memberSummary [role=tablist] .tableTab,
519-.typeSummary [role=tablist] .tableTab, .packagesSummary [role=tablist] .tableTab {
520- background: #4D7A97;
521- color: #FFFFFF;
522-}
523-.rowColor th, .altColor th {
524- font-weight:normal;
525-}
526-.overviewSummary td, .memberSummary td, .typeSummary td,
527-.useSummary td, .constantsSummary td, .deprecatedSummary td,
528-.requiresSummary td, .packagesSummary td, .providesSummary td, .usesSummary td {
529- text-align:left;
530- padding:0px 0px 12px 10px;
531-}
532-th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .useSummary th,
533-.constantsSummary th, .packagesSummary th, td.colFirst, td.colSecond, td.colLast, .useSummary td,
534-.constantsSummary td {
535- vertical-align:top;
536- padding-right:0px;
537- padding-top:8px;
538- padding-bottom:3px;
539-}
540-th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .constantsSummary th,
541-.packagesSummary th {
542- background:#dee3e9;
543- text-align:left;
544- padding:8px 3px 3px 7px;
545-}
546-td.colFirst, th.colFirst {
547- font-size:13px;
548-}
549-td.colSecond, th.colSecond, td.colLast, th.colConstructorName, th.colDeprecatedItemName, th.colLast {
550- font-size:13px;
551-}
552-.constantsSummary th, .packagesSummary th {
553- font-size:13px;
554-}
555-.providesSummary th.colFirst, .providesSummary th.colLast, .providesSummary td.colFirst,
556-.providesSummary td.colLast {
557- white-space:normal;
558- font-size:13px;
559-}
560-.overviewSummary td.colFirst, .overviewSummary th.colFirst,
561-.requiresSummary td.colFirst, .requiresSummary th.colFirst,
562-.packagesSummary td.colFirst, .packagesSummary td.colSecond, .packagesSummary th.colFirst, .packagesSummary th,
563-.usesSummary td.colFirst, .usesSummary th.colFirst,
564-.providesSummary td.colFirst, .providesSummary th.colFirst,
565-.memberSummary td.colFirst, .memberSummary th.colFirst,
566-.memberSummary td.colSecond, .memberSummary th.colSecond, .memberSummary th.colConstructorName,
567-.typeSummary td.colFirst, .typeSummary th.colFirst {
568- vertical-align:top;
569-}
570-.packagesSummary th.colLast, .packagesSummary td.colLast {
571- white-space:normal;
572-}
573-td.colFirst a:link, td.colFirst a:visited,
574-td.colSecond a:link, td.colSecond a:visited,
575-th.colFirst a:link, th.colFirst a:visited,
576-th.colSecond a:link, th.colSecond a:visited,
577-th.colConstructorName a:link, th.colConstructorName a:visited,
578-th.colDeprecatedItemName a:link, th.colDeprecatedItemName a:visited,
579-.constantValuesContainer td a:link, .constantValuesContainer td a:visited,
580-.allClassesContainer td a:link, .allClassesContainer td a:visited,
581-.allPackagesContainer td a:link, .allPackagesContainer td a:visited {
582- font-weight:bold;
583-}
584-.tableSubHeadingColor {
585- background-color:#EEEEFF;
586-}
587-.altColor, .altColor th {
588- background-color:#FFFFFF;
589-}
590-.rowColor, .rowColor th {
591- background-color:#EEEEEF;
592-}
593-/*
594- * Styles for contents.
595- */
596-.description pre {
597- margin-top:0;
598-}
599-.deprecatedContent {
600- margin:0;
601- padding:10px 0;
602-}
603-.docSummary {
604- padding:0;
605-}
606-ul.blockList ul.blockList ul.blockList li.blockList h3 {
607- font-style:normal;
608-}
609-div.block {
610- font-size:14px;
611- font-family:'Meiryo', Georgia, "Times New Roman", Times, serif;
612-}
613-td.colLast div {
614- padding-top:0px;
615-}
616-td.colLast a {
617- padding-bottom:3px;
618-}
619-/*
620- * Styles for formatting effect.
621- */
622-.sourceLineNo {
623- color:green;
624- padding:0 30px 0 0;
625-}
626-h1.hidden {
627- visibility:hidden;
628- overflow:hidden;
629- font-size:10px;
630-}
631-.block {
632- display:block;
633- margin:3px 10px 2px 0px;
634- color:#474747;
635-}
636-.deprecatedLabel, .descfrmTypeLabel, .implementationLabel, .memberNameLabel, .memberNameLink,
637-.moduleLabelInPackage, .moduleLabelInType, .overrideSpecifyLabel, .packageLabelInType,
638-.packageHierarchyLabel, .paramLabel, .returnLabel, .seeLabel, .simpleTagLabel,
639-.throwsLabel, .typeNameLabel, .typeNameLink, .searchTagLink {
640- font-weight:bold;
641-}
642-.deprecationComment, .emphasizedPhrase, .interfaceName {
643- font-style:italic;
644-}
645-.deprecationBlock {
646- font-size:14px;
647- font-family:'Meiryo', Georgia, "Times New Roman", Times, serif;
648- border-style:solid;
649- border-width:thin;
650- border-radius:10px;
651- padding:10px;
652- margin-bottom:10px;
653- margin-right:10px;
654- display:inline-block;
655-}
656-div.block div.deprecationComment, div.block div.block span.emphasizedPhrase,
657-div.block div.block span.interfaceName {
658- font-style:normal;
659-}
660-div.contentContainer ul.blockList li.blockList h2 {
661- padding-bottom:0px;
662-}
663-/*
664- * Styles for IFRAME.
665- */
666-.mainContainer {
667- margin:0 auto;
668- padding:0;
669- height:100%;
670- width:100%;
671- position:fixed;
672- top:0;
673- left:0;
674-}
675-.leftContainer {
676- height:100%;
677- position:fixed;
678- width:320px;
679-}
680-.leftTop {
681- position:relative;
682- float:left;
683- width:315px;
684- top:0;
685- left:0;
686- height:30%;
687- border-right:6px solid #ccc;
688- border-bottom:6px solid #ccc;
689-}
690-.leftBottom {
691- position:relative;
692- float:left;
693- width:315px;
694- bottom:0;
695- left:0;
696- height:70%;
697- border-right:6px solid #ccc;
698- border-top:1px solid #000;
699-}
700-.rightContainer {
701- position:absolute;
702- left:320px;
703- top:0;
704- bottom:0;
705- height:100%;
706- right:0;
707- border-left:1px solid #000;
708-}
709-.rightIframe {
710- margin:0;
711- padding:0;
712- height:100%;
713- right:30px;
714- width:100%;
715- overflow:visible;
716- margin-bottom:30px;
717-}
718-/*
719- * Styles specific to HTML5 elements.
720- */
721-main, nav, header, footer, section {
722- display:block;
723-}
724-/*
725- * Styles for javadoc search.
726- */
727-.ui-autocomplete-category {
728- font-weight:bold;
729- font-size:15px;
730- padding:7px 0 7px 3px;
731- background-color:#4D7A97;
732- color:#FFFFFF;
733-}
734-.resultItem {
735- font-size:13px;
736-}
737-.ui-autocomplete {
738- max-height:85%;
739- max-width:65%;
740- overflow-y:scroll;
741- overflow-x:scroll;
742- white-space:nowrap;
743- box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
744-}
745-ul.ui-autocomplete {
746- position:fixed;
747- z-index:999999;
748-}
749-ul.ui-autocomplete li {
750- float:left;
751- clear:both;
752- width:100%;
753-}
754-.resultHighlight {
755- font-weight:bold;
756-}
757-#search {
758- background-image:url('resources/glass.png');
759- background-size:13px;
760- background-repeat:no-repeat;
761- background-position:2px 3px;
762- padding-left:20px;
763- position:relative;
764- right:-18px;
765- width:400px;
766-}
767-#reset {
768- background-color: rgb(255,255,255);
769- background-image:url('resources/x.png');
770- background-position:center;
771- background-repeat:no-repeat;
772- background-size:12px;
773- border:0 none;
774- width:16px;
775- height:17px;
776- position:relative;
777- left:-4px;
778- top:-4px;
779- font-size:0px;
780-}
781-.watermark {
782- color:#545454;
783-}
784-.searchTagDescResult {
785- font-style:italic;
786- font-size:11px;
787-}
788-.searchTagHolderResult {
789- font-style:italic;
790- font-size:12px;
791-}
792-.searchTagResult:before, .searchTagResult:target {
793- color:red;
794-}
795-.moduleGraph span {
796- display:none;
797- position:absolute;
798-}
799-.moduleGraph:hover span {
800- display:block;
801- margin: -100px 0 0 100px;
802- z-index: 1;
803-}
804-.methodSignature {
805- white-space:normal;
806-}
807-
808-/*
809- * Styles for user-provided tables.
810- *
811- * borderless:
812- * No borders, vertical margins, styled caption.
813- * This style is provided for use with existing doc comments.
814- * In general, borderless tables should not be used for layout purposes.
815- *
816- * plain:
817- * Plain borders around table and cells, vertical margins, styled caption.
818- * Best for small tables or for complex tables for tables with cells that span
819- * rows and columns, when the "striped" style does not work well.
820- *
821- * striped:
822- * Borders around the table and vertical borders between cells, striped rows,
823- * vertical margins, styled caption.
824- * Best for tables that have a header row, and a body containing a series of simple rows.
825- */
826-
827-table.borderless,
828-table.plain,
829-table.striped {
830- margin-top: 10px;
831- margin-bottom: 10px;
832-}
833-table.borderless > caption,
834-table.plain > caption,
835-table.striped > caption {
836- font-weight: bold;
837- font-size: smaller;
838-}
839-table.borderless th, table.borderless td,
840-table.plain th, table.plain td,
841-table.striped th, table.striped td {
842- padding: 2px 5px;
843-}
844-table.borderless,
845-table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th,
846-table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td {
847- border: none;
848-}
849-table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr {
850- background-color: transparent;
851-}
852-table.plain {
853- border-collapse: collapse;
854- border: 1px solid black;
855-}
856-table.plain > thead > tr, table.plain > tbody tr, table.plain > tr {
857- background-color: transparent;
858-}
859-table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th,
860-table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td {
861- border: 1px solid black;
862-}
863-table.striped {
864- border-collapse: collapse;
865- border: 1px solid black;
866-}
867-table.striped > thead {
868- background-color: #E3E3E3;
869-}
870-table.striped > thead > tr > th, table.striped > thead > tr > td {
871- border: 1px solid black;
872-}
873-table.striped > tbody > tr:nth-child(even) {
874- background-color: #EEE
875-}
876-table.striped > tbody > tr:nth-child(odd) {
877- background-color: #FFF
878-}
879-table.striped > tbody > tr > th, table.striped > tbody > tr > td {
880- border-left: 1px solid black;
881- border-right: 1px solid black;
882-}
883-table.striped > tbody > tr > th {
884- font-weight: normal;
885-}
--- pdf-brewer-javafx/trunk/lib/yamlbeans/CREDITS (revision 11)
+++ pdf-brewer-javafx/trunk/lib/yamlbeans/CREDITS (nonexistent)
@@ -1,10 +0,0 @@
1-
2-CREDITS
3--------
4-
5-Kirill Simonov <xi@resolvent.net>
6-For writing the PyYAML3000 YAML parser.
7-
8-Ola Bini <ola@ologix.com>
9-For porting PyYAML3000 to RbYAML and RbYAML to JvYAML.
10-The yamlbeans project is based on the JvYAML tokenizer, parser, and emitter.
--- pdf-brewer-javafx/trunk/lib/yamlbeans/LICENSE (revision 11)
+++ pdf-brewer-javafx/trunk/lib/yamlbeans/LICENSE (nonexistent)
@@ -1,20 +0,0 @@
1-
2-Copyright (c) 2008 Nathan Sweet, Copyright (c) 2006 Ola Bini
3-
4-Permission is hereby granted, free of charge, to any person obtaining a copy of
5-this software and associated documentation files (the "Software"), to deal in
6-the Software without restriction, including without limitation the rights to
7-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8-of the Software, and to permit persons to whom the Software is furnished to do
9-so, subject to the following conditions:
10-
11-The above copyright notice and this permission notice shall be included in all
12-copies or substantial portions of the Software.
13-
14-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20-SOFTWARE.
--- pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/Util.java (revision 11)
+++ pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/Util.java (nonexistent)
@@ -1,66 +0,0 @@
1-package net.osdn.pdf_brewer.ui;
2-
3-import java.awt.SplashScreen;
4-import java.net.URI;
5-import java.net.URISyntaxException;
6-import java.net.URL;
7-import java.nio.file.Path;
8-import java.nio.file.Paths;
9-import java.security.CodeSource;
10-import java.security.ProtectionDomain;
11-import java.time.LocalDateTime;
12-import java.time.ZoneId;
13-import java.time.format.DateTimeParseException;
14-
15-import javafx.animation.KeyFrame;
16-import javafx.animation.Timeline;
17-import javafx.util.Duration;
18-
19-public class Util {
20-
21- public static Path getApplicationPath(Class<?> cls) {
22- try {
23- ProtectionDomain pd = cls.getProtectionDomain();
24- CodeSource cs = pd.getCodeSource();
25- URL location = cs.getLocation();
26- URI uri = location.toURI();
27- Path path = Paths.get(uri);
28- return path.getParent();
29- } catch(URISyntaxException e) {
30- throw new RuntimeException(e);
31- }
32- }
33-
34- public static int[] getApplicationVersion() {
35- String s = System.getProperty("java.application.version");
36- if(s == null || s.trim().length() == 0) {
37- return null;
38- }
39-
40- s = s.trim() + ".0.0.0.0";
41- String[] array = s.split("\\.", 5);
42- int[] version = new int[4];
43- for(int i = 0; i < 4; i++) {
44- try {
45- version[i] = Integer.parseInt(array[i]);
46- } catch(NumberFormatException e) {
47- e.printStackTrace();
48- }
49- }
50- if(version[0] == 0 && version[1] == 0 && version[2] == 0 && version[3] == 0) {
51- return null;
52- }
53- return version;
54- }
55-
56- public static String getApplicationVersionShortString() {
57- int[] v = getApplicationVersion();
58- if(v == null) {
59- return "";
60- } else if(v[2] == 0) {
61- return String.format("%d.%d", v[0], v[1]);
62- } else {
63- return String.format("%d.%d.%d", v[0], v[1]);
64- }
65- }
66-}
--- pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/Datastore.java (nonexistent)
+++ pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/Datastore.java (revision 12)
@@ -0,0 +1,126 @@
1+package net.osdn.pdf_brewer.ui;
2+
3+import java.io.File;
4+import java.io.IOException;
5+import java.io.UncheckedIOException;
6+import java.net.URI;
7+import java.net.URL;
8+import java.nio.file.Files;
9+import java.nio.file.Path;
10+import java.nio.file.Paths;
11+import java.security.CodeSource;
12+import java.security.ProtectionDomain;
13+import java.util.stream.Stream;
14+
15+public class Datastore {
16+
17+ private static Path appDir;
18+ private static Path myDataDir;
19+ private static Boolean isRunningAsUWP;
20+
21+ public static Path getMyDataDirectory(boolean createIfNotExists) throws IOException {
22+ Path dir = getMyDataDirectory();
23+ if(createIfNotExists || !Files.notExists(dir)) {
24+ Files.createDirectories(dir);
25+ }
26+ return dir;
27+ }
28+
29+ public static Path getMyDataDirectory() throws IOException {
30+ if(myDataDir == null) {
31+ String s = System.getenv("APPDATA");
32+ if(s == null) {
33+ throw new IOException("APPDATA環境変数が定義されていないためデータ保存ディレクトリを参照できません。");
34+ }
35+ Path APPDATA = Paths.get(s);
36+ if (Files.isDirectory(APPDATA)) {
37+ myDataDir = APPDATA.resolve("jpki-pdf-signer");
38+ }
39+
40+ // バージョン0.4以前はアプリケーションディレクトリ直下の "mydata" ディレクトリにデータを保存していましたが、
41+ // バージョン0.5以降は環境変数 APPDATA 直下の "jpki-pdf-signer" ディレクトリにデータを保存するように変更しました。
42+ // APPDATA 直下の "jpki-pdf-signer" ディレクトリが存在せず、旧バージョンの "mydata" ディレクトリが存在する場合、
43+ // "mydata" の内容を %APPDATA%/jpki-pdf-signer にコピーします。
44+ if(Files.notExists(myDataDir)) {
45+ Path oldMyDataDir = getApplicationDirectory().resolve("mydata");
46+ if(Files.isDirectory(oldMyDataDir)) {
47+ Files.createDirectory(myDataDir);
48+ try(Stream<Path> files = Files.list(oldMyDataDir)) {
49+ files.forEach(source -> {
50+ try {
51+ Path target = myDataDir.resolve(source.getFileName());
52+ Files.copy(source, target);
53+ } catch(IOException e) {
54+ throw new UncheckedIOException(e);
55+ }
56+ });
57+ }
58+ }
59+ }
60+ }
61+ if(myDataDir == null) {
62+ myDataDir = getApplicationDirectory().resolve("mydata");
63+ }
64+ return myDataDir;
65+ }
66+
67+ public static Path getApplicationDirectory() {
68+ if(appDir == null) {
69+ appDir = getApplicationDirectory(Datastore.class);
70+ }
71+ return appDir;
72+ }
73+
74+ public static Path getApplicationDirectory(Class<?> cls) {
75+ try {
76+ ProtectionDomain pd = cls.getProtectionDomain();
77+ CodeSource cs = pd.getCodeSource();
78+ URL location = cs.getLocation();
79+ URI uri = location.toURI();
80+ Path path = Paths.get(uri);
81+ // IntelliJで実行した場合にプロジェクトディレクトリが返されるように classes/java/main を遡ります。
82+ while(Files.isDirectory(path)) {
83+ if(!"classes/java/main/".contains(path.getFileName().toString() + "/")) {
84+ break;
85+ }
86+ path = path.getParent();
87+ }
88+ return path.getParent().toRealPath();
89+ } catch (Exception e) {
90+ try {
91+ return Paths.get(".").toRealPath();
92+ } catch (IOException e1) {
93+ return new File(".").getAbsoluteFile().toPath();
94+ }
95+ }
96+ }
97+
98+ public static int[] getApplicationVersion() {
99+ String s = System.getProperty("java.application.version");
100+ if(s == null || s.trim().length() == 0) {
101+ return null;
102+ }
103+
104+ s = s.trim() + ".0.0.0.0";
105+ String[] array = s.split("\\.", 5);
106+ int[] version = new int[4];
107+ for(int i = 0; i < 4; i++) {
108+ try {
109+ version[i] = Integer.parseInt(array[i]);
110+ } catch(NumberFormatException e) {
111+ e.printStackTrace();
112+ }
113+ }
114+ if(version[0] == 0 && version[1] == 0 && version[2] == 0 && version[3] == 0) {
115+ return null;
116+ }
117+ return version;
118+ }
119+
120+ public static boolean isRunningAsUWP() {
121+ if(isRunningAsUWP == null) {
122+ isRunningAsUWP = Files.exists(Datastore.getApplicationDirectory().resolve("AppxManifest.xml"));
123+ }
124+ return isRunningAsUWP;
125+ }
126+}
--- pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/DocumentLoader.java (revision 11)
+++ pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/DocumentLoader.java (revision 12)
@@ -78,7 +78,7 @@
7878 }
7979
8080 protected Template getTemplate(String name) throws IOException {
81- Path path = Util.getApplicationPath(getClass());
81+ Path path = Datastore.getApplicationDirectory();
8282 while(path != null) {
8383 Path t = path.resolve("templates");
8484 if(Files.isDirectory(t)) {
--- pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/LogFilter.java (nonexistent)
+++ pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/LogFilter.java (revision 12)
@@ -0,0 +1,270 @@
1+package net.osdn.pdf_brewer.ui;
2+
3+import java.util.HashMap;
4+import java.util.Map;
5+
6+import org.apache.commons.logging.Log;
7+import org.apache.commons.logging.LogConfigurationException;
8+import org.apache.commons.logging.LogFactory;
9+import org.apache.commons.logging.impl.LogFactoryImpl;
10+
11+public class LogFilter extends LogFactory {
12+
13+ public enum Level {
14+ TRACE,
15+ DEBUG,
16+ INFO,
17+ WARN,
18+ ERROR,
19+ FATAL,
20+ OFF
21+ };
22+
23+ private static Map<String, Level> levels = new HashMap<String, Level>();
24+
25+ public static void setLevel(Class<?> clazz, Level level) {
26+ levels.put(clazz.getName(), level);
27+ }
28+
29+ public static void setLevel(String name, Level level) {
30+ levels.put(name, level);
31+ }
32+
33+ private static Level getLevel(String name) {
34+ for(;;) {
35+ Level level = levels.get(name);
36+ if(level != null) {
37+ return level;
38+ }
39+ int i = name.lastIndexOf('.');
40+ if(i == -1) {
41+ return null;
42+ }
43+ name = name.substring(0, i);
44+ }
45+ }
46+
47+
48+ private LogFactory impl;
49+
50+ public LogFilter() {
51+ impl = new LogFactoryImpl();
52+ }
53+
54+ @Override
55+ public Object getAttribute(String name) {
56+ return impl.getAttribute(name);
57+ }
58+
59+ @Override
60+ public String[] getAttributeNames() {
61+ return impl.getAttributeNames();
62+ }
63+
64+ @SuppressWarnings("rawtypes")
65+ @Override
66+ public Log getInstance(Class clazz) throws LogConfigurationException {
67+ Log log = impl.getInstance(clazz);
68+ if(log != null) {
69+ return new Wrapper(log, getLevel(clazz.getName()));
70+ }
71+ return null;
72+ }
73+
74+ @Override
75+ public Log getInstance(String name) throws LogConfigurationException {
76+ Log log = impl.getInstance(name);
77+ if(log != null) {
78+ return new Wrapper(log, getLevel(name));
79+ }
80+ return null;
81+ }
82+
83+ @Override
84+ public void release() {
85+ impl.release();
86+ }
87+
88+ @Override
89+ public void removeAttribute(String name) {
90+ impl.removeAttribute(name);
91+ }
92+
93+ @Override
94+ public void setAttribute(String name, Object value) {
95+ impl.setAttribute(name, value);
96+ }
97+
98+ public static class Wrapper implements Log {
99+
100+ private Log impl;
101+ private boolean isTraceEnabled;
102+ private boolean isDebugEnabled;
103+ private boolean isInfoEnabled;
104+ private boolean isWarnEnabled;
105+ private boolean isErrorEnabled;
106+ private boolean isFatalEnabled;
107+
108+ @SuppressWarnings("fallthrough")
109+ public Wrapper(Log impl, Level level) {
110+ this.impl = impl;
111+
112+ if(level == null) {
113+ level = Level.TRACE;
114+ }
115+ switch(level) {
116+ case TRACE: isTraceEnabled = true;
117+ case DEBUG: isDebugEnabled = true;
118+ case INFO: isInfoEnabled = true;
119+ case WARN: isWarnEnabled = true;
120+ case ERROR: isErrorEnabled = true;
121+ case FATAL: isFatalEnabled = true;
122+ case OFF:
123+ }
124+ }
125+
126+ public Wrapper setTraceEnabled(boolean b) {
127+ isTraceEnabled = b;
128+ return this;
129+ }
130+
131+ public Wrapper setDebugEnabled(boolean b) {
132+ isDebugEnabled = b;
133+ return this;
134+ }
135+
136+ public Wrapper setInfoEnabled(boolean b) {
137+ isInfoEnabled = b;
138+ return this;
139+ }
140+
141+ public Wrapper setWarnEnabled(boolean b) {
142+ isWarnEnabled = b;
143+ return this;
144+ }
145+
146+ public Wrapper setErrorEnabled(boolean b) {
147+ isErrorEnabled = b;
148+ return this;
149+ }
150+
151+ public Wrapper setFatalEnabled(boolean b) {
152+ isFatalEnabled = b;
153+ return this;
154+ }
155+
156+ @Override
157+ public boolean isTraceEnabled() {
158+ return isTraceEnabled && impl.isTraceEnabled();
159+ }
160+
161+ @Override
162+ public boolean isDebugEnabled() {
163+ return isDebugEnabled && impl.isDebugEnabled();
164+ }
165+
166+ @Override
167+ public boolean isInfoEnabled() {
168+ return isInfoEnabled && impl.isInfoEnabled();
169+ }
170+
171+ @Override
172+ public boolean isWarnEnabled() {
173+ return isWarnEnabled && impl.isWarnEnabled();
174+ }
175+
176+ @Override
177+ public boolean isErrorEnabled() {
178+ return isErrorEnabled && impl.isErrorEnabled();
179+ }
180+
181+ @Override
182+ public boolean isFatalEnabled() {
183+ return isFatalEnabled && impl.isFatalEnabled();
184+ }
185+
186+ @Override
187+ public void trace(Object message) {
188+ if(isTraceEnabled) {
189+ impl.trace(message);
190+ }
191+ }
192+
193+ @Override
194+ public void trace(Object message, Throwable t) {
195+ if(isTraceEnabled) {
196+ impl.trace(message, t);
197+ }
198+ }
199+
200+ @Override
201+ public void debug(Object message) {
202+ if(isDebugEnabled) {
203+ impl.debug(message);
204+ }
205+ }
206+
207+ @Override
208+ public void debug(Object message, Throwable t) {
209+ if(isDebugEnabled) {
210+ impl.debug(message, t);
211+ }
212+ }
213+
214+ @Override
215+ public void info(Object message) {
216+ if(isInfoEnabled) {
217+ impl.info(message);
218+ }
219+ }
220+
221+ @Override
222+ public void info(Object message, Throwable t) {
223+ if(isInfoEnabled) {
224+ impl.info(message, t);
225+ }
226+ }
227+
228+ @Override
229+ public void warn(Object message) {
230+ if(isWarnEnabled) {
231+ impl.warn(message);
232+ }
233+ }
234+
235+ @Override
236+ public void warn(Object message, Throwable t) {
237+ if(isWarnEnabled) {
238+ impl.warn(message, t);
239+ }
240+ }
241+
242+ @Override
243+ public void error(Object message) {
244+ if(isErrorEnabled) {
245+ impl.error(message);
246+ }
247+ }
248+
249+ @Override
250+ public void error(Object message, Throwable t) {
251+ if(isErrorEnabled) {
252+ impl.error(message, t);
253+ }
254+ }
255+
256+ @Override
257+ public void fatal(Object message) {
258+ if(isFatalEnabled) {
259+ impl.fatal(message);
260+ }
261+ }
262+
263+ @Override
264+ public void fatal(Object message, Throwable t) {
265+ if(isFatalEnabled) {
266+ impl.fatal(message, t);
267+ }
268+ }
269+ }
270+}
--- pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/Main.java (revision 11)
+++ pdf-brewer-javafx/trunk/src/main/java/net/osdn/pdf_brewer/ui/Main.java (revision 12)
@@ -3,51 +3,55 @@
33 import java.io.File;
44 import java.io.IOException;
55 import java.lang.Thread.UncaughtExceptionHandler;
6-import java.lang.reflect.InvocationTargetException;
76 import java.net.URL;
8-import java.nio.file.Path;
97 import java.util.List;
108 import java.util.ResourceBundle;
11-import java.util.concurrent.CountDownLatch;
12-import java.util.concurrent.atomic.AtomicInteger;
139 import java.util.prefs.Preferences;
1410
11+import javafx.beans.binding.StringBinding;
12+import javafx.beans.property.ObjectProperty;
13+import javafx.beans.property.SimpleObjectProperty;
1514 import net.osdn.util.javafx.application.SingletonApplication;
16-import org.apache.pdfbox.pdmodel.PDDocument;
15+import net.osdn.util.javafx.fxml.Fxml;
16+import net.osdn.util.javafx.scene.control.pdf.Pager;
17+import net.osdn.util.javafx.scene.control.pdf.PdfView;
18+import net.osdn.util.javafx.stage.StageUtil;
1719
18-import javafx.application.Application;
1920 import javafx.application.Platform;
2021 import javafx.beans.binding.Bindings;
21-import javafx.concurrent.Task;
2222 import javafx.event.ActionEvent;
2323 import javafx.fxml.FXML;
24-import javafx.fxml.FXMLLoader;
2524 import javafx.fxml.Initializable;
26-import javafx.geometry.Rectangle2D;
2725 import javafx.scene.Parent;
2826 import javafx.scene.Scene;
29-import javafx.scene.control.Alert;
30-import javafx.scene.control.Alert.AlertType;
3127 import javafx.scene.control.MenuItem;
3228 import javafx.scene.image.Image;
3329 import javafx.scene.input.DragEvent;
3430 import javafx.scene.input.TransferMode;
3531 import javafx.stage.FileChooser;
36-import javafx.stage.FileChooser.ExtensionFilter;
37-import javafx.stage.Screen;
3832 import javafx.stage.Stage;
39-import javafx.stage.WindowEvent;
40-import net.osdn.util.LogFilter;
41-import net.osdn.util.fx.pdf.Pager;
42-import net.osdn.util.fx.pdf.PdfView;
4333 import net.osdn.util.fx.toast.Toast;
4434
4535 public class Main extends SingletonApplication implements Initializable {
4636
37+ public static final String APPLICATION_NAME = "PDF BREWER";
38+ public static final String APPLICATION_VERSION;
39+
4740 static {
48- System.setProperty("org.apache.commons.logging.LogFactory", "net.osdn.util.LogFilter");
41+ System.setProperty("org.apache.commons.logging.LogFactory", "net.osdn.pdf_brewer.ui.LogFilter");
4942 LogFilter.setLevel("org.apache.pdfbox", LogFilter.Level.ERROR);
5043 LogFilter.setLevel("org.apache.fontbox", LogFilter.Level.ERROR);
44+
45+ int[] version = Datastore.getApplicationVersion();
46+ if(version != null) {
47+ if (version[2] == 0) {
48+ APPLICATION_VERSION = String.format("%d.%d", version[0], version[1]);
49+ } else {
50+ APPLICATION_VERSION = String.format("%d.%d.%d", version[0], version[1], version[2]);
51+ }
52+ } else {
53+ APPLICATION_VERSION = "";
54+ }
5155 }
5256
5357 public static void main(String[] args) throws Throwable {
@@ -54,9 +58,6 @@
5458 launch(args);
5559 }
5660
57- private static Preferences preferences = Preferences.userNodeForPackage(Main.class);
58-
59- private Stage primaryStage;
6061 private String title = "PDF BREWER";
6162 private File inputFile;
6263 private File lastSaveFolder;
@@ -63,26 +64,29 @@
6364
6465 @Override
6566 public void start(Stage primaryStage) throws Exception {
66- this.primaryStage = primaryStage;
67-
68- Image icon = new Image(getClass().getResourceAsStream("/img/app-icon-48px.png"));
69- primaryStage.getIcons().add(icon);
70-
71- title = (title + " " + Util.getApplicationVersionShortString()).trim();
72- primaryStage.setTitle(title);
67+ primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/img/app-icon-48px.png")));
68+ primaryStage.titleProperty().bind(new StringBinding() {
69+ {
70+ bind(inputFileProperty);
71+ }
72+ @Override
73+ protected String computeValue() {
74+ return (inputFileProperty.get() != null ? inputFileProperty.get().getAbsolutePath() + " - " : "")
75+ + APPLICATION_NAME + " " + APPLICATION_VERSION;
76+ }
77+ });
7378
74- FXMLLoader loader = new FXMLLoader(getClass().getResource("Main.fxml"));
75- loader.setController(this);
76- Parent root = (Parent)loader.load();
79+ Parent root = Fxml.load(this);
7780
7881 Scene scene = new Scene(root);
79- scene.setOnDragOver(wrap(this::window_onDragOver));
80- scene.setOnDragDropped(wrap(this::window_onDragDropped));
82+ scene.setOnDragOver(wrap(this::scene_onDragOver));
83+ scene.setOnDragDropped(wrap(this::scene_onDragDropped));
8184 scene.getAccelerators().putAll(pager.createDefaultAccelerators());
82-
83- primaryStage.setScene(scene);
85+
86+ StageUtil.setRestorable(primaryStage, Preferences.userNodeForPackage(getClass()));
8487 primaryStage.setMinWidth(320);
8588 primaryStage.setMinHeight(320);
89+ primaryStage.setScene(scene);
8690 primaryStage.show();
8791
8892 Thread.currentThread().setUncaughtExceptionHandler(handler);
@@ -107,6 +111,9 @@
107111 Runnable r = ()-> {
108112 String title = exception.getClass().getName();
109113 String message = exception.getLocalizedMessage();
114+ if(message != null) {
115+ message = message.trim();
116+ }
110117 toast.show(Toast.RED, title, message, null);
111118 };
112119 if(Platform.isFxApplicationThread()) {
@@ -115,116 +122,119 @@
115122 Platform.runLater(r);
116123 }
117124 }
125+
126+ @FXML MenuItem menuFileOpen;
127+ @FXML MenuItem menuFileSave;
128+ @FXML MenuItem menuFileExit;
129+ @FXML Pager pager;
130+ @FXML PdfView pdfView;
131+ @FXML Toast toast;
132+ ObjectProperty<File> inputFileProperty = new SimpleObjectProperty<File>();
118133
119- @FXML private MenuItem menuFileSave;
120- @FXML private Pager pager;
121- @FXML private PdfView pdfView;
122- @FXML private Toast toast;
123-
124134 @Override
125135 public void initialize(URL location, ResourceBundle resources) {
126- primaryStage.setX(preferences.getDouble("stageX", 50.0));
127- primaryStage.setY(preferences.getDouble("stageY", 50.0));
128- primaryStage.setWidth(preferences.getDouble("stageWidth", 384));
129- primaryStage.setHeight(preferences.getDouble("stageHeight", 600));
130- primaryStage.addEventHandler(WindowEvent.WINDOW_SHOWN, event -> {
131- Rectangle2D workarea = Screen.getPrimary().getVisualBounds();
132- double x = preferences.getDouble("stageX", 50.0);
133- if(x + primaryStage.getWidth() > workarea.getMaxX()) {
134- x = workarea.getMaxX() - primaryStage.getWidth();
135- }
136- if(x < workarea.getMinX()) {
137- x = workarea.getMinX();
138- }
139- primaryStage.setX(x);
140- double y = preferences.getDouble("stageY", 50.0);
141- if(y + primaryStage.getHeight() > workarea.getMaxY()) {
142- y = workarea.getMaxY() - primaryStage.getHeight();
143- }
144- if(y < workarea.getMinY()) {
145- y = workarea.getMinY();
146- }
147- primaryStage.setY(y);
148- });
149- primaryStage.xProperty().addListener((observable, oldValue, newValue)-> {
150- preferences.putDouble("stageX", newValue.doubleValue());
151- });
152- primaryStage.yProperty().addListener((observable, oldValue, newValue)-> {
153- preferences.putDouble("stageY", newValue.doubleValue());
154- });
155- primaryStage.widthProperty().addListener((observable, oldValue, newValue)-> {
156- preferences.putDouble("stageWidth", newValue.doubleValue());
157- });
158- primaryStage.heightProperty().addListener((observable, oldValue, newValue)-> {
159- preferences.putDouble("stageHeight", newValue.doubleValue());
160- });
161-
136+
137+ //
138+ // event handlers
139+ //
140+ menuFileOpen.setOnAction(wrap(this::menuFileOpen_onAction));
141+ menuFileSave.setOnAction(wrap(this::menuFileSave_onAction));
142+ menuFileExit.setOnAction(wrap(this::menuFileExit_onAction));
143+
144+ //
145+ // bindings
146+ //
147+ menuFileSave.disableProperty().bind(Bindings.isNull(pdfView.documentProperty()));
148+
162149 pager.maxPageIndexProperty().bind(pdfView.maxPageIndexProperty());
163150 pager.pageIndexProperty().bindBidirectional(pdfView.pageIndexProperty());
164151
165- menuFileSave.disableProperty().bind(Bindings.isNull(pdfView.documentProperty()));
166- toast.maxWidthProperty().bind(primaryStage.widthProperty().subtract(14.0));
152+ toast.maxWidthProperty().bind(getPrimaryStage().widthProperty().subtract(32));
153+ toast.maxHeightProperty().bind(getPrimaryStage().heightProperty().subtract(32));
167154 }
168155
169- protected void open(Path input) {
170- primaryStage.setTitle(input + " - " + title);
171- Task<PDDocument> task = pdfView.load(new DocumentLoader(input));
172- task.setOnFailed(event-> {
173- primaryStage.setTitle(title);
174- showException(event.getSource().getException());
175- });
156+ protected File getFile(DragEvent event) {
157+ if(event.getDragboard().hasFiles()) {
158+ List<File> files = event.getDragboard().getFiles();
159+ if(files.size() == 1) {
160+ return files.get(0);
161+ }
162+ }
163+ return null;
176164 }
177-
178- protected void openFile() {
165+
166+ protected boolean isAcceptable(File file) {
167+ return file != null && file.getName().matches("(?i).+(\\.yml|\\.yaml|\\.pb)");
168+ }
169+
170+ void scene_onDragOver(DragEvent event) {
171+ if(isAcceptable(getFile(event))) {
172+ event.acceptTransferModes(TransferMode.COPY);
173+ } else {
174+ event.consume();
175+ }
176+ }
177+
178+ void scene_onDragDropped(DragEvent event) {
179+ File file = getFile(event);
180+ if(isAcceptable(file)) {
181+ getPrimaryStage().toFront();
182+ toast.hide();
183+ lastSaveFolder = null;
184+ inputFileProperty.set(file);
185+ pdfView.load(new DocumentLoader(file.toPath()));
186+ event.setDropCompleted(true);
187+ }
188+ event.consume();
189+ }
190+
191+ void menuFileOpen_onAction(ActionEvent event) {
192+ toast.hide();
193+ Preferences preferences = Preferences.userNodeForPackage(getClass());
194+
179195 FileChooser fc = new FileChooser();
180196 fc.setTitle("開く");
181- fc.getExtensionFilters().add(new ExtensionFilter("YAML", "*.yml", "*.yaml"));
182- fc.getExtensionFilters().add(new ExtensionFilter("PDF Brewer", "*.pb"));
183- String s = preferences.get("lastOpenFolder", null);
184- if(s != null) {
185- File dir = new File(s);
186- if(dir.exists() && dir.isDirectory()) {
197+ fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("PDF", "*.pdf"));
198+
199+ String lastOpenDirectory = preferences.get("lastOpenDirectory", null);
200+ if(lastOpenDirectory != null) {
201+ File dir = new File(lastOpenDirectory);
202+ if(dir.isDirectory()) {
187203 fc.setInitialDirectory(dir);
188204 }
189205 }
190- File file = fc.showOpenDialog(primaryStage);
206+ File file = fc.showOpenDialog(getPrimaryStage());
191207 if(file != null) {
192- String ext = file.getName().toLowerCase();
193- int i = ext.lastIndexOf('.');
194- if(i >= 0) {
195- ext = ext.substring(i);
208+ preferences.put("lastOpenDirectory", file.getParentFile().getAbsolutePath());
209+ if(isAcceptable(file)) {
210+ toast.hide();
211+ lastSaveFolder = null;
212+ inputFileProperty.set(file);
213+ pdfView.load(new DocumentLoader(file.toPath()));
196214 }
197- if(ext.equals(".yml") || ext.equals(".yaml") || ext.equals(".pb")) {
198- open(file.toPath());
199- }
200- preferences.put("lastOpenFolder", file.getParentFile().getAbsolutePath());
201215 }
202-
203- new Alert(AlertType.WARNING);
204216 }
205-
206- protected void saveFile() throws IOException {
217+
218+ void menuFileSave_onAction(ActionEvent event) throws IOException {
219+ toast.hide();
220+ String defaultName = inputFileProperty.get().getName();
221+ int i = defaultName.lastIndexOf('.');
222+ if(i > 0) {
223+ defaultName = defaultName.substring(0, i);
224+ }
225+ defaultName += ".pdf";
226+
207227 FileChooser fc = new FileChooser();
208228 fc.setTitle("名前を付けて保存");
209- if(lastSaveFolder != null && lastSaveFolder.isDirectory()) {
229+ fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("PDF", "*.pdf"));
230+ if(lastSaveFolder != null) {
210231 fc.setInitialDirectory(lastSaveFolder);
211232 } else {
212- lastSaveFolder = null;
213- if(inputFile != null) {
214- fc.setInitialDirectory(inputFile.getParentFile());
215- }
233+ fc.setInitialDirectory(inputFileProperty.get().getParentFile());
216234 }
217- String defaultName = "output.pdf";
218- if(inputFile != null) {
219- defaultName = inputFile.getName();
220- int i = defaultName.lastIndexOf('.');
221- if(i > 0) {
222- defaultName = defaultName.substring(0, i);
223- }
224- defaultName += ".pdf";
225- }
226235 fc.setInitialFileName(defaultName);
227- File file = fc.showSaveDialog(primaryStage);
236+
237+ File file = fc.showSaveDialog(getPrimaryStage());
228238 if(file != null) {
229239 lastSaveFolder = file.getParentFile();
230240 if(pdfView.getDocument() != null) {
@@ -232,59 +242,9 @@
232242 toast.show(Toast.GREEN, "保存しました", file.getAbsolutePath(), Toast.LONG);
233243 }
234244 }
235-
236- String s = preferences.get("lastSaveFolder", null);
237- if(s != null) {
238- File dir = new File(s);
239- if(dir.exists() && dir.isDirectory()) {
240- fc.setInitialDirectory(dir);
241- }
242- }
243245 }
244-
245- protected Path getDragAcceptable(DragEvent event) {
246- if(event.getDragboard().hasFiles()) {
247- List<File> files = event.getDragboard().getFiles();
248- if(files.size() == 1) {
249- File file = files.get(0);
250- if(file.getName().matches("(?i).+(\\.yml|\\.yaml|\\.pb)")) {
251- return file.toPath();
252- }
253- }
254- }
255- return null;
256- }
257-
258- void window_onDragOver(DragEvent event) {
259- if(getDragAcceptable(event) != null) {
260- event.acceptTransferModes(TransferMode.COPY);
261- } else {
262- event.consume();
263- }
264- }
265-
266- void window_onDragDropped(DragEvent event) {
267- Path path = getDragAcceptable(event);
268- if(path != null) {
269- primaryStage.toFront();
270- open(path);
271- event.setDropCompleted(true);
272- }
273- event.consume();
274- }
275-
276- @FXML
277- protected void menuFileOpen_onAction(ActionEvent event) {
278- openFile();
279- }
280-
281- @FXML
282- protected void menuFileSave_onAction(ActionEvent event) throws IOException {
283- saveFile();
284- }
285246
286- @FXML
287- protected void menuFileExit_onAction(ActionEvent event) {
247+ void menuFileExit_onAction(ActionEvent event) {
288248 Platform.exit();
289249 }
290250 }
--- pdf-brewer-javafx/trunk/src/main/java/net/osdn/util/LogFilter.java (revision 11)
+++ pdf-brewer-javafx/trunk/src/main/java/net/osdn/util/LogFilter.java (nonexistent)
@@ -1,269 +0,0 @@
1-package net.osdn.util;
2-
3-import java.util.HashMap;
4-import java.util.Map;
5-
6-import org.apache.commons.logging.Log;
7-import org.apache.commons.logging.LogConfigurationException;
8-import org.apache.commons.logging.LogFactory;
9-import org.apache.commons.logging.impl.LogFactoryImpl;
10-
11-public class LogFilter extends LogFactory {
12-
13- public enum Level {
14- TRACE,
15- DEBUG,
16- INFO,
17- WARN,
18- ERROR,
19- FATAL,
20- OFF
21- };
22-
23- private static Map<String, Level> levels = new HashMap<String, Level>();
24-
25- public static void setLevel(Class<?> clazz, Level level) {
26- levels.put(clazz.getName(), level);
27- }
28-
29- public static void setLevel(String name, Level level) {
30- levels.put(name, level);
31- }
32-
33- private static Level getLevel(String name) {
34- for(;;) {
35- Level level = levels.get(name);
36- if(level != null) {
37- return level;
38- }
39- int i = name.lastIndexOf('.');
40- if(i == -1) {
41- return null;
42- }
43- name = name.substring(0, i);
44- }
45- }
46-
47-
48- private LogFactory impl;
49-
50- public LogFilter() {
51- impl = new LogFactoryImpl();
52- }
53-
54- @Override
55- public Object getAttribute(String name) {
56- return impl.getAttribute(name);
57- }
58-
59- @Override
60- public String[] getAttributeNames() {
61- return impl.getAttributeNames();
62- }
63-
64- @SuppressWarnings("rawtypes")
65- @Override
66- public Log getInstance(Class clazz) throws LogConfigurationException {
67- Log log = impl.getInstance(clazz);
68- if(log != null) {
69- return new Wrapper(log, getLevel(clazz.getName()));
70- }
71- return null;
72- }
73-
74- @Override
75- public Log getInstance(String name) throws LogConfigurationException {
76- Log log = impl.getInstance(name);
77- if(log != null) {
78- return new Wrapper(log, getLevel(name));
79- }
80- return null;
81- }
82-
83- @Override
84- public void release() {
85- impl.release();
86- }
87-
88- @Override
89- public void removeAttribute(String name) {
90- impl.removeAttribute(name);
91- }
92-
93- @Override
94- public void setAttribute(String name, Object value) {
95- impl.setAttribute(name, value);
96- }
97-
98- public static class Wrapper implements Log {
99-
100- private Log impl;
101- private boolean isTraceEnabled;
102- private boolean isDebugEnabled;
103- private boolean isInfoEnabled;
104- private boolean isWarnEnabled;
105- private boolean isErrorEnabled;
106- private boolean isFatalEnabled;
107-
108- public Wrapper(Log impl, Level level) {
109- this.impl = impl;
110-
111- if(level == null) {
112- level = Level.TRACE;
113- }
114- switch(level) {
115- case TRACE: isTraceEnabled = true;
116- case DEBUG: isDebugEnabled = true;
117- case INFO: isInfoEnabled = true;
118- case WARN: isWarnEnabled = true;
119- case ERROR: isErrorEnabled = true;
120- case FATAL: isFatalEnabled = true;
121- case OFF:
122- }
123- }
124-
125- public Wrapper setTraceEnabled(boolean b) {
126- isTraceEnabled = b;
127- return this;
128- }
129-
130- public Wrapper setDebugEnabled(boolean b) {
131- isDebugEnabled = b;
132- return this;
133- }
134-
135- public Wrapper setInfoEnabled(boolean b) {
136- isInfoEnabled = b;
137- return this;
138- }
139-
140- public Wrapper setWarnEnabled(boolean b) {
141- isWarnEnabled = b;
142- return this;
143- }
144-
145- public Wrapper setErrorEnabled(boolean b) {
146- isErrorEnabled = b;
147- return this;
148- }
149-
150- public Wrapper setFatalEnabled(boolean b) {
151- isFatalEnabled = b;
152- return this;
153- }
154-
155- @Override
156- public boolean isTraceEnabled() {
157- return isTraceEnabled && impl.isTraceEnabled();
158- }
159-
160- @Override
161- public boolean isDebugEnabled() {
162- return isDebugEnabled && impl.isDebugEnabled();
163- }
164-
165- @Override
166- public boolean isInfoEnabled() {
167- return isInfoEnabled && impl.isInfoEnabled();
168- }
169-
170- @Override
171- public boolean isWarnEnabled() {
172- return isWarnEnabled && impl.isWarnEnabled();
173- }
174-
175- @Override
176- public boolean isErrorEnabled() {
177- return isErrorEnabled && impl.isErrorEnabled();
178- }
179-
180- @Override
181- public boolean isFatalEnabled() {
182- return isFatalEnabled && impl.isFatalEnabled();
183- }
184-
185- @Override
186- public void trace(Object message) {
187- if(isTraceEnabled) {
188- impl.trace(message);
189- }
190- }
191-
192- @Override
193- public void trace(Object message, Throwable t) {
194- if(isTraceEnabled) {
195- impl.trace(message, t);
196- }
197- }
198-
199- @Override
200- public void debug(Object message) {
201- if(isDebugEnabled) {
202- impl.debug(message);
203- }
204- }
205-
206- @Override
207- public void debug(Object message, Throwable t) {
208- if(isDebugEnabled) {
209- impl.debug(message, t);
210- }
211- }
212-
213- @Override
214- public void info(Object message) {
215- if(isInfoEnabled) {
216- impl.info(message);
217- }
218- }
219-
220- @Override
221- public void info(Object message, Throwable t) {
222- if(isInfoEnabled) {
223- impl.info(message, t);
224- }
225- }
226-
227- @Override
228- public void warn(Object message) {
229- if(isWarnEnabled) {
230- impl.warn(message);
231- }
232- }
233-
234- @Override
235- public void warn(Object message, Throwable t) {
236- if(isWarnEnabled) {
237- impl.warn(message, t);
238- }
239- }
240-
241- @Override
242- public void error(Object message) {
243- if(isErrorEnabled) {
244- impl.error(message);
245- }
246- }
247-
248- @Override
249- public void error(Object message, Throwable t) {
250- if(isErrorEnabled) {
251- impl.error(message, t);
252- }
253- }
254-
255- @Override
256- public void fatal(Object message) {
257- if(isFatalEnabled) {
258- impl.fatal(message);
259- }
260- }
261-
262- @Override
263- public void fatal(Object message, Throwable t) {
264- if(isFatalEnabled) {
265- impl.fatal(message, t);
266- }
267- }
268- }
269-}
旧リポジトリブラウザで表示