├── .idea
├── libraries
│ └── hamcrest_core_1_3.xml
├── misc.xml
├── modules.xml
├── uiDesigner.xml
└── vcs.xml
├── LICENSE
├── README.md
├── SSD_Viewer
├── .DS_Store
├── .idea
│ ├── libraries
│ │ ├── jfreechart_1_0_19_demo.xml
│ │ └── lib.xml
│ ├── misc.xml
│ ├── modules.xml
│ ├── uiDesigner.xml
│ ├── vcs.xml
│ └── workspace.xml
├── SSD_Viewer.iml
├── jfreechart-1.0.19
│ ├── ChangeLog
│ ├── NEWS
│ ├── README.txt
│ ├── ant
│ │ ├── build-fx.xml
│ │ ├── build-swt.xml
│ │ └── build.xml
│ ├── checkstyle
│ │ ├── javadocs.xml
│ │ ├── lines.xml
│ │ ├── properties.txt
│ │ ├── style.xml
│ │ └── whitespace.xml
│ ├── docfiles
│ │ ├── AreaRendererSample.png
│ │ ├── BarRenderer3DSample.png
│ │ ├── BarRendererSample.png
│ │ ├── BoxAndWhiskerRendererSample.png
│ │ ├── CandleStickRendererSample.png
│ │ ├── CategoryStepRendererSample.png
│ │ ├── ClusteredXYBarRendererSample.png
│ │ ├── DeviationRendererSample.png
│ │ ├── DialPlotSample.png
│ │ ├── GanttRendererSample.png
│ │ ├── GroupedStackedBarRendererSample.png
│ │ ├── HighLowRendererSample.png
│ │ ├── IntervalBarRendererSample.png
│ │ ├── LayeredBarRendererSample.png
│ │ ├── LevelRendererSample.png
│ │ ├── LineAndShapeRendererSample.png
│ │ ├── LineRenderer3DSample.png
│ │ ├── MinMaxCategoryRendererSample.png
│ │ ├── PiePlotSample.png
│ │ ├── ScatterRendererSample.png
│ │ ├── StackedAreaRendererSample.png
│ │ ├── StackedBarRenderer3DSample.png
│ │ ├── StackedBarRendererSample.png
│ │ ├── StackedXYAreaRenderer2Sample.png
│ │ ├── StackedXYAreaRendererSample.png
│ │ ├── StackedXYBarRendererSample.png
│ │ ├── StatisticalBarRendererSample.png
│ │ ├── StatisticalLineRendererSample.png
│ │ ├── VectorRendererSample.png
│ │ ├── WaterfallBarRendererSample.png
│ │ ├── WindItemRendererSample.png
│ │ ├── XYAreaRenderer2Sample.png
│ │ ├── XYAreaRendererSample.png
│ │ ├── XYBarRendererSample.png
│ │ ├── XYBlockRendererSample.png
│ │ ├── XYBoxAndWhiskerRendererSample.png
│ │ ├── XYBubbleRendererSample.png
│ │ ├── XYDifferenceRendererSample.png
│ │ ├── XYDotRendererSample.png
│ │ ├── XYErrorRendererSample.png
│ │ ├── XYLineAndShapeRendererSample.png
│ │ ├── XYShapeRendererSample.png
│ │ ├── XYSplineRendererSample.png
│ │ ├── XYStepAreaRendererSample.png
│ │ ├── XYStepRendererSample.png
│ │ └── YIntervalRendererSample.png
│ ├── experimental
│ │ └── org
│ │ │ └── jfree
│ │ │ └── experimental
│ │ │ └── chart
│ │ │ ├── demo
│ │ │ ├── CombinedCategoryPlotDemo1.java
│ │ │ └── CombinedXYPlotDemo1.java
│ │ │ ├── plot
│ │ │ ├── CombinedCategoryPlot.java
│ │ │ └── CombinedXYPlot.java
│ │ │ └── renderer
│ │ │ └── xy
│ │ │ └── XYSmoothLineAndShapeRenderer.java
│ ├── jfreechart-1.0.19-demo.jar
│ ├── jfreechart-1.0.19.iml
│ ├── lib
│ │ ├── hamcrest-core-1.3.jar
│ │ ├── jcommon-1.0.23.jar
│ │ ├── jfreechart-1.0.19-experimental.jar
│ │ ├── jfreechart-1.0.19-swt.jar
│ │ ├── jfreechart-1.0.19.jar
│ │ ├── jfreesvg-2.0.jar
│ │ ├── junit-4.11.jar
│ │ ├── orsoncharts-1.4-eval-nofx.jar
│ │ ├── orsonpdf-1.6-eval.jar
│ │ ├── servlet.jar
│ │ └── swtgraphics2d.jar
│ ├── licence-LGPL.txt
│ ├── pom.xml
│ └── swt
│ │ ├── README
│ │ └── org
│ │ └── jfree
│ │ └── experimental
│ │ ├── chart
│ │ └── swt
│ │ │ ├── ChartComposite.java
│ │ │ ├── ChartPrintJob.java
│ │ │ ├── demo
│ │ │ ├── SWTBarChartDemo1.java
│ │ │ ├── SWTMultipleAxisDemo1.java
│ │ │ ├── SWTPieChartDemo1.java
│ │ │ └── SWTTimeSeriesDemo.java
│ │ │ └── editor
│ │ │ ├── SWTAxisEditor.java
│ │ │ ├── SWTChartEditor.java
│ │ │ ├── SWTNumberAxisEditor.java
│ │ │ ├── SWTOtherEditor.java
│ │ │ ├── SWTPlotAppearanceEditor.java
│ │ │ ├── SWTPlotEditor.java
│ │ │ ├── SWTStrokeCanvas.java
│ │ │ └── SWTTitleEditor.java
│ │ └── swt
│ │ ├── SWTGraphics2D.java
│ │ ├── SWTPaintCanvas.java
│ │ └── SWTUtils.java
├── out
│ └── production
│ │ └── SSD_Viewer
│ │ ├── com
│ │ └── intellij
│ │ │ └── uiDesigner
│ │ │ └── core
│ │ │ ├── AbstractLayout.class
│ │ │ ├── DimensionInfo.class
│ │ │ ├── GridConstraints.class
│ │ │ ├── GridLayoutManager.class
│ │ │ ├── HorizontalInfo.class
│ │ │ ├── LayoutState.class
│ │ │ ├── Spacer.class
│ │ │ ├── SupportCode$TextWithMnemonic.class
│ │ │ ├── SupportCode.class
│ │ │ ├── Util.class
│ │ │ └── VerticalInfo.class
│ │ └── skku
│ │ └── edu
│ │ ├── Main.class
│ │ ├── MappingTable$1.class
│ │ ├── MappingTable.class
│ │ ├── PBA_distribution$1.class
│ │ ├── PBA_distribution$2.class
│ │ ├── PBA_distribution.class
│ │ ├── PBAtable$1.class
│ │ ├── PBAtable.class
│ │ ├── PieChart$1.class
│ │ ├── PieChart.class
│ │ ├── SSDGUIFORM$1.class
│ │ ├── SSDGUIFORM$2.class
│ │ ├── SSDGUIFORM$3.class
│ │ ├── SSDGUIFORM$4.class
│ │ ├── SSDGUIFORM$5.class
│ │ ├── SSDGUIFORM$6.class
│ │ ├── SSDGUIFORM$JListHandler.class
│ │ ├── SSDGUIFORM.class
│ │ └── filenames.txt
└── src
│ ├── .DS_Store
│ └── skku
│ ├── .DS_Store
│ └── edu
│ ├── Main.java
│ ├── MappingTable.form
│ ├── MappingTable.java
│ ├── PBA_distribution.form
│ ├── PBA_distribution.java
│ ├── PBAtable.form
│ ├── PBAtable.java
│ ├── PieChart.form
│ ├── PieChart.java
│ ├── SSDGUIFORM.form
│ ├── SSDGUIFORM.java
│ └── filenames.txt
├── fibmap.c
├── iterator.c
└── output.txt
/.idea/libraries/hamcrest_core_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/uiDesigner.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 FlashSQL-SKKU
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SSDViewerGUI
2 | This is a project for VLDB@SKKU for displaying SSD's Stats
3 |
4 | ## How to run iterator.c
5 | gcc iterator.c -o iterator
6 |
7 | sudo ./iterator _directoryname_
8 |
9 |
--------------------------------------------------------------------------------
/SSD_Viewer/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/.DS_Store
--------------------------------------------------------------------------------
/SSD_Viewer/.idea/libraries/jfreechart_1_0_19_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/SSD_Viewer/.idea/libraries/lib.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/SSD_Viewer/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/SSD_Viewer/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SSD_Viewer/.idea/uiDesigner.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/SSD_Viewer/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/SSD_Viewer/SSD_Viewer.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/ant/build-swt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 |
28 |
29 |
30 |
31 |
38 |
39 |
40 |
41 |
42 |
43 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
55 |
56 |
57 |
58 |
59 |
60 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/checkstyle/javadocs.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/checkstyle/lines.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/checkstyle/properties.txt:
--------------------------------------------------------------------------------
1 | checkstyle.allow.tabs no
2 | checkstyle.maxlinelen 100
3 | checkstyle.maxparameters 20
4 | checkstyle.rcurly alone
5 | checkstyle.ignore.public.in.interface yes
6 | checkstyle.javadoc.checkUnusedThrows yes
7 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/checkstyle/style.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
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 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/checkstyle/whitespace.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
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 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/AreaRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/AreaRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/BarRenderer3DSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/BarRenderer3DSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/BarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/BarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/BoxAndWhiskerRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/BoxAndWhiskerRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/CandleStickRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/CandleStickRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/CategoryStepRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/CategoryStepRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/ClusteredXYBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/ClusteredXYBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/DeviationRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/DeviationRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/DialPlotSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/DialPlotSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/GanttRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/GanttRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/GroupedStackedBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/GroupedStackedBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/HighLowRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/HighLowRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/IntervalBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/IntervalBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/LayeredBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/LayeredBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/LevelRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/LevelRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/LineAndShapeRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/LineAndShapeRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/LineRenderer3DSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/LineRenderer3DSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/MinMaxCategoryRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/MinMaxCategoryRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/PiePlotSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/PiePlotSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/ScatterRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/ScatterRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedAreaRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedAreaRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedBarRenderer3DSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedBarRenderer3DSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedXYAreaRenderer2Sample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedXYAreaRenderer2Sample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedXYAreaRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedXYAreaRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedXYBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/StackedXYBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/StatisticalBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/StatisticalBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/StatisticalLineRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/StatisticalLineRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/VectorRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/VectorRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/WaterfallBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/WaterfallBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/WindItemRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/WindItemRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYAreaRenderer2Sample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYAreaRenderer2Sample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYAreaRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYAreaRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYBarRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYBarRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYBlockRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYBlockRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYBoxAndWhiskerRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYBoxAndWhiskerRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYBubbleRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYBubbleRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYDifferenceRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYDifferenceRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYDotRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYDotRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYErrorRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYErrorRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYLineAndShapeRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYLineAndShapeRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYShapeRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYShapeRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYSplineRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYSplineRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYStepAreaRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYStepAreaRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/XYStepRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/XYStepRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/docfiles/YIntervalRendererSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/docfiles/YIntervalRendererSample.png
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/experimental/org/jfree/experimental/chart/demo/CombinedCategoryPlotDemo1.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * ------------------------------
28 | * CombinedCategoryPlotDemo1.java
29 | * ------------------------------
30 | * (C) Copyright 2008, by Object Refinery Limited and Contributors.
31 | *
32 | * Original Author: David Gilbert (for Object Refinery Limited);
33 | * Contributor(s): ;
34 | *
35 | * Changes
36 | * -------
37 | * 05-May-2008 : Version 1 (DG);
38 | *
39 | */
40 |
41 | package org.jfree.experimental.chart.demo;
42 |
43 | import java.awt.Font;
44 |
45 | import javax.swing.JPanel;
46 |
47 | import org.jfree.chart.ChartPanel;
48 | import org.jfree.chart.JFreeChart;
49 | import org.jfree.chart.axis.CategoryAxis;
50 | import org.jfree.chart.axis.NumberAxis;
51 | import org.jfree.chart.labels.StandardCategoryToolTipGenerator;
52 | import org.jfree.chart.plot.CategoryPlot;
53 | import org.jfree.chart.renderer.category.BarRenderer;
54 | import org.jfree.chart.renderer.category.LineAndShapeRenderer;
55 | import org.jfree.data.category.CategoryDataset;
56 | import org.jfree.data.category.DefaultCategoryDataset;
57 | import org.jfree.experimental.chart.plot.CombinedCategoryPlot;
58 | import org.jfree.ui.ApplicationFrame;
59 | import org.jfree.ui.RefineryUtilities;
60 |
61 | /**
62 | * A demo for the {@link CombinedCategoryPlot} class.
63 | */
64 | public class CombinedCategoryPlotDemo1 extends ApplicationFrame {
65 |
66 | /**
67 | * Creates a new demo instance.
68 | *
69 | * @param title the frame title.
70 | */
71 | public CombinedCategoryPlotDemo1(String title) {
72 | super(title);
73 | JPanel chartPanel = createDemoPanel();
74 | chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
75 | setContentPane(chartPanel);
76 | }
77 |
78 | /**
79 | * Creates a dataset.
80 | *
81 | * @return A dataset.
82 | */
83 | public static CategoryDataset createDataset1() {
84 | DefaultCategoryDataset result = new DefaultCategoryDataset();
85 | String series1 = "First";
86 | String series2 = "Second";
87 | String type1 = "Type 1";
88 | String type2 = "Type 2";
89 | String type3 = "Type 3";
90 | String type4 = "Type 4";
91 | String type5 = "Type 5";
92 | String type6 = "Type 6";
93 | String type7 = "Type 7";
94 | String type8 = "Type 8";
95 |
96 | result.addValue(1.0, series1, type1);
97 | result.addValue(4.0, series1, type2);
98 | result.addValue(3.0, series1, type3);
99 | result.addValue(5.0, series1, type4);
100 | result.addValue(5.0, series1, type5);
101 | result.addValue(7.0, series1, type6);
102 | result.addValue(7.0, series1, type7);
103 | result.addValue(8.0, series1, type8);
104 |
105 | result.addValue(5.0, series2, type1);
106 | result.addValue(7.0, series2, type2);
107 | result.addValue(6.0, series2, type3);
108 | result.addValue(8.0, series2, type4);
109 | result.addValue(4.0, series2, type5);
110 | result.addValue(4.0, series2, type6);
111 | result.addValue(2.0, series2, type7);
112 | result.addValue(1.0, series2, type8);
113 |
114 | return result;
115 | }
116 |
117 | /**
118 | * Creates a dataset.
119 | *
120 | * @return A dataset.
121 | */
122 | public static CategoryDataset createDataset2() {
123 |
124 | DefaultCategoryDataset result = new DefaultCategoryDataset();
125 |
126 | String series1 = "Third";
127 | String series2 = "Fourth";
128 |
129 | String type1 = "Type 1";
130 | String type2 = "Type 2";
131 | String type3 = "Type 3";
132 | String type4 = "Type 4";
133 | String type5 = "Type 5";
134 | String type6 = "Type 6";
135 | String type7 = "Type 7";
136 | String type8 = "Type 8";
137 |
138 | result.addValue(11.0, series1, type1);
139 | result.addValue(14.0, series1, type2);
140 | result.addValue(13.0, series1, type3);
141 | result.addValue(15.0, series1, type4);
142 | result.addValue(15.0, series1, type5);
143 | result.addValue(17.0, series1, type6);
144 | result.addValue(17.0, series1, type7);
145 | result.addValue(18.0, series1, type8);
146 |
147 | result.addValue(15.0, series2, type1);
148 | result.addValue(17.0, series2, type2);
149 | result.addValue(16.0, series2, type3);
150 | result.addValue(18.0, series2, type4);
151 | result.addValue(14.0, series2, type5);
152 | result.addValue(14.0, series2, type6);
153 | result.addValue(12.0, series2, type7);
154 | result.addValue(11.0, series2, type8);
155 |
156 | return result;
157 |
158 | }
159 |
160 | /**
161 | * Creates a chart.
162 | *
163 | * @return A chart.
164 | */
165 | private static JFreeChart createChart() {
166 |
167 | CategoryDataset dataset1 = createDataset1();
168 | NumberAxis rangeAxis1 = new NumberAxis("Value");
169 | rangeAxis1.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
170 | LineAndShapeRenderer renderer1 = new LineAndShapeRenderer();
171 | renderer1.setBaseToolTipGenerator(
172 | new StandardCategoryToolTipGenerator());
173 | CategoryPlot subplot1 = new CategoryPlot(dataset1, null, rangeAxis1,
174 | renderer1);
175 | subplot1.setDomainGridlinesVisible(true);
176 |
177 | CategoryDataset dataset2 = createDataset2();
178 | NumberAxis rangeAxis2 = new NumberAxis("Value");
179 | rangeAxis2.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
180 | BarRenderer renderer2 = new BarRenderer();
181 | renderer2.setBaseToolTipGenerator(
182 | new StandardCategoryToolTipGenerator());
183 | CategoryPlot subplot2 = new CategoryPlot(dataset2, null, rangeAxis2,
184 | renderer2);
185 | subplot2.setDomainGridlinesVisible(true);
186 |
187 | CategoryAxis domainAxis = new CategoryAxis("Category");
188 | CombinedCategoryPlot plot = new CombinedCategoryPlot(
189 | domainAxis, new NumberAxis("Range"));
190 | plot.add(subplot1, 2);
191 | plot.add(subplot2, 1);
192 |
193 | JFreeChart result = new JFreeChart(
194 | "Combined Domain Category Plot Demo",
195 | new Font("SansSerif", Font.BOLD, 12), plot, true);
196 | return result;
197 |
198 | }
199 |
200 | /**
201 | * Creates a panel for the demo (used by SuperDemo.java).
202 | *
203 | * @return A panel.
204 | */
205 | public static JPanel createDemoPanel() {
206 | JFreeChart chart = createChart();
207 | return new ChartPanel(chart);
208 | }
209 |
210 | /**
211 | * Starting point for the demonstration application.
212 | *
213 | * @param args ignored.
214 | */
215 | public static void main(String[] args) {
216 | String title = "Combined Category Plot Demo 1";
217 | CombinedCategoryPlotDemo1 demo = new CombinedCategoryPlotDemo1(title);
218 | demo.pack();
219 | RefineryUtilities.centerFrameOnScreen(demo);
220 | demo.setVisible(true);
221 | }
222 |
223 | }
224 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/experimental/org/jfree/experimental/chart/plot/CombinedCategoryPlot.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * -------------------------
28 | * CombinedCategoryPlot.java
29 | * -------------------------
30 | * (C) Copyright 2008, by Richard West and Contributors.
31 | *
32 | * Original Author: Richard West, Advanced Micro Devices, Inc.;
33 | * Contributor(s): David Gilbert (for Object Refinery Limited);
34 | *
35 | * Changes
36 | * -------
37 | * 02-Feb-2007 : Version 1, contributed by Richard West - see
38 | * patch 1924543 (DG);
39 | *
40 | */
41 |
42 | package org.jfree.experimental.chart.plot;
43 |
44 | import java.util.Iterator;
45 |
46 | import org.jfree.chart.axis.CategoryAxis;
47 | import org.jfree.chart.axis.ValueAxis;
48 | import org.jfree.chart.plot.CategoryPlot;
49 | import org.jfree.chart.plot.CombinedDomainCategoryPlot;
50 | import org.jfree.data.Range;
51 |
52 | /**
53 | * A specialised form of {@link CombinedDomainCategoryPlot} where the
54 | * subplots share not only the same x-axis, but also the same y-axis.
55 | */
56 | public class CombinedCategoryPlot extends CombinedDomainCategoryPlot {
57 |
58 | /**
59 | * Creates a new instance with the specified axes.
60 | *
61 | * @param domainAxis the x-axis.
62 | * @param rangeAxis the y-axis.
63 | */
64 | public CombinedCategoryPlot (CategoryAxis domainAxis, ValueAxis rangeAxis) {
65 | super(domainAxis);
66 | super.setGap(10.0);
67 | super.setRangeAxis(rangeAxis);
68 | }
69 |
70 | /**
71 | * Adds a new subplot with weight 1
.
72 | *
73 | * @param subplot the subplot.
74 | */
75 | public void add(CategoryPlot subplot) {
76 | this.add(subplot, 1);
77 | }
78 |
79 | /**
80 | * Adds a new subplot with the specified weight.
81 | *
82 | * @param subplot the subplot.
83 | * @param weight the weight for the subplot.
84 | */
85 | public void add(CategoryPlot subplot, int weight) {
86 | super.add(subplot, weight);
87 |
88 | ValueAxis l_range = super.getRangeAxis();
89 | subplot.setRangeAxis(0, l_range, false);
90 |
91 | super.setRangeAxis(l_range);
92 | if (null == l_range) {
93 | return;
94 | }
95 |
96 | l_range.configure();
97 | }
98 |
99 | /**
100 | * Returns the bounds of the data values that will be plotted against
101 | * the specified axis.
102 | *
103 | * @param axis the axis.
104 | *
105 | * @return The bounds.
106 | */
107 | public Range getDataRange(ValueAxis axis) {
108 | Range l_result = null;
109 | Iterator l_itr = getSubplots().iterator();
110 | while (l_itr.hasNext()) {
111 | CategoryPlot l_subplot = (CategoryPlot) l_itr.next();
112 |
113 | l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
114 | }
115 | return l_result;
116 | }
117 |
118 | /**
119 | * Sets the range axis that is shared by all the subplots.
120 | *
121 | * @param axis the axis.
122 | */
123 | public void setRangeAxis(ValueAxis axis) {
124 | Iterator l_itr = getSubplots().iterator();
125 | while (l_itr.hasNext()) {
126 | CategoryPlot l_subplot = (CategoryPlot) l_itr.next();
127 | l_subplot.setRangeAxis(0, axis, false);
128 | }
129 |
130 | super.setRangeAxis(axis);
131 | if (null == axis) {
132 | return;
133 | }
134 |
135 | axis.configure();
136 | }
137 | }
138 |
139 |
140 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/experimental/org/jfree/experimental/chart/plot/CombinedXYPlot.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * -------------------
28 | * CombinedXYPlot.java
29 | * -------------------
30 | * (C) Copyright 2008, by Richard West and Contributors.
31 | *
32 | * Original Author: Richard West, Advanced Micro Devices, Inc.;
33 | * Contributor(s): David Gilbert (for Object Refinery Limited);
34 | *
35 | * Changes
36 | * -------
37 | * 05-May-2008 : Version 1, contributed by Richard West - see
38 | * patch 1924543 (DG);
39 | *
40 | */
41 |
42 | package org.jfree.experimental.chart.plot;
43 |
44 | import java.util.Iterator;
45 |
46 | import org.jfree.chart.axis.ValueAxis;
47 | import org.jfree.chart.plot.CombinedDomainCategoryPlot;
48 | import org.jfree.chart.plot.CombinedDomainXYPlot;
49 | import org.jfree.chart.plot.XYPlot;
50 | import org.jfree.data.Range;
51 |
52 | /**
53 | * A specialised form of {@link CombinedDomainCategoryPlot} where the
54 | * subplots share not only the same x-axis, but also the same y-axis.
55 | */
56 | public class CombinedXYPlot extends CombinedDomainXYPlot {
57 |
58 | /**
59 | * Creates a new instance with the specified axes.
60 | *
61 | * @param domainAxis the x-axis.
62 | * @param rangeAxis the y-axis.
63 | */
64 | public CombinedXYPlot(ValueAxis domainAxis, ValueAxis rangeAxis) {
65 | super(domainAxis);
66 | super.setGap(10.0);
67 | super.setRangeAxis(rangeAxis);
68 | }
69 |
70 | /**
71 | * Adds a new subplot with weight 1
.
72 | *
73 | * @param subplot the subplot.
74 | */
75 | public void add(XYPlot subplot) {
76 | this.add(subplot, 1);
77 | }
78 |
79 | /**
80 | * Adds a new subplot with the specified weight.
81 | *
82 | * @param subplot the subplot.
83 | * @param weight the weight for the subplot.
84 | */
85 | public void add(XYPlot subplot, int weight) {
86 | super.add(subplot, weight);
87 |
88 | ValueAxis l_range = super.getRangeAxis();
89 | subplot.setRangeAxis(0, l_range, false);
90 |
91 | super.setRangeAxis(l_range);
92 | if (null == l_range) {
93 | return;
94 | }
95 |
96 | l_range.configure();
97 | }
98 |
99 | /**
100 | * Returns the bounds of the data values that will be plotted against
101 | * the specified axis.
102 | *
103 | * @param axis the axis.
104 | *
105 | * @return The bounds.
106 | */
107 | public Range getDataRange(ValueAxis axis) {
108 | Range l_result = null;
109 | Iterator l_itr = getSubplots().iterator();
110 | while (l_itr.hasNext()) {
111 | XYPlot l_subplot = (XYPlot) l_itr.next();
112 |
113 | l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
114 | }
115 | return l_result;
116 | }
117 |
118 | /**
119 | * Sets the range axis that is shared by all the subplots.
120 | *
121 | * @param axis the axis.
122 | */
123 | public void setRangeAxis(ValueAxis axis) {
124 | Iterator l_itr = getSubplots().iterator();
125 | while (l_itr.hasNext()) {
126 | XYPlot l_subplot = (XYPlot) l_itr.next();
127 | l_subplot.setRangeAxis(0, axis, false);
128 | }
129 |
130 | super.setRangeAxis(axis);
131 | if (null == axis) {
132 | return;
133 | }
134 |
135 | axis.configure();
136 | }
137 |
138 | }
139 |
140 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/jfreechart-1.0.19-demo.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/jfreechart-1.0.19-demo.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/jfreechart-1.0.19.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/hamcrest-core-1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/hamcrest-core-1.3.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/jcommon-1.0.23.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/jcommon-1.0.23.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/jfreechart-1.0.19-experimental.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/jfreechart-1.0.19-experimental.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/jfreechart-1.0.19-swt.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/jfreechart-1.0.19-swt.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/jfreechart-1.0.19.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/jfreechart-1.0.19.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/jfreesvg-2.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/jfreesvg-2.0.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/junit-4.11.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/junit-4.11.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/orsoncharts-1.4-eval-nofx.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/orsoncharts-1.4-eval-nofx.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/orsonpdf-1.6-eval.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/orsonpdf-1.6-eval.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/servlet.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/servlet.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/lib/swtgraphics2d.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/jfreechart-1.0.19/lib/swtgraphics2d.jar
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/README:
--------------------------------------------------------------------------------
1 | EXPERIMENTAL SWT CODE FOR JFREECHART
2 | ------------------------------------
3 |
4 | 07 November 2006
5 |
6 | SWT is the Java Standard Widget Toolkit [1], an open source (released under the
7 | Eclipse Public License) and portable library to create user interfaces. The
8 | SWT interfaces will use native widget on any operating system it supports.
9 |
10 | This code provide support for using the JFreeChart library directly into
11 | SWT Composites. Note that there is the alternative to use the SWT_AWT class
12 | but it will run only with SUN JRE and Java 1.5 (and it is not native, so
13 | potentially much slower).
14 |
15 | To compile this code, you will need to link it against the swt.jar of the
16 | target os. Indeed while the API is totally cross platform, the implementation
17 | is platform dependent since it calls on native widget if available (much
18 | faster) and only rely on a Java implementation if it is not. An ant script:
19 | build-swt.xml is provided to help you build the code. This file contains two
20 | compile targets to build the following jar:
21 |
22 | * swtgraphics2d.jar - The generic classes not JFreeChart specific.
23 | * jfreechart-1.0.x-swt.jar - The specific JFreeChart SWT classes.
24 |
25 | To get a successful build id pretty straightforward, download the SWT library
26 | from eclipse.org [1]. Unpack the archive in the JFreeChart tree as libswt.
27 | If you need to build for multiple OS, put all the SWT in there. For instance
28 | (with SWT version 3.2):
29 |
30 | libswt
31 | |
32 | `--swt-linux-gtk-x86
33 | | |
34 | | `--swt.jar
35 | | `--libswt-gtk-3232.so
36 | | `-- etc...
37 | `--swt-win32-win32-x86
38 | |
39 | `--swt.jar
40 | `--swt-win32-3232.dll
41 |
42 | Then you need to edit the build-swt.xml script and change line 14 to what is
43 | needed. Of course all of the paths are relative. You can change it to whatever
44 | you like provided the path in the xml file is correct. Then just run:
45 |
46 | ant -buildfile build-swt.xml
47 |
48 | [1] http://www.eclipse.org/swt/
49 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/ChartPrintJob.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * ------------------
28 | * ChartPrintJob.java
29 | * ------------------
30 | * (C) Copyright 2012, by Jonas Rüttimann.
31 | *
32 | * Original Author: Jonas Rüttimann;
33 | * Contributor(s): -
34 | *
35 | * Changes
36 | * -------
37 | * 05-Jul-2012 : Version 1, from bug 2963199 (JR);
38 | *
39 | */
40 |
41 | package org.jfree.experimental.chart.swt;
42 |
43 | import org.eclipse.swt.graphics.GC;
44 | import org.eclipse.swt.graphics.Image;
45 | import org.eclipse.swt.graphics.Point;
46 | import org.eclipse.swt.graphics.Rectangle;
47 | import org.eclipse.swt.printing.PrintDialog;
48 | import org.eclipse.swt.printing.Printer;
49 | import org.eclipse.swt.printing.PrinterData;
50 | import org.eclipse.swt.widgets.Composite;
51 |
52 | /**
53 | * Printer job for SWT.
54 | */
55 | public class ChartPrintJob {
56 |
57 | /**
58 | * Border on the paper not to print on (in inches)
59 | */
60 | private static final double BORDER = 0.8;
61 |
62 | private String jobName;
63 |
64 | /**
65 | * Creates a new job.
66 | *
67 | * @param jobName this will be the name of the print job or the default
68 | * name of the file (if printed to a file).
69 | */
70 | public ChartPrintJob(String jobName) {
71 | this.jobName = jobName;
72 | }
73 |
74 | /**
75 | * Prints the specified element.
76 | *
77 | * @param elementToPrint the {@link Composite} to be printed.
78 | */
79 | public void print(Composite elementToPrint) {
80 | PrintDialog dialog = new PrintDialog(elementToPrint.getShell());
81 | PrinterData printerData = dialog.open();
82 | if (printerData == null) {
83 | return; // Anwender hat abgebrochen.
84 | }
85 | startPrintJob(elementToPrint, printerData);
86 | }
87 |
88 | protected void startPrintJob(Composite elementToPrint,
89 | PrinterData printerData) {
90 | Printer printer = new Printer(printerData);
91 | try {
92 | printer.startJob(jobName);
93 |
94 | GC gc = new GC(printer);
95 | try {
96 | Rectangle printArea = getPrintableArea(printer, BORDER);
97 | printer.startPage();
98 | printComposite(elementToPrint, gc, printArea);
99 | printer.endPage();
100 | } finally {
101 | gc.dispose();
102 | }
103 | printer.endJob();
104 |
105 | } finally {
106 | printer.dispose();
107 | }
108 | }
109 |
110 | /**
111 | * @param printer
112 | * @param safetyBorder
113 | * @return the rectangle in pixels to print on (and which is also supported
114 | * by the printer hardware)
115 | */
116 | private Rectangle getPrintableArea(Printer printer, double safetyBorder) {
117 | int safetyBorderWidth = (int) (safetyBorder * printer.getDPI().x);
118 | int safetyBorderHeight = (int) (safetyBorder * printer.getDPI().y);
119 |
120 | Rectangle trim = printer.computeTrim(0, 0, 0, 0);
121 | int trimLeft = -trim.x;
122 | int trimTop = -trim.y;
123 | int trimRight = trim.x + trim.width;
124 | int trimBottom = trim.y + trim.height;
125 |
126 | int marginLeft = Math.max(trimLeft, safetyBorderWidth);
127 | int marginRight = Math.max(trimRight, safetyBorderWidth);
128 | int marginTop = Math.max(trimTop, safetyBorderHeight);
129 | int marginBottom = Math.max(trimBottom, safetyBorderHeight);
130 |
131 | int availWidth = printer.getClientArea().width - marginLeft
132 | - marginRight;
133 | int availHeight = printer.getClientArea().height - marginTop
134 | - marginBottom;
135 | return new Rectangle(marginLeft, marginTop, availWidth, availHeight);
136 | }
137 |
138 | private void printComposite(Composite elementToPrint, GC gc,
139 | Rectangle printArea) {
140 | Image image = new Image(elementToPrint.getDisplay(),
141 | elementToPrint.getSize().x, elementToPrint.getSize().y);
142 | try {
143 | GC imageGC = new GC(image);
144 | try {
145 | elementToPrint.print(imageGC);
146 | Point fittedSize = calcFittedSize(printArea,
147 | elementToPrint.getSize());
148 | gc.drawImage(image, 0, 0, elementToPrint.getSize().x,
149 | elementToPrint.getSize().y, printArea.x, printArea.y,
150 | fittedSize.x, fittedSize.y);
151 |
152 | } finally {
153 | imageGC.dispose();
154 | }
155 | } finally {
156 | image.dispose();
157 | }
158 | }
159 |
160 | /**
161 | * The object to print should be scaled up or down to fit horizontally and
162 | * vertically the available space.
163 | *
164 | * @param printArea
165 | * @param originalSize
166 | *
167 | * @return the fitted size of the object to print
168 | */
169 | Point calcFittedSize(Rectangle printArea, Point originalSize) {
170 | double scaleFactor = Math.min(
171 | (double) printArea.height / originalSize.y,
172 | (double) printArea.width / originalSize.x);
173 | int trgHeight = (int) Math.ceil(originalSize.y * scaleFactor);
174 | int trgWidth = (int) Math.ceil(originalSize.x * scaleFactor);
175 | return new Point(trgWidth, trgHeight);
176 | }
177 |
178 | }
179 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/demo/SWTBarChartDemo1.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * ---------------------
28 | * SWTBarChartDemo1.java
29 | * ---------------------
30 | * (C) Copyright 2006-2008, by Object Refinery Limited and Contributors.
31 | *
32 | * Original Author: David Gilbert (for Object Refinery Limited);
33 | * Contributor(s): Henry Proudhon (henry.proudhon AT ensmp.fr).
34 | *
35 | * Changes
36 | * -------
37 | * 23-Aug-2006 : New class (DG);
38 | *
39 | */
40 |
41 | package org.jfree.experimental.chart.swt.demo;
42 |
43 | import org.eclipse.swt.SWT;
44 | import org.eclipse.swt.layout.FillLayout;
45 | import org.eclipse.swt.widgets.Display;
46 | import org.eclipse.swt.widgets.Shell;
47 | import org.jfree.chart.ChartFactory;
48 | import org.jfree.chart.JFreeChart;
49 | import org.jfree.chart.axis.CategoryAxis;
50 | import org.jfree.chart.axis.CategoryLabelPositions;
51 | import org.jfree.chart.axis.NumberAxis;
52 | import org.jfree.chart.plot.CategoryPlot;
53 | import org.jfree.chart.plot.PlotOrientation;
54 | import org.jfree.chart.renderer.category.BarRenderer;
55 | import org.jfree.chart.renderer.category.StandardBarPainter;
56 | import org.jfree.data.category.CategoryDataset;
57 | import org.jfree.data.category.DefaultCategoryDataset;
58 | import org.jfree.experimental.chart.swt.ChartComposite;
59 |
60 | /**
61 | * An SWT demo.
62 | */
63 | public class SWTBarChartDemo1 {
64 |
65 | /**
66 | * Returns a sample dataset.
67 | *
68 | * @return The dataset.
69 | */
70 | private static CategoryDataset createDataset() {
71 |
72 | // row keys...
73 | String series1 = "First";
74 | String series2 = "Second";
75 | String series3 = "Third";
76 |
77 | // column keys...
78 | String category1 = "Category 1";
79 | String category2 = "Category 2";
80 | String category3 = "Category 3";
81 | String category4 = "Category 4";
82 | String category5 = "Category 5";
83 |
84 | // create the dataset...
85 | DefaultCategoryDataset dataset = new DefaultCategoryDataset();
86 |
87 | dataset.addValue(1.0, series1, category1);
88 | dataset.addValue(4.0, series1, category2);
89 | dataset.addValue(3.0, series1, category3);
90 | dataset.addValue(5.0, series1, category4);
91 | dataset.addValue(5.0, series1, category5);
92 |
93 | dataset.addValue(5.0, series2, category1);
94 | dataset.addValue(7.0, series2, category2);
95 | dataset.addValue(6.0, series2, category3);
96 | dataset.addValue(8.0, series2, category4);
97 | dataset.addValue(4.0, series2, category5);
98 |
99 | dataset.addValue(4.0, series3, category1);
100 | dataset.addValue(3.0, series3, category2);
101 | dataset.addValue(2.0, series3, category3);
102 | dataset.addValue(3.0, series3, category4);
103 | dataset.addValue(6.0, series3, category5);
104 |
105 | return dataset;
106 |
107 | }
108 |
109 | /**
110 | * Creates a sample chart.
111 | *
112 | * @param dataset the dataset.
113 | *
114 | * @return The chart.
115 | */
116 | private static JFreeChart createChart(CategoryDataset dataset) {
117 |
118 | // create the chart...
119 | JFreeChart chart = ChartFactory.createBarChart(
120 | "SWTBarChartDemo1", // chart title
121 | "Category", // domain axis label
122 | "Value", // range axis label
123 | dataset, // data
124 | PlotOrientation.VERTICAL, // orientation
125 | true, // include legend
126 | true, // tooltips?
127 | false // URLs?
128 | );
129 |
130 | // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
131 |
132 | // get a reference to the plot for further customisation...
133 | CategoryPlot plot = (CategoryPlot) chart.getPlot();
134 |
135 | // set the range axis to display integers only...
136 | NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
137 | rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
138 |
139 | // disable bar outlines...
140 | BarRenderer renderer = (BarRenderer) plot.getRenderer();
141 | renderer.setDrawBarOutline(false);
142 |
143 | // the SWTGraphics2D class doesn't handle GradientPaint well, so
144 | // replace the gradient painter from the default theme with a
145 | // standard painter...
146 | renderer.setBarPainter(new StandardBarPainter());
147 |
148 | CategoryAxis domainAxis = plot.getDomainAxis();
149 | domainAxis.setCategoryLabelPositions(
150 | CategoryLabelPositions.createUpRotationLabelPositions(
151 | Math.PI / 6.0));
152 | // OPTIONAL CUSTOMISATION COMPLETED.
153 |
154 | return chart;
155 |
156 | }
157 |
158 | /**
159 | * Starting point for the demonstration application.
160 | *
161 | * @param args ignored.
162 | */
163 | public static void main(String[] args) {
164 | JFreeChart chart = createChart(createDataset());
165 | Display display = new Display();
166 | Shell shell = new Shell(display);
167 | shell.setSize(600, 300);
168 | shell.setLayout(new FillLayout());
169 | shell.setText("Test for jfreechart running with SWT");
170 | ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart,
171 | true);
172 | frame.pack();
173 | shell.open();
174 | while (!shell.isDisposed()) {
175 | if (!display.readAndDispatch())
176 | display.sleep();
177 | }
178 | }
179 |
180 | }
181 |
182 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/demo/SWTMultipleAxisDemo1.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * -------------------------
28 | * SWTMultipleAxisDemo1.java
29 | * -------------------------
30 | * (C) Copyright 2006-2009, by Object Refinery Limited and Contributors.
31 | *
32 | * Original Author: David Gilbert (for Object Refinery Limited);
33 | * Contributor(s): Henry Proudhon;
34 | *
35 | * Changes
36 | * -------
37 | * 23-Aug-2006 : New class (HP);
38 | *
39 | */
40 |
41 | package org.jfree.experimental.chart.swt.demo;
42 |
43 | import java.awt.Color;
44 |
45 | import javax.swing.JPanel;
46 |
47 | import org.eclipse.swt.SWT;
48 | import org.eclipse.swt.layout.FillLayout;
49 | import org.eclipse.swt.widgets.Display;
50 | import org.eclipse.swt.widgets.Shell;
51 | import org.jfree.chart.ChartFactory;
52 | import org.jfree.chart.ChartPanel;
53 | import org.jfree.chart.JFreeChart;
54 | import org.jfree.chart.axis.AxisLocation;
55 | import org.jfree.chart.axis.NumberAxis;
56 | import org.jfree.chart.plot.PlotOrientation;
57 | import org.jfree.chart.plot.XYPlot;
58 | import org.jfree.chart.renderer.xy.StandardXYItemRenderer;
59 | import org.jfree.chart.renderer.xy.XYItemRenderer;
60 | import org.jfree.chart.title.TextTitle;
61 | import org.jfree.data.time.Minute;
62 | import org.jfree.data.time.RegularTimePeriod;
63 | import org.jfree.data.time.TimeSeries;
64 | import org.jfree.data.time.TimeSeriesCollection;
65 | import org.jfree.data.xy.XYDataset;
66 | import org.jfree.experimental.chart.swt.ChartComposite;
67 | import org.jfree.ui.RectangleInsets;
68 |
69 | /**
70 | * This demo shows a time series chart that has multiple range axes.
71 | */
72 | public class SWTMultipleAxisDemo1
73 | {
74 | /**
75 | * Creates the demo chart.
76 | *
77 | * @return The chart.
78 | */
79 | private static JFreeChart createChart() {
80 |
81 | XYDataset dataset1 = createDataset("Series 1", 100.0, new Minute(),
82 | 200);
83 |
84 | JFreeChart chart = ChartFactory.createTimeSeriesChart(
85 | "Multiple Axis Demo 3",
86 | "Time of Day",
87 | "Primary Range Axis",
88 | dataset1,
89 | true,
90 | true,
91 | false
92 | );
93 |
94 | chart.setBackgroundPaint(Color.white);
95 | chart.setBorderVisible(true);
96 | chart.setBorderPaint(Color.BLACK);
97 | TextTitle subtitle = new TextTitle("Four datasets and four range axes.");
98 | chart.addSubtitle(subtitle);
99 | XYPlot plot = (XYPlot) chart.getPlot();
100 | plot.setOrientation(PlotOrientation.VERTICAL);
101 | plot.setBackgroundPaint(Color.lightGray);
102 | plot.setDomainGridlinePaint(Color.white);
103 | plot.setRangeGridlinePaint(Color.white);
104 |
105 | plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
106 | XYItemRenderer renderer = plot.getRenderer();
107 | renderer.setSeriesPaint(0, Color.black);
108 |
109 | // AXIS 2
110 | NumberAxis axis2 = new NumberAxis("Range Axis 2");
111 | axis2.setAutoRangeIncludesZero(false);
112 | axis2.setLabelPaint(Color.red);
113 | axis2.setTickLabelPaint(Color.red);
114 | plot.setRangeAxis(1, axis2);
115 | plot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_LEFT);
116 |
117 | XYDataset dataset2 = createDataset("Series 2", 1000.0, new Minute(),
118 | 170);
119 | plot.setDataset(1, dataset2);
120 | plot.mapDatasetToRangeAxis(1, 1);
121 | XYItemRenderer renderer2 = new StandardXYItemRenderer();
122 | renderer2.setSeriesPaint(0, Color.red);
123 | plot.setRenderer(1, renderer2);
124 |
125 | // AXIS 3
126 | NumberAxis axis3 = new NumberAxis("Range Axis 3");
127 | axis3.setLabelPaint(Color.blue);
128 | axis3.setTickLabelPaint(Color.blue);
129 | //axis3.setPositiveArrowVisible(true);
130 | plot.setRangeAxis(2, axis3);
131 |
132 | XYDataset dataset3 = createDataset("Series 3", 10000.0, new Minute(),
133 | 170);
134 | plot.setDataset(2, dataset3);
135 | plot.mapDatasetToRangeAxis(2, 2);
136 | XYItemRenderer renderer3 = new StandardXYItemRenderer();
137 | renderer3.setSeriesPaint(0, Color.blue);
138 | plot.setRenderer(2, renderer3);
139 |
140 | // AXIS 4
141 | NumberAxis axis4 = new NumberAxis("Range Axis 4");
142 | axis4.setLabelPaint(Color.green);
143 | axis4.setTickLabelPaint(Color.green);
144 | plot.setRangeAxis(3, axis4);
145 |
146 | XYDataset dataset4 = createDataset("Series 4", 25.0, new Minute(), 200);
147 | plot.setDataset(3, dataset4);
148 | plot.mapDatasetToRangeAxis(3, 3);
149 |
150 | XYItemRenderer renderer4 = new StandardXYItemRenderer();
151 | renderer4.setSeriesPaint(0, Color.green);
152 | plot.setRenderer(3, renderer4);
153 |
154 | return chart;
155 | }
156 |
157 | /**
158 | * Creates a sample dataset.
159 | *
160 | * @param name the dataset name.
161 | * @param base the starting value.
162 | * @param start the starting period.
163 | * @param count the number of values to generate.
164 | *
165 | * @return The dataset.
166 | */
167 | private static XYDataset createDataset(String name, double base,
168 | RegularTimePeriod start, int count) {
169 |
170 | TimeSeries series = new TimeSeries(name);
171 | RegularTimePeriod period = start;
172 | double value = base;
173 | for (int i = 0; i < count; i++) {
174 | series.add(period, value);
175 | period = period.next();
176 | value = value * (1 + (Math.random() - 0.495) / 10.0);
177 | }
178 |
179 | TimeSeriesCollection dataset = new TimeSeriesCollection();
180 | dataset.addSeries(series);
181 |
182 | return dataset;
183 |
184 | }
185 |
186 | /**
187 | * Creates a panel for the demo (used by SuperDemo.java).
188 | *
189 | * @return A panel.
190 | */
191 | public static JPanel createDemoPanel() {
192 | JFreeChart chart = createChart();
193 | return new ChartPanel(chart);
194 | }
195 |
196 | /**
197 | * Starting point for the demonstration application.
198 | *
199 | * @param args ignored.
200 | */
201 | public static void main(String[] args)
202 | {
203 | final JFreeChart chart = createChart();
204 | final Display display = new Display();
205 | Shell shell = new Shell(display);
206 | shell.setSize(600, 300);
207 | shell.setLayout(new FillLayout());
208 | shell.setText("Test for jfreechart running with SWT");
209 | ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
210 | frame.setDisplayToolTips(false);
211 | frame.setHorizontalAxisTrace(true);
212 | frame.setVerticalAxisTrace(true);
213 | shell.open();
214 | while (!shell.isDisposed()) {
215 | if (!display.readAndDispatch())
216 | display.sleep();
217 | }
218 | }
219 |
220 | }
221 |
222 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/demo/SWTPieChartDemo1.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * ---------------------
28 | * SWTPieChartDemo1.java
29 | * ---------------------
30 | * (C) Copyright 2006, by Object Refinery Limited and Contributors.
31 | *
32 | * Original Author: David Gilbert (for Object Refinery Limited);
33 | * Contributor(s):
34 | *
35 | * Changes
36 | * -------
37 | * 23-Aug-2006 : New class (DG);
38 | *
39 | */
40 |
41 | package org.jfree.experimental.chart.swt.demo;
42 |
43 | import java.awt.Font;
44 |
45 | import org.eclipse.swt.SWT;
46 | import org.eclipse.swt.layout.FillLayout;
47 | import org.eclipse.swt.widgets.Display;
48 | import org.eclipse.swt.widgets.Shell;
49 | import org.jfree.chart.ChartFactory;
50 | import org.jfree.chart.JFreeChart;
51 | import org.jfree.chart.plot.PiePlot;
52 | import org.jfree.data.general.DefaultPieDataset;
53 | import org.jfree.data.general.PieDataset;
54 | import org.jfree.experimental.chart.swt.ChartComposite;
55 |
56 | /**
57 | * This demo shows a time series chart that has multiple range axes.
58 | */
59 | public class SWTPieChartDemo1 {
60 |
61 | /**
62 | * Creates a sample dataset.
63 | *
64 | * @return A sample dataset.
65 | */
66 | private static PieDataset createDataset() {
67 | DefaultPieDataset dataset = new DefaultPieDataset();
68 | dataset.setValue("One", new Double(43.2));
69 | dataset.setValue("Two", new Double(10.0));
70 | dataset.setValue("Three", new Double(27.5));
71 | dataset.setValue("Four", new Double(17.5));
72 | dataset.setValue("Five", new Double(11.0));
73 | dataset.setValue("Six", new Double(19.4));
74 | return dataset;
75 | }
76 |
77 | /**
78 | * Creates a chart.
79 | *
80 | * @param dataset the dataset.
81 | *
82 | * @return A chart.
83 | */
84 | private static JFreeChart createChart(PieDataset dataset) {
85 |
86 | JFreeChart chart = ChartFactory.createPieChart(
87 | "Pie Chart Demo 1", // chart title
88 | dataset, // data
89 | true, // include legend
90 | true,
91 | false
92 | );
93 |
94 | PiePlot plot = (PiePlot) chart.getPlot();
95 | plot.setSectionOutlinesVisible(false);
96 | plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
97 | plot.setNoDataMessage("No data available");
98 | plot.setCircular(false);
99 | plot.setLabelGap(0.02);
100 | return chart;
101 |
102 | }
103 |
104 | /**
105 | * Starting point for the demonstration application.
106 | *
107 | * @param args ignored.
108 | */
109 | public static void main(String[] args)
110 | {
111 | JFreeChart chart = createChart(createDataset());
112 | Display display = new Display();
113 | Shell shell = new Shell(display);
114 | shell.setSize(600, 400);
115 | shell.setLayout(new FillLayout());
116 | shell.setText("Test for jfreechart running with SWT");
117 | final ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
118 | //frame.setDisplayToolTips(false);
119 | frame.pack();
120 | shell.open();
121 | while (!shell.isDisposed()) {
122 | if (!display.readAndDispatch())
123 | display.sleep();
124 | }
125 | }
126 |
127 | }
128 |
129 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/demo/SWTTimeSeriesDemo.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * ---------------------
28 | * SWTTimeSeriesDemo.java
29 | * ---------------------
30 | * (C) Copyright 2006-2009, by Object Refinery Limited and Contributors.
31 | *
32 | * Original Author: David Gilbert (for Object Refinery Limited);
33 | * Contributor(s): Henry Proudhon (henry.proudhon AT ensmp.fr);
34 | *
35 | * Changes
36 | * -------
37 | * 30-Jan-2007 : New class derived from TimeSeriesDemo.java (HP);
38 | *
39 | */
40 | package org.jfree.experimental.chart.swt.demo;
41 |
42 | import java.awt.Color;
43 | import java.text.SimpleDateFormat;
44 |
45 | import org.eclipse.swt.SWT;
46 | import org.eclipse.swt.layout.FillLayout;
47 | import org.eclipse.swt.widgets.Display;
48 | import org.eclipse.swt.widgets.Shell;
49 | import org.jfree.chart.ChartFactory;
50 | import org.jfree.chart.JFreeChart;
51 | import org.jfree.chart.axis.DateAxis;
52 | import org.jfree.chart.plot.XYPlot;
53 | import org.jfree.chart.renderer.xy.XYItemRenderer;
54 | import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
55 | import org.jfree.data.time.Month;
56 | import org.jfree.data.time.TimeSeries;
57 | import org.jfree.data.time.TimeSeriesCollection;
58 | import org.jfree.data.xy.XYDataset;
59 | import org.jfree.experimental.chart.swt.ChartComposite;
60 | import org.jfree.ui.RectangleInsets;
61 |
62 | /**
63 | * An example of a time series chart. For the most part, default settings are
64 | * used, except that the renderer is modified to show filled shapes (as well as
65 | * lines) at each data point.
66 | */
67 | public class SWTTimeSeriesDemo
68 | {
69 |
70 | /**
71 | * Creates a chart.
72 | *
73 | * @param dataset a dataset.
74 | *
75 | * @return A chart.
76 | */
77 | private static JFreeChart createChart(XYDataset dataset) {
78 |
79 | JFreeChart chart = ChartFactory.createTimeSeriesChart(
80 | "Legal & General Unit Trust Prices", // title
81 | "Date", // x-axis label
82 | "Price Per Unit", // y-axis label
83 | dataset, // data
84 | true, // create legend?
85 | true, // generate tooltips?
86 | false // generate URLs?
87 | );
88 |
89 | chart.setBackgroundPaint(Color.white);
90 |
91 | XYPlot plot = (XYPlot) chart.getPlot();
92 | plot.setBackgroundPaint(Color.lightGray);
93 | plot.setDomainGridlinePaint(Color.white);
94 | plot.setRangeGridlinePaint(Color.white);
95 | plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
96 | plot.setDomainCrosshairVisible(true);
97 | plot.setRangeCrosshairVisible(true);
98 |
99 | XYItemRenderer r = plot.getRenderer();
100 | if (r instanceof XYLineAndShapeRenderer) {
101 | XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;
102 | renderer.setBaseShapesVisible(true);
103 | renderer.setBaseShapesFilled(true);
104 | }
105 |
106 | DateAxis axis = (DateAxis) plot.getDomainAxis();
107 | axis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));
108 |
109 | return chart;
110 |
111 | }
112 |
113 | /**
114 | * Creates a dataset, consisting of two series of monthly data.
115 | *
116 | * @return The dataset.
117 | */
118 | private static XYDataset createDataset() {
119 |
120 | TimeSeries s1 = new TimeSeries("L&G European Index Trust");
121 | s1.add(new Month(2, 2001), 181.8);
122 | s1.add(new Month(3, 2001), 167.3);
123 | s1.add(new Month(4, 2001), 153.8);
124 | s1.add(new Month(5, 2001), 167.6);
125 | s1.add(new Month(6, 2001), 158.8);
126 | s1.add(new Month(7, 2001), 148.3);
127 | s1.add(new Month(8, 2001), 153.9);
128 | s1.add(new Month(9, 2001), 142.7);
129 | s1.add(new Month(10, 2001), 123.2);
130 | s1.add(new Month(11, 2001), 131.8);
131 | s1.add(new Month(12, 2001), 139.6);
132 | s1.add(new Month(1, 2002), 142.9);
133 | s1.add(new Month(2, 2002), 138.7);
134 | s1.add(new Month(3, 2002), 137.3);
135 | s1.add(new Month(4, 2002), 143.9);
136 | s1.add(new Month(5, 2002), 139.8);
137 | s1.add(new Month(6, 2002), 137.0);
138 | s1.add(new Month(7, 2002), 132.8);
139 |
140 | TimeSeries s2 = new TimeSeries("L&G UK Index Trust");
141 | s2.add(new Month(2, 2001), 129.6);
142 | s2.add(new Month(3, 2001), 123.2);
143 | s2.add(new Month(4, 2001), 117.2);
144 | s2.add(new Month(5, 2001), 124.1);
145 | s2.add(new Month(6, 2001), 122.6);
146 | s2.add(new Month(7, 2001), 119.2);
147 | s2.add(new Month(8, 2001), 116.5);
148 | s2.add(new Month(9, 2001), 112.7);
149 | s2.add(new Month(10, 2001), 101.5);
150 | s2.add(new Month(11, 2001), 106.1);
151 | s2.add(new Month(12, 2001), 110.3);
152 | s2.add(new Month(1, 2002), 111.7);
153 | s2.add(new Month(2, 2002), 111.0);
154 | s2.add(new Month(3, 2002), 109.6);
155 | s2.add(new Month(4, 2002), 113.2);
156 | s2.add(new Month(5, 2002), 111.6);
157 | s2.add(new Month(6, 2002), 108.8);
158 | s2.add(new Month(7, 2002), 101.6);
159 |
160 | TimeSeriesCollection dataset = new TimeSeriesCollection();
161 | dataset.addSeries(s1);
162 | dataset.addSeries(s2);
163 |
164 | return dataset;
165 | }
166 |
167 | /**
168 | * Starting point for the demonstration application.
169 | *
170 | * @param args ignored.
171 | */
172 | public static void main(String[] args) {
173 | final JFreeChart chart = createChart(createDataset());
174 | final Display display = new Display();
175 | Shell shell = new Shell(display);
176 | shell.setSize(600, 300);
177 | shell.setLayout(new FillLayout());
178 | shell.setText("Time series demo for jfreechart running with SWT");
179 | ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
180 | frame.setDisplayToolTips(true);
181 | frame.setHorizontalAxisTrace(false);
182 | frame.setVerticalAxisTrace(false);
183 | shell.open();
184 | while (!shell.isDisposed()) {
185 | if (!display.readAndDispatch())
186 | display.sleep();
187 | }
188 | }
189 |
190 | }
191 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/editor/SWTChartEditor.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * -------------------
28 | * SWTChartEditor.java
29 | * -------------------
30 | * (C) Copyright 2006-2008, by Henry Proudhon and Contributors.
31 | *
32 | * Original Author: Henry Proudhon (henry.proudhon AT ensmp.fr);
33 | * Contributor(s): David Gilbert (for Object Refinery Limited);
34 | *
35 | * Changes
36 | * -------
37 | * 01-Aug-2006 : New class (HP);
38 | * 18-Dec-2008 : Use ResourceBundleWrapper - see patch 1607918 by
39 | * Jess Thrysoee (DG);
40 | *
41 | */
42 |
43 | package org.jfree.experimental.chart.swt.editor;
44 |
45 | import java.util.ResourceBundle;
46 |
47 | import org.eclipse.swt.SWT;
48 | import org.eclipse.swt.events.SelectionAdapter;
49 | import org.eclipse.swt.events.SelectionEvent;
50 | import org.eclipse.swt.layout.FillLayout;
51 | import org.eclipse.swt.layout.GridData;
52 | import org.eclipse.swt.layout.GridLayout;
53 | import org.eclipse.swt.widgets.Button;
54 | import org.eclipse.swt.widgets.Composite;
55 | import org.eclipse.swt.widgets.Display;
56 | import org.eclipse.swt.widgets.Shell;
57 | import org.eclipse.swt.widgets.TabFolder;
58 | import org.eclipse.swt.widgets.TabItem;
59 | import org.jfree.chart.JFreeChart;
60 | import org.jfree.chart.editor.ChartEditor;
61 | import org.jfree.chart.util.ResourceBundleWrapper;
62 |
63 | /**
64 | * An editor for chart properties.
65 | */
66 | public class SWTChartEditor implements ChartEditor {
67 |
68 | /** The shell */
69 | private Shell shell;
70 |
71 | /** The chart which the properties have to be edited */
72 | private JFreeChart chart;
73 |
74 | /** A composite for displaying/editing the properties of the title. */
75 | private SWTTitleEditor titleEditor;
76 |
77 | /** A composite for displaying/editing the properties of the plot. */
78 | private SWTPlotEditor plotEditor;
79 |
80 | /** A composite for displaying/editing the other properties of the chart. */
81 | private SWTOtherEditor otherEditor;
82 |
83 | /** The resourceBundle for the localization. */
84 | protected static ResourceBundle localizationResources
85 | = ResourceBundleWrapper.getBundle(
86 | "org.jfree.chart.editor.LocalizationBundle");
87 |
88 | /**
89 | * Creates a new editor.
90 | *
91 | * @param display the display.
92 | * @param chart2edit the chart to edit.
93 | */
94 | public SWTChartEditor(Display display, JFreeChart chart2edit) {
95 | this.shell = new Shell(display, SWT.DIALOG_TRIM);
96 | this.shell.setSize(400, 500);
97 | this.chart = chart2edit;
98 | this.shell.setText(ResourceBundleWrapper.getBundle(
99 | "org.jfree.chart.LocalizationBundle").getString(
100 | "Chart_Properties"));
101 | GridLayout layout = new GridLayout(2, true);
102 | layout.marginLeft = layout.marginTop = layout.marginRight
103 | = layout.marginBottom = 5;
104 | this.shell.setLayout(layout);
105 | Composite main = new Composite(this.shell, SWT.NONE);
106 | main.setLayout(new FillLayout());
107 | main.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
108 |
109 | TabFolder tab = new TabFolder(main, SWT.BORDER);
110 | // build first tab
111 | TabItem item1 = new TabItem(tab, SWT.NONE);
112 | item1.setText(" " + localizationResources.getString("Title") + " ");
113 | this.titleEditor = new SWTTitleEditor(tab, SWT.NONE,
114 | this.chart.getTitle());
115 | item1.setControl(this.titleEditor);
116 | // build second tab
117 | TabItem item2 = new TabItem(tab, SWT.NONE);
118 | item2.setText(" " + localizationResources.getString("Plot") + " ");
119 | this.plotEditor = new SWTPlotEditor(tab, SWT.NONE,
120 | this.chart.getPlot());
121 | item2.setControl(this.plotEditor);
122 | // build the third tab
123 | TabItem item3 = new TabItem(tab, SWT.NONE);
124 | item3.setText(" " + localizationResources.getString("Other") + " ");
125 | this.otherEditor = new SWTOtherEditor(tab, SWT.NONE, this.chart);
126 | item3.setControl(this.otherEditor);
127 |
128 | // ok and cancel buttons
129 | Button ok = new Button(this.shell, SWT.PUSH | SWT.OK);
130 | ok.setText(" Ok ");
131 | ok.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
132 | ok.addSelectionListener(new SelectionAdapter() {
133 | public void widgetSelected(SelectionEvent e) {
134 | updateChart(SWTChartEditor.this.chart);
135 | SWTChartEditor.this.shell.dispose();
136 | }
137 | });
138 | Button cancel = new Button(this.shell, SWT.PUSH);
139 | cancel.setText(" Cancel ");
140 | cancel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
141 | cancel.addSelectionListener(new SelectionAdapter() {
142 | public void widgetSelected(SelectionEvent e) {
143 | SWTChartEditor.this.shell.dispose();
144 | }
145 | });
146 | }
147 |
148 | /**
149 | * Opens the editor.
150 | */
151 | public void open() {
152 | this.shell.open();
153 | this.shell.layout();
154 | while (!this.shell.isDisposed()) {
155 | if (!this.shell.getDisplay().readAndDispatch()) {
156 | this.shell.getDisplay().sleep();
157 | }
158 | }
159 | }
160 |
161 | /**
162 | * Updates the chart properties.
163 | *
164 | * @param chart the chart.
165 | */
166 | public void updateChart(JFreeChart chart)
167 | {
168 | this.titleEditor.setTitleProperties(chart);
169 | this.plotEditor.updatePlotProperties(chart.getPlot());
170 | this.otherEditor.updateChartProperties(chart);
171 | }
172 |
173 | }
174 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/editor/SWTNumberAxisEditor.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * ------------------------
28 | * SWTNumberAxisEditor.java
29 | * ------------------------
30 | * (C) Copyright 2006, 2007, by Henry Proudhon and Contributors.
31 | *
32 | * Original Author: Henry Proudhon (henry.proudhon AT ensmp.fr);
33 | * Contributor(s): David Gilbert (for Object Refinery Limited);
34 | *
35 | * Changes
36 | * -------
37 | * 01-Aug-2006 : New class (HP);
38 | *
39 | */
40 |
41 | package org.jfree.experimental.chart.swt.editor;
42 |
43 | import org.eclipse.swt.SWT;
44 | import org.eclipse.swt.events.FocusEvent;
45 | import org.eclipse.swt.events.FocusListener;
46 | import org.eclipse.swt.events.SelectionAdapter;
47 | import org.eclipse.swt.events.SelectionEvent;
48 | import org.eclipse.swt.layout.GridData;
49 | import org.eclipse.swt.layout.GridLayout;
50 | import org.eclipse.swt.widgets.Button;
51 | import org.eclipse.swt.widgets.Composite;
52 | import org.eclipse.swt.widgets.Label;
53 | import org.eclipse.swt.widgets.TabItem;
54 | import org.eclipse.swt.widgets.Text;
55 | import org.jfree.chart.axis.Axis;
56 | import org.jfree.chart.axis.NumberAxis;
57 |
58 | /**
59 | * An editor for {@link NumberAxis} properties.
60 | */
61 | class SWTNumberAxisEditor extends SWTAxisEditor implements FocusListener {
62 |
63 | /** A flag that indicates whether or not the axis range is determined
64 | * automatically.
65 | */
66 | private boolean autoRange;
67 |
68 | /** The lowest value in the axis range. */
69 | private double minimumValue;
70 |
71 | /** The highest value in the axis range. */
72 | private double maximumValue;
73 |
74 | /** A checkbox that indicates whether or not the axis range is determined
75 | * automatically.
76 | */
77 | private Button autoRangeCheckBox;
78 |
79 | /** A text field for entering the minimum value in the axis range. */
80 | private Text minimumRangeValue;
81 |
82 | /** A text field for entering the maximum value in the axis range. */
83 | private Text maximumRangeValue;
84 |
85 | /**
86 | * Creates a new editor.
87 | *
88 | * @param parent the parent.
89 | * @param style the style.
90 | * @param axis the axis.
91 | */
92 | public SWTNumberAxisEditor(Composite parent, int style, NumberAxis axis) {
93 | super(parent, style, axis);
94 | this.autoRange = axis.isAutoRange();
95 | this.minimumValue = axis.getLowerBound();
96 | this.maximumValue = axis.getUpperBound();
97 |
98 | TabItem item2 = new TabItem(getOtherTabs(), SWT.NONE);
99 | item2.setText(" " + localizationResources.getString("Range") + " ");
100 | Composite range = new Composite(getOtherTabs(), SWT.NONE);
101 | range.setLayout(new GridLayout(2, true));
102 | item2.setControl(range);
103 |
104 | this.autoRangeCheckBox = new Button(range, SWT.CHECK);
105 | this.autoRangeCheckBox.setText(localizationResources.getString(
106 | "Auto-adjust_range"));
107 | this.autoRangeCheckBox.setLayoutData(new GridData(SWT.FILL, SWT.CENTER,
108 | true, false, 2, 1));
109 | this.autoRangeCheckBox.setSelection(this.autoRange);
110 | this.autoRangeCheckBox.addSelectionListener(new SelectionAdapter() {
111 | public void widgetSelected(SelectionEvent e) {
112 | toggleAutoRange();
113 | }
114 | });
115 | new Label(range, SWT.NONE).setText(localizationResources.getString(
116 | "Minimum_range_value"));
117 | this.minimumRangeValue = new Text(range, SWT.BORDER);
118 | this.minimumRangeValue.setText(String.valueOf(this.minimumValue));
119 | this.minimumRangeValue.setLayoutData(new GridData(SWT.FILL, SWT.CENTER,
120 | true, false));
121 | this.minimumRangeValue.setEnabled(!this.autoRange);
122 | //this.minimumRangeValue.addModifyListener(this);
123 | //this.minimumRangeValue.addVerifyListener(this);
124 | this.minimumRangeValue.addFocusListener(this);
125 | new Label(range, SWT.NONE).setText(localizationResources.getString(
126 | "Maximum_range_value"));
127 | this.maximumRangeValue = new Text(range, SWT.BORDER);
128 | this.maximumRangeValue.setText(String.valueOf(this.maximumValue));
129 | this.maximumRangeValue.setLayoutData(new GridData(SWT.FILL, SWT.CENTER,
130 | true, false));
131 | this.maximumRangeValue.setEnabled(!this.autoRange);
132 | //this.maximumRangeValue.addModifyListener(this);
133 | //this.maximumRangeValue.addVerifyListener(this);
134 | this.maximumRangeValue.addFocusListener(this);
135 | }
136 |
137 | /**
138 | * Toggle the auto range setting.
139 | */
140 | public void toggleAutoRange() {
141 | this.autoRange = this.autoRangeCheckBox.getSelection();
142 | if (this.autoRange) {
143 | this.minimumRangeValue.setText(Double.toString(this.minimumValue));
144 | this.minimumRangeValue.setEnabled(false);
145 | this.maximumRangeValue.setText(Double.toString(this.maximumValue));
146 | this.maximumRangeValue.setEnabled(false);
147 | }
148 | else {
149 | this.minimumRangeValue.setEnabled(true);
150 | this.maximumRangeValue.setEnabled(true);
151 | }
152 | }
153 |
154 | /**
155 | * Revalidate the range minimum:
156 | * it should be less than the current maximum.
157 | *
158 | * @param candidate the minimum value
159 | *
160 | * @return A boolean.
161 | */
162 | public boolean validateMinimum(String candidate)
163 | {
164 | boolean valid = true;
165 | try {
166 | if (Double.parseDouble(candidate) >= this.maximumValue) {
167 | valid = false;
168 | }
169 | }
170 | catch (NumberFormatException e) {
171 | valid = false;
172 | }
173 | return valid;
174 | }
175 |
176 | /**
177 | * Revalidate the range maximum:
178 | * it should be greater than the current minimum
179 | *
180 | * @param candidate the maximum value
181 | *
182 | * @return A boolean.
183 | */
184 | public boolean validateMaximum(String candidate)
185 | {
186 | boolean valid = true;
187 | try {
188 | if (Double.parseDouble(candidate) <= this.minimumValue) {
189 | valid = false;
190 | }
191 | }
192 | catch (NumberFormatException e) {
193 | valid = false;
194 | }
195 | return valid;
196 | }
197 |
198 | /* (non-Javadoc)
199 | * @see org.eclipse.swt.events.FocusListener#focusGained(
200 | * org.eclipse.swt.events.FocusEvent)
201 | */
202 | public void focusGained(FocusEvent e) {
203 | // don't need to do anything
204 | }
205 |
206 | /* (non-Javadoc)
207 | * @see org.eclipse.swt.events.FocusListener#focusLost(
208 | * org.eclipse.swt.events.FocusEvent)
209 | */
210 | public void focusLost(FocusEvent e) {
211 | if (e.getSource() == this.minimumRangeValue) {
212 | // verify min value
213 | if (!validateMinimum(this.minimumRangeValue.getText()))
214 | this.minimumRangeValue.setText(String.valueOf(
215 | this.minimumValue));
216 | else
217 | this.minimumValue = Double.parseDouble(
218 | this.minimumRangeValue.getText());
219 | }
220 | else if (e.getSource() == this.maximumRangeValue) {
221 | // verify max value
222 | if (!validateMaximum(this.maximumRangeValue.getText()))
223 | this.maximumRangeValue.setText(String.valueOf(
224 | this.maximumValue));
225 | else
226 | this.maximumValue = Double.parseDouble(
227 | this.maximumRangeValue.getText());
228 | }
229 | }
230 |
231 | /**
232 | * Sets the properties of the specified axis to match
233 | * the properties defined on this panel.
234 | *
235 | * @param axis the axis.
236 | */
237 | public void setAxisProperties(Axis axis) {
238 | super.setAxisProperties(axis);
239 | NumberAxis numberAxis = (NumberAxis) axis;
240 | numberAxis.setAutoRange(this.autoRange);
241 | if (!this.autoRange) {
242 | numberAxis.setRange(this.minimumValue, this.maximumValue);
243 | }
244 | }
245 | }
246 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/editor/SWTOtherEditor.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * -------------------
28 | * SWTOtherEditor.java
29 | * -------------------
30 | * (C) Copyright 2006-2008, by Henry Proudhon and Contributors.
31 | *
32 | * Original Author: Henry Proudhon (henry.proudhon AT ensmp.fr);
33 | * Contributor(s): David Gilbert (for Object Refinery Limited);
34 | *
35 | * Changes
36 | * -------
37 | * 01-Aug-2006 : New class (HP);
38 | * 18-Dec-2008 : Use ResourceBundleWrapper - see patch 1607918 by
39 | * Jess Thrysoee (DG);
40 | *
41 | */
42 |
43 | package org.jfree.experimental.chart.swt.editor;
44 |
45 | import java.util.ResourceBundle;
46 |
47 | import org.eclipse.swt.SWT;
48 | import org.eclipse.swt.events.SelectionAdapter;
49 | import org.eclipse.swt.events.SelectionEvent;
50 | import org.eclipse.swt.graphics.Color;
51 | import org.eclipse.swt.graphics.RGB;
52 | import org.eclipse.swt.layout.FillLayout;
53 | import org.eclipse.swt.layout.GridData;
54 | import org.eclipse.swt.layout.GridLayout;
55 | import org.eclipse.swt.widgets.Button;
56 | import org.eclipse.swt.widgets.ColorDialog;
57 | import org.eclipse.swt.widgets.Composite;
58 | import org.eclipse.swt.widgets.Group;
59 | import org.eclipse.swt.widgets.Label;
60 | import org.jfree.chart.JFreeChart;
61 | import org.jfree.chart.util.ResourceBundleWrapper;
62 | import org.jfree.experimental.swt.SWTPaintCanvas;
63 | import org.jfree.experimental.swt.SWTUtils;
64 |
65 | /**
66 | * An editor for miscellaneous chart properties.
67 | */
68 | class SWTOtherEditor extends Composite {
69 |
70 | /** A checkbox indicating whether or not
71 | * the chart is drawn with anti-aliasing. */
72 | private Button antialias;
73 |
74 | /** The chart background color. */
75 | private SWTPaintCanvas backgroundPaintCanvas;
76 |
77 | /** The resourceBundle for the localization. */
78 | protected static ResourceBundle localizationResources
79 | = ResourceBundleWrapper.getBundle(
80 | "org.jfree.chart.editor.LocalizationBundle");
81 |
82 | /**
83 | * Creates a new instance.
84 | *
85 | * @param parent the parent.
86 | * @param style the style.
87 | * @param chart the chart.
88 | */
89 | public SWTOtherEditor(Composite parent, int style, JFreeChart chart) {
90 | super(parent, style);
91 | FillLayout layout = new FillLayout();
92 | layout.marginHeight = layout.marginWidth = 4;
93 | setLayout(layout);
94 |
95 | Group general = new Group(this, SWT.NONE);
96 | general.setLayout(new GridLayout(3, false));
97 | general.setText(localizationResources.getString("General"));
98 |
99 | // row 1: antialiasing
100 | this.antialias = new Button(general, SWT.CHECK);
101 | this.antialias.setText(localizationResources.getString(
102 | "Draw_anti-aliased"));
103 | this.antialias.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true,
104 | false, 3, 1));
105 | this.antialias.setSelection(chart.getAntiAlias());
106 |
107 | //row 2: background paint for the chart
108 | new Label(general, SWT.NONE).setText(localizationResources.getString(
109 | "Background_paint"));
110 | this.backgroundPaintCanvas = new SWTPaintCanvas(general, SWT.NONE,
111 | SWTUtils.toSwtColor(getDisplay(), chart.getBackgroundPaint()));
112 | GridData bgGridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
113 | bgGridData.heightHint = 20;
114 | this.backgroundPaintCanvas.setLayoutData(bgGridData);
115 | Button selectBgPaint = new Button(general, SWT.PUSH);
116 | selectBgPaint.setText(localizationResources.getString("Select..."));
117 | selectBgPaint.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false,
118 | false));
119 | selectBgPaint.addSelectionListener(
120 | new SelectionAdapter() {
121 | public void widgetSelected(SelectionEvent event) {
122 | ColorDialog dlg = new ColorDialog(getShell());
123 | dlg.setText(localizationResources.getString(
124 | "Background_paint"));
125 | dlg.setRGB(SWTOtherEditor.this.backgroundPaintCanvas
126 | .getColor().getRGB());
127 | RGB rgb = dlg.open();
128 | if (rgb != null) {
129 | SWTOtherEditor.this.backgroundPaintCanvas.setColor(
130 | new Color(getDisplay(), rgb));
131 | }
132 | }
133 | }
134 | );
135 | }
136 |
137 | /**
138 | * Updates the chart.
139 | *
140 | * @param chart the chart.
141 | */
142 | public void updateChartProperties(JFreeChart chart) {
143 | chart.setAntiAlias(this.antialias.getSelection());
144 | chart.setBackgroundPaint(SWTUtils.toAwtColor(
145 | this.backgroundPaintCanvas.getColor()));
146 | }
147 |
148 | }
149 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/editor/SWTPlotEditor.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * ------------------
28 | * SWTPlotEditor.java
29 | * ------------------
30 | * (C) Copyright 2006-2008, by Henry Proudhon and Contributors.
31 | *
32 | * Original Author: Henry Proudhon (henry.proudhon AT ensmp.fr);
33 | * Contributor(s): David Gilbert (for Object Refinery Limited);
34 | *
35 | * Changes
36 | * -------
37 | * 01-Aug-2006 : New class (HP);
38 | * 18-Dec-2008 : Use ResourceBundleWrapper - see patch 1607918 by
39 | * Jess Thrysoee (DG);
40 | *
41 | */
42 |
43 | package org.jfree.experimental.chart.swt.editor;
44 |
45 | import java.awt.Stroke;
46 | import java.util.ResourceBundle;
47 |
48 | import org.eclipse.swt.SWT;
49 | import org.eclipse.swt.graphics.Color;
50 | import org.eclipse.swt.layout.FillLayout;
51 | import org.eclipse.swt.widgets.Composite;
52 | import org.eclipse.swt.widgets.Group;
53 | import org.eclipse.swt.widgets.TabFolder;
54 | import org.eclipse.swt.widgets.TabItem;
55 | import org.jfree.chart.axis.Axis;
56 | import org.jfree.chart.plot.CategoryPlot;
57 | import org.jfree.chart.plot.Plot;
58 | import org.jfree.chart.plot.XYPlot;
59 | import org.jfree.chart.util.ResourceBundleWrapper;
60 | import org.jfree.experimental.swt.SWTUtils;
61 |
62 | /**
63 | * An editor for plot properties.
64 | */
65 | class SWTPlotEditor extends Composite {
66 |
67 | /**
68 | * A panel used to display/edit the properties of the domain axis (if any).
69 | */
70 | private SWTAxisEditor domainAxisPropertyPanel;
71 |
72 | /**
73 | * A panel used to display/edit the properties of the range axis (if any).
74 | */
75 | private SWTAxisEditor rangeAxisPropertyPanel;
76 |
77 | private SWTPlotAppearanceEditor plotAppearance;
78 |
79 | /** The resourceBundle for the localization. */
80 | protected static ResourceBundle localizationResources
81 | = ResourceBundleWrapper.getBundle(
82 | "org.jfree.chart.editor.LocalizationBundle");
83 |
84 | /**
85 | * Creates a new editor for the specified plot.
86 | *
87 | * @param parent the parent.
88 | * @param style the style.
89 | * @param plot the plot.
90 | */
91 | public SWTPlotEditor(Composite parent, int style, Plot plot) {
92 | super(parent, style);
93 | FillLayout layout = new FillLayout();
94 | layout.marginHeight = layout.marginWidth = 4;
95 | setLayout(layout);
96 |
97 | Group plotType = new Group(this, SWT.NONE);
98 | FillLayout plotTypeLayout = new FillLayout();
99 | plotTypeLayout.marginHeight = plotTypeLayout.marginWidth = 4;
100 | plotType.setLayout(plotTypeLayout);
101 | plotType.setText(plot.getPlotType() + localizationResources.getString(
102 | ":"));
103 |
104 | TabFolder tabs = new TabFolder(plotType, SWT.NONE);
105 |
106 | //deal with domain axis
107 | TabItem item1 = new TabItem(tabs, SWT.NONE);
108 | item1.setText(localizationResources.getString("Domain_Axis"));
109 | Axis domainAxis = null;
110 | if (plot instanceof CategoryPlot) {
111 | domainAxis = ((CategoryPlot) plot).getDomainAxis();
112 | }
113 | else if (plot instanceof XYPlot) {
114 | domainAxis = ((XYPlot) plot).getDomainAxis();
115 | }
116 | this.domainAxisPropertyPanel = SWTAxisEditor.getInstance(tabs,
117 | SWT.NONE, domainAxis);
118 | item1.setControl(this.domainAxisPropertyPanel);
119 |
120 | //deal with range axis
121 | TabItem item2 = new TabItem(tabs, SWT.NONE);
122 | item2.setText(localizationResources.getString("Range_Axis"));
123 | Axis rangeAxis = null;
124 | if (plot instanceof CategoryPlot) {
125 | rangeAxis = ((CategoryPlot) plot).getRangeAxis();
126 | }
127 | else if (plot instanceof XYPlot) {
128 | rangeAxis = ((XYPlot) plot).getRangeAxis();
129 | }
130 | this.rangeAxisPropertyPanel = SWTAxisEditor.getInstance(tabs, SWT.NONE,
131 | rangeAxis);
132 | item2.setControl(this.rangeAxisPropertyPanel);
133 |
134 | //deal with plot appearance
135 | TabItem item3 = new TabItem(tabs, SWT.NONE);
136 | item3.setText(localizationResources.getString("Appearance"));
137 | this.plotAppearance = new SWTPlotAppearanceEditor(tabs, SWT.NONE, plot);
138 | item3.setControl(this.plotAppearance);
139 | }
140 |
141 | /**
142 | * Returns the current outline stroke.
143 | *
144 | * @return The current outline stroke.
145 | */
146 | public Color getBackgroundPaint() {
147 | return this.plotAppearance.getBackGroundPaint();
148 | }
149 |
150 | /**
151 | * Returns the current outline stroke.
152 | *
153 | * @return The current outline stroke.
154 | */
155 | public Color getOutlinePaint() {
156 | return this.plotAppearance.getOutlinePaint();
157 | }
158 |
159 | /**
160 | * Returns the current outline stroke.
161 | *
162 | * @return The current outline stroke.
163 | */
164 | public Stroke getOutlineStroke() {
165 | return this.plotAppearance.getStroke();
166 | }
167 |
168 |
169 | /**
170 | * Updates the plot properties to match the properties
171 | * defined on the panel.
172 | *
173 | * @param plot The plot.
174 | */
175 | public void updatePlotProperties(Plot plot) {
176 | // set the plot properties...
177 | plot.setBackgroundPaint(SWTUtils.toAwtColor(getBackgroundPaint()));
178 | plot.setOutlinePaint(SWTUtils.toAwtColor(getOutlinePaint()));
179 | plot.setOutlineStroke(getOutlineStroke());
180 |
181 | // set the axis properties
182 | if (this.domainAxisPropertyPanel != null) {
183 | Axis domainAxis = null;
184 | if (plot instanceof CategoryPlot) {
185 | CategoryPlot p = (CategoryPlot) plot;
186 | domainAxis = p.getDomainAxis();
187 | }
188 | else if (plot instanceof XYPlot) {
189 | XYPlot p = (XYPlot) plot;
190 | domainAxis = p.getDomainAxis();
191 | }
192 | if (domainAxis != null)
193 | this.domainAxisPropertyPanel.setAxisProperties(domainAxis);
194 | }
195 | if (this.rangeAxisPropertyPanel != null) {
196 | Axis rangeAxis = null;
197 | if (plot instanceof CategoryPlot) {
198 | CategoryPlot p = (CategoryPlot) plot;
199 | rangeAxis = p.getRangeAxis();
200 | }
201 | else if (plot instanceof XYPlot) {
202 | XYPlot p = (XYPlot) plot;
203 | rangeAxis = p.getRangeAxis();
204 | }
205 | if (rangeAxis != null)
206 | this.rangeAxisPropertyPanel.setAxisProperties(rangeAxis);
207 | }
208 | if (this.plotAppearance.getPlotOrientation() != null) {
209 | if (plot instanceof CategoryPlot) {
210 | CategoryPlot p = (CategoryPlot) plot;
211 | p.setOrientation(this.plotAppearance.getPlotOrientation());
212 | }
213 | else if (plot instanceof XYPlot) {
214 | XYPlot p = (XYPlot) plot;
215 | p.setOrientation(this.plotAppearance.getPlotOrientation());
216 | }
217 | }
218 | }
219 | }
220 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/chart/swt/editor/SWTStrokeCanvas.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * --------------------
28 | * SWTStrokeCanvas.java
29 | * --------------------
30 | * (C) Copyright 2006, by Henry Proudhon and Contributors.
31 | *
32 | * Original Author: Henry Proudhon (henry.proudhon AT ensmp.fr);
33 | * Contributor(s): David Gilbert (for Object Refinery Limited);
34 | *
35 | * Changes
36 | * -------
37 | * 01-Aug-2006 : New class (HP);
38 | *
39 | */
40 |
41 | package org.jfree.experimental.chart.swt.editor;
42 |
43 | import java.awt.BasicStroke;
44 | import java.awt.Stroke;
45 |
46 | import org.eclipse.swt.SWT;
47 | import org.eclipse.swt.events.PaintEvent;
48 | import org.eclipse.swt.events.PaintListener;
49 | import org.eclipse.swt.graphics.Image;
50 | import org.eclipse.swt.graphics.Rectangle;
51 | import org.eclipse.swt.graphics.Transform;
52 | import org.eclipse.swt.widgets.Canvas;
53 | import org.eclipse.swt.widgets.Composite;
54 |
55 | /**
56 | * A control for displaying a Stroke
sample.
57 | */
58 | class SWTStrokeCanvas extends Canvas {
59 |
60 | /**
61 | * Creates a new instance.
62 | *
63 | * @param parent the parent.
64 | * @param style the style.
65 | * @param image the image.
66 | */
67 | public SWTStrokeCanvas(Composite parent, int style, Image image) {
68 | this(parent, style);
69 | }
70 |
71 | /**
72 | * Creates a new instance.
73 | *
74 | * @param parent the parent.
75 | * @param style the style.
76 | */
77 | public SWTStrokeCanvas(Composite parent, int style) {
78 | super(parent, style);
79 | addPaintListener(new PaintListener() {
80 | public void paintControl(PaintEvent e) {
81 | BasicStroke stroke = (BasicStroke) getStroke();
82 | if (stroke != null) {
83 | int x, y;
84 | Rectangle rect = getClientArea();
85 | x = (rect.width - 100) / 2;
86 | y = (rect.height - 16) / 2;
87 | Transform swtTransform = new Transform(e.gc.getDevice());
88 | e.gc.getTransform(swtTransform);
89 | swtTransform.translate(x, y);
90 | e.gc.setTransform(swtTransform);
91 | swtTransform.dispose();
92 | e.gc.setBackground(getDisplay().getSystemColor(
93 | SWT.COLOR_BLACK));
94 | e.gc.setLineWidth((int) stroke.getLineWidth());
95 | e.gc.drawLine(10, 8, 90, 8);
96 | }
97 | }
98 | });
99 | }
100 |
101 | /**
102 | * Sets the stroke.
103 | *
104 | * @param stroke the stroke.
105 | */
106 | public void setStroke(Stroke stroke) {
107 | if (stroke instanceof BasicStroke) {
108 | setData(stroke);
109 | }
110 | else {
111 | throw new RuntimeException(
112 | "Can only handle 'Basic Stroke' at present.");
113 | }
114 | }
115 |
116 | /**
117 | * Returns the stroke.
118 | *
119 | * @return The stroke.
120 | */
121 | public BasicStroke getStroke() {
122 | return (BasicStroke) this.getData();
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/SSD_Viewer/jfreechart-1.0.19/swt/org/jfree/experimental/swt/SWTPaintCanvas.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * JFreeChart : a free chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
6 | *
7 | * Project Info: http://www.jfree.org/jfreechart/index.html
8 | *
9 | * This library is free software; you can redistribute it and/or modify it
10 | * under the terms of the GNU Lesser General Public License as published by
11 | * the Free Software Foundation; either version 2.1 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This library is distributed in the hope that it will be useful, but
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | * License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 | * USA.
23 | *
24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
25 | * Other names may be trademarks of their respective owners.]
26 | *
27 | * -------------------
28 | * SwtPaintCanvas.java
29 | * -------------------
30 | * (C) Copyright 2000-2007, by Object Refinery Limited.
31 | *
32 | * Original Author: Henry Proudhon (henry.proudhon AT ensmp.fr);
33 | * Contributor(s): David Gilbert (for Object Refinery Limited);
34 | *
35 | * Changes
36 | * -------
37 | * 04-Aug-2006 : New class (HP);
38 | * 25-Oct-2007 : Fixed Eclipse warnings (DG);
39 | *
40 | */
41 |
42 | package org.jfree.experimental.swt;
43 |
44 | import org.eclipse.swt.SWT;
45 | import org.eclipse.swt.events.PaintEvent;
46 | import org.eclipse.swt.events.PaintListener;
47 | import org.eclipse.swt.graphics.Color;
48 | import org.eclipse.swt.widgets.Canvas;
49 | import org.eclipse.swt.widgets.Composite;
50 |
51 | /**
52 | * A paint canvas.
53 | */
54 | public class SWTPaintCanvas extends Canvas {
55 | private Color myColor;
56 |
57 | /**
58 | * Creates a new instance.
59 | *
60 | * @param parent the parent.
61 | * @param style the style.
62 | * @param color the color.
63 | */
64 | public SWTPaintCanvas(Composite parent, int style, Color color) {
65 | this(parent, style);
66 | setColor(color);
67 | }
68 |
69 | /**
70 | * Creates a new instance.
71 | *
72 | * @param parent the parent.
73 | * @param style the style.
74 | */
75 | public SWTPaintCanvas(Composite parent, int style) {
76 | super(parent, style);
77 | addPaintListener(new PaintListener() {
78 | public void paintControl(PaintEvent e) {
79 | e.gc.setForeground(e.gc.getDevice().getSystemColor(
80 | SWT.COLOR_BLACK));
81 | e.gc.setBackground(SWTPaintCanvas.this.myColor);
82 | e.gc.fillRectangle(getClientArea());
83 | e.gc.drawRectangle(getClientArea().x, getClientArea().y,
84 | getClientArea().width - 1, getClientArea().height - 1);
85 | }
86 | });
87 | }
88 |
89 | /**
90 | * Sets the color.
91 | *
92 | * @param color the color.
93 | */
94 | public void setColor(Color color) {
95 | if (this.myColor != null) {
96 | this.myColor.dispose();
97 | }
98 | //this.myColor = new Color(getDisplay(), color.getRGB());
99 | this.myColor = color;
100 | }
101 |
102 | /**
103 | * Returns the color.
104 | *
105 | * @return The color.
106 | */
107 | public Color getColor() {
108 | return this.myColor;
109 | }
110 |
111 | /**
112 | * Overridden to do nothing.
113 | *
114 | * @param c the color.
115 | */
116 | public void setBackground(Color c) {
117 | return;
118 | }
119 |
120 | /**
121 | * Overridden to do nothing.
122 | *
123 | * @param c the color.
124 | */
125 | public void setForeground(Color c) {
126 | return;
127 | }
128 |
129 | /**
130 | * Frees resources.
131 | */
132 | public void dispose() {
133 | this.myColor.dispose();
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/AbstractLayout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/AbstractLayout.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/DimensionInfo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/DimensionInfo.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/GridConstraints.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/GridConstraints.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/GridLayoutManager.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/GridLayoutManager.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/HorizontalInfo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/HorizontalInfo.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/LayoutState.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/LayoutState.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/Spacer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/Spacer.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/SupportCode$TextWithMnemonic.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/SupportCode$TextWithMnemonic.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/SupportCode.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/SupportCode.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/Util.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/Util.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/VerticalInfo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/com/intellij/uiDesigner/core/VerticalInfo.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/Main.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/MappingTable$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/MappingTable$1.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/MappingTable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/MappingTable.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBA_distribution$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBA_distribution$1.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBA_distribution$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBA_distribution$2.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBA_distribution.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBA_distribution.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBAtable$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBAtable$1.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBAtable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PBAtable.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PieChart$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PieChart$1.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PieChart.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/PieChart.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$1.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$2.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$3.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$4.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$5.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$6.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$JListHandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM$JListHandler.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/out/production/SSD_Viewer/skku/edu/SSDGUIFORM.class
--------------------------------------------------------------------------------
/SSD_Viewer/out/production/SSD_Viewer/skku/edu/filenames.txt:
--------------------------------------------------------------------------------
1 | file1
2 | file2
3 | file3
4 | file4
5 | file5
6 | file6
7 | file7
8 | file8
9 | END
10 | file1
11 | 1000 2
12 | 1001 251
13 | 1002 252
14 | 1003 457
15 | 1004 580
16 | 1005 581
17 | 1006 112
18 | 1007 1025
19 | END
20 | file2
21 | 1000 250
22 | 1001 251
23 | 1002 252
24 | 1003 457
25 | 1004 580
26 | 1005 581
27 | 1006 112
28 | 1007 1025
--------------------------------------------------------------------------------
/SSD_Viewer/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/src/.DS_Store
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlashSQL/SSDMapViewer/29ebd4a2d29f7378af2f4b49be0e679f385461a8/SSD_Viewer/src/skku/.DS_Store
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/Main.java:
--------------------------------------------------------------------------------
1 | package skku.edu;
2 |
3 |
4 | import java.io.IOException;
5 |
6 | public class Main {
7 |
8 | public static void main(String[] args) throws IOException, ClassNotFoundException {
9 | // write your code here
10 |
11 | SSDGUIFORM myGUIFORM=new SSDGUIFORM();
12 | myGUIFORM.setVisible(true);
13 |
14 | //MappingTable myMapping = new MappingTable();
15 | //myMapping.setVisible(true);
16 |
17 | //PBAtable myPBA = new PBAtable("file1");
18 | //myPBA.setVisible(true);
19 |
20 | //PBA_distribution mydistribution = new PBA_distribution("file1");
21 | //mydistribution.setVisible(true);
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/MappingTable.form:
--------------------------------------------------------------------------------
1 |
2 |
40 |
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/MappingTable.java:
--------------------------------------------------------------------------------
1 | package skku.edu;
2 |
3 | import javax.swing.*;
4 | import java.awt.event.ActionEvent;
5 | import java.awt.event.ActionListener;
6 | import java.io.IOException;
7 |
8 | public class MappingTable extends JFrame {
9 | private JPanel panel1;
10 | private JTextArea textArea1;
11 | private JButton backBtn;
12 |
13 | public MappingTable(String file_name) throws IOException {
14 |
15 | textArea1.setText(file_name);
16 | add(panel1);
17 | setTitle("Mapping Table");
18 | setSize(400,500);
19 |
20 | backBtn.addActionListener(new ActionListener() {
21 | @Override
22 | public void actionPerformed(ActionEvent e) {
23 |
24 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
25 | setVisible(false);
26 |
27 | SSDGUIFORM ssdForm = null;
28 | try {
29 | ssdForm = new SSDGUIFORM();
30 | } catch (IOException ex) {
31 | ex.printStackTrace();
32 | } catch (ClassNotFoundException ex) {
33 | ex.printStackTrace();
34 | }
35 | ssdForm.setVisible(true);
36 | }
37 | });
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/PBA_distribution.form:
--------------------------------------------------------------------------------
1 |
2 |
43 |
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/PBA_distribution.java:
--------------------------------------------------------------------------------
1 | package skku.edu;
2 |
3 |
4 | import javax.swing.*;
5 | import javax.swing.table.DefaultTableModel;
6 | import javax.swing.table.TableCellRenderer;
7 | import java.awt.*;
8 | import java.awt.event.ActionEvent;
9 | import java.awt.event.ActionListener;
10 | import java.io.BufferedReader;
11 | import java.io.File;
12 | import java.io.FileReader;
13 | import java.io.IOException;
14 | import java.util.Vector;
15 |
16 | public class PBA_distribution extends JFrame{
17 | private JPanel rootPanel;
18 | private JTable distribution_table;
19 | private JLabel distribution_label;
20 | private JButton back_button;
21 | private JScrollPane jscrollpane;
22 | Vector userColumn = new Vector<>();
23 | DefaultTableModel model;
24 |
25 | String file_name="";
26 |
27 | public PBA_distribution(String Path, String file_name) throws IOException{
28 |
29 | distribution_label.setText(" PBA distribution: " + file_name);
30 | userColumn.addElement("PBA");
31 | for(int i = 0; i < 100; i++) {
32 | userColumn.addElement(Integer.toString(i));
33 | }
34 | model = new DefaultTableModel(userColumn, 0);
35 |
36 |
37 | for(int i = 0; i < 10000; i++) {
38 | Vector userRow = new Vector<>();
39 | userRow.addElement(Long.toString(i));
40 | for(int j = 0; j < 100; j++) {
41 | userRow.addElement(" ");
42 | }
43 | model.addRow(userRow);
44 | }
45 | distribution_table = new JTable(model){
46 | @Override
47 | public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
48 | // TODO Auto-generated method stub
49 | JComponent component = (JComponent) super.prepareRenderer(renderer, row, column);
50 |
51 | //System.out.println(getValueAt(row, column));
52 | if(getValueAt(row, column).equals("*")) {
53 | component.setBackground(Color.BLUE);
54 | }
55 | else{
56 | component.setBackground(Color.WHITE);
57 | }
58 | return component;
59 | }
60 | };
61 | jscrollpane.setViewportView(distribution_table);
62 |
63 | File file = new File(Path); //file path .. please change according to your input file
64 | BufferedReader br = new BufferedReader(new FileReader(file));
65 | String st;
66 | int ack = 0;
67 | while ((st = br.readLine()) != null)
68 | {
69 | if(st.equals("END")) {
70 | if(ack==2) break;
71 | else ack = 1;
72 | }
73 |
74 | if(ack == 2){
75 | if(!st.split("\t")[1].equals("4294967295")) {
76 | int row = Integer.parseInt(st.split("\t")[1]);
77 | distribution_table.setValueAt("*", row / 100000, (row % 100000) / 1000 + 1);
78 | }
79 | }
80 |
81 | if(st.equals(file_name)&&ack == 1) ack = 2;
82 | }
83 |
84 | //TODO: change the range into real PBA range
85 |
86 | add(rootPanel);
87 | setTitle("PBA Distribution");
88 | setSize(400,500);
89 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
90 |
91 | back_button.addActionListener(new ActionListener() {
92 | @Override
93 | public void actionPerformed(ActionEvent e) {
94 | System.out.println("Log button "+file_name);
95 |
96 | if(file_name.length() > 0){
97 | System.out.println("Log legal "+file_name);
98 |
99 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
100 | setVisible(false);
101 |
102 | SSDGUIFORM myGUIFORM = null;
103 | try {
104 | myGUIFORM = new SSDGUIFORM(Path);
105 | } catch (IOException ex) {
106 | ex.printStackTrace();
107 | }
108 | myGUIFORM.setVisible(true);
109 | }
110 | }
111 | });
112 |
113 | }
114 |
115 | }
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/PBAtable.form:
--------------------------------------------------------------------------------
1 |
2 |
43 |
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/PBAtable.java:
--------------------------------------------------------------------------------
1 | package skku.edu;
2 |
3 | import javax.swing.*;
4 | import javax.swing.table.DefaultTableModel;
5 | import javax.swing.table.TableCellRenderer;
6 | import java.awt.*;
7 | import java.awt.event.ActionEvent;
8 | import java.awt.event.ActionListener;
9 | import java.io.BufferedReader;
10 | import java.io.File;
11 | import java.io.FileReader;
12 | import java.io.IOException;
13 | import java.util.Vector;
14 |
15 |
16 | public class PBAtable extends JFrame{
17 | private JButton back_button;
18 | private JPanel rootPanel;
19 | private JLabel label;
20 | private JTable mapping_table;
21 | private JScrollPane jscrollpane;
22 | Vector userColumn = new Vector<>();
23 | DefaultTableModel model;
24 |
25 | String file_name="";
26 |
27 | public PBAtable(String Path, String file_name) throws IOException, ClassNotFoundException {
28 |
29 | System.out.println("pba file name: "+file_name);
30 |
31 | label.setText("\t"+file_name);
32 | userColumn.addElement("LBA");
33 | userColumn.addElement("PBA");
34 | model = new DefaultTableModel(userColumn, 0);
35 |
36 | /*File I/O*/
37 | File file = new File(Path); //file path .. please change according to your input file
38 | BufferedReader br = new BufferedReader(new FileReader(file));
39 |
40 | /*Saving the file names*/
41 | String st;
42 | int ack = 0;
43 | while ((st = br.readLine()) != null)
44 | {
45 | if(st.equals("END")){
46 | if(ack==2) break;
47 | else ack = 1;
48 | }
49 | if(ack == 2){
50 | if(!st.split("\t")[1].equals("4294967295")) {
51 | Vector userRow = new Vector<>();
52 | System.out.println(">"+st.split("\t")[0]);
53 | System.out.println(">"+st.split("\t")[1]);
54 |
55 | userRow.addElement(st.split("\t")[0]);
56 | userRow.addElement(st.split("\t")[1]);
57 | model.addRow(userRow);
58 | }
59 | }
60 | if(st.equals(file_name)&&ack==1) ack = 2;
61 | }
62 |
63 | mapping_table = new JTable(model);
64 | jscrollpane.setViewportView(mapping_table);
65 |
66 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
67 |
68 | add(rootPanel);
69 | setTitle("LBA PBA Table");
70 | setSize(400,500);
71 |
72 | back_button.setPreferredSize(new Dimension(10,10));
73 |
74 | back_button.addActionListener(new ActionListener() {
75 | @Override
76 | public void actionPerformed(ActionEvent e) {
77 | System.out.println("Log button "+file_name);
78 |
79 | if(file_name.length() > 0){
80 | System.out.println("Log legal "+file_name);
81 |
82 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
83 | setVisible(false);
84 |
85 |
86 |
87 | SSDGUIFORM myGUIFORM = null;
88 | try {
89 | myGUIFORM = new SSDGUIFORM(Path);
90 | } catch (IOException ex) {
91 | ex.printStackTrace();
92 | }
93 | myGUIFORM.setVisible(true);
94 | }
95 | }
96 | });
97 | }
98 | }
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/PieChart.form:
--------------------------------------------------------------------------------
1 |
2 |
48 |
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/PieChart.java:
--------------------------------------------------------------------------------
1 | //version 1.0.0
2 | package skku.edu;
3 |
4 | import org.jfree.chart.ChartFactory;
5 | import org.jfree.chart.ChartFrame;
6 | import org.jfree.chart.ChartPanel;
7 | import org.jfree.chart.JFreeChart;
8 | import org.jfree.chart.plot.PiePlot;
9 | import org.jfree.data.general.DefaultPieDataset;
10 |
11 | import javax.swing.*;
12 | import java.awt.*;
13 | import java.awt.event.ActionEvent;
14 | import java.awt.event.ActionListener;
15 | import java.io.BufferedReader;
16 | import java.io.File;
17 | import java.io.FileReader;
18 | import java.io.IOException;
19 | import java.util.*;
20 |
21 | public class PieChart extends JFrame {
22 |
23 | private JPanel panel1;
24 | private JLabel label;
25 | private JButton backBtn;
26 | private JPanel graphPanel;
27 | Vector LBA_vec = new Vector();
28 | Vector PBA_vec = new Vector();
29 | VectorPBA_vec_converted=new Vector();
30 | //for storing ranges
31 | // ranges = new HashMap<>();
32 |
33 | public PieChart(String Path, String file_name) throws IOException {
34 |
35 |
36 |
37 | label.setText(" "+file_name);
38 | setContentPane(panel1);
39 | this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
40 | setSize(1000,700);
41 | setTitle("Internal fragmentation");
42 | setVisible(true);
43 |
44 | /*Reading */
45 | File file = new File(Path); //file path .. please change according to your input file
46 | BufferedReader br = new BufferedReader(new FileReader(file));
47 |
48 | //reading from a buffer into a string
49 | String st;
50 | int ack = 0;
51 | while ((st = br.readLine()) != null)
52 | {
53 | if(st.equals("END")){
54 | if(ack==2) break;
55 | else ack = 1;
56 | }
57 | if(ack == 2){
58 |
59 | //TODO: LBA_vec, PBA_vec push back
60 | if(!st.split("\t")[1].equals("4294967295")) {
61 |
62 | LBA_vec.addElement(st.split("\t")[0]);
63 | PBA_vec.addElement(st.split("\t")[1]);
64 | }
65 | }
66 | if(st.equals(file_name)&&ack==1) ack = 2;
67 | }
68 |
69 | /*Convert the String Vector to Integer*/
70 | int size=PBA_vec.size();
71 | for(int i=0;i subtract from all
118 | /*add values to the chart*/
119 | DefaultPieDataset dataSet=new DefaultPieDataset();
120 | for(int j=0;j
2 |
83 |
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/SSDGUIFORM.java:
--------------------------------------------------------------------------------
1 | package skku.edu;
2 |
3 | import javax.swing.*;
4 | import javax.swing.event.ListSelectionEvent;
5 | import javax.swing.event.ListSelectionListener;
6 | import javax.swing.filechooser.FileNameExtensionFilter;
7 | import java.awt.event.ActionEvent;
8 | import java.awt.event.ActionListener;
9 | import java.io.*;
10 | import java.net.URL;
11 | import java.util.Vector;
12 |
13 | public class SSDGUIFORM extends JFrame{
14 | private JButton tableBtn;
15 | private JPanel rootPanel;
16 | private JList list1;
17 | private JScrollPane scrPane;
18 | private JButton pieBtn;
19 | private JButton fileOpenBtn;
20 | private JLabel fileNameLabel;
21 | private JButton distributionBtn;
22 | private JTextField fileTextField;
23 | Vector filenames = new Vector();
24 | String file_name="";
25 | String Path = "";
26 |
27 | public SSDGUIFORM() throws IOException, ClassNotFoundException {
28 |
29 | fileOpenBtn.addActionListener(e -> {
30 | list1.setListData(selectFile(filenames));
31 | });
32 | pack();
33 |
34 | /*Setting the data to our list*/
35 | list1.setSelectedIndex(0);
36 | list1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
37 | list1.clearSelection();
38 | add(rootPanel);
39 | setTitle("This is SSD Viewer");
40 | setSize(500,500);
41 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
42 |
43 | JListHandler handler = new JListHandler();
44 | list1.addListSelectionListener(handler);
45 |
46 | tableBtn.addActionListener(new ActionListener() {
47 | @Override
48 | public void actionPerformed(ActionEvent e) {
49 | System.out.println("Log button "+file_name);
50 |
51 | if(file_name.length() > 0){
52 | System.out.println("Log legal "+file_name);
53 |
54 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
55 | setVisible(false);
56 |
57 | PBAtable myPBAtable = null;
58 | try {
59 | myPBAtable = new PBAtable(Path, file_name);
60 | } catch (IOException ex) {
61 | ex.printStackTrace();
62 | } catch (ClassNotFoundException ex) {
63 | ex.printStackTrace();
64 | }
65 | myPBAtable.setVisible(true);
66 | }
67 | }
68 | });
69 |
70 | pieBtn.addActionListener(new ActionListener() {
71 | @Override
72 | public void actionPerformed(ActionEvent e) {
73 | System.out.println("Log pie button "+file_name);
74 |
75 | if(file_name.length() > 0){
76 | System.out.println("Log pie legal "+file_name);
77 |
78 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
79 | setVisible(false);
80 |
81 | PieChart myPie = null;
82 | try {
83 | myPie = new PieChart(Path, file_name);
84 | } catch (IOException ex) {
85 | ex.printStackTrace();
86 | }
87 | myPie.setVisible(true);
88 | }
89 | }
90 | });
91 | distributionBtn.addActionListener(new ActionListener() {
92 | @Override
93 | public void actionPerformed(ActionEvent e) {
94 | System.out.println("Log distribution button "+file_name);
95 |
96 | if(file_name.length() > 0){
97 | System.out.println("Log distribution legal "+file_name);
98 |
99 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
100 | setVisible(false);
101 |
102 | PBA_distribution mydistribution = null;
103 | try {
104 | mydistribution = new PBA_distribution(Path, file_name);
105 | } catch (IOException ex) {
106 | ex.printStackTrace();
107 | }
108 | mydistribution.setVisible(true);
109 | }
110 | }
111 | });
112 |
113 | }
114 |
115 |
116 |
117 | public SSDGUIFORM(String path) throws IOException {
118 |
119 | System.out.println("path "+path);
120 | if(path.length() > 0){
121 | Path = path;
122 | fileNameLabel.setText(Path);
123 | File file = new File(path);
124 | BufferedReader br = new BufferedReader(new FileReader(file));
125 | String st;
126 | int ack = 0;
127 | while ((st = br.readLine()) != null)
128 | {
129 | if(st.equals("END")) break;
130 |
131 | filenames.addElement(st);
132 |
133 | }
134 | list1.setListData(filenames);
135 | list1.clearSelection();
136 | }
137 |
138 | /*Setting the data to our list*/
139 | list1.setSelectedIndex(0);
140 | list1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
141 | list1.clearSelection();
142 | add(rootPanel);
143 | setTitle("This is SSD Viewer");
144 | setSize(500,500);
145 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
146 |
147 | JListHandler handler = new JListHandler();
148 | list1.addListSelectionListener(handler);
149 |
150 | fileOpenBtn.addActionListener(e -> {
151 | list1.setListData(selectFile(filenames));
152 | });
153 | //pack();
154 | tableBtn.addActionListener(new ActionListener() {
155 | @Override
156 | public void actionPerformed(ActionEvent e) {
157 | System.out.println("Log button "+file_name);
158 |
159 | if(file_name.length() > 0){
160 | System.out.println("Log legal "+file_name);
161 |
162 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
163 | setVisible(false);
164 |
165 | PBAtable myPBAtable = null;
166 | try {
167 | myPBAtable = new PBAtable(Path, file_name);
168 | } catch (IOException ex) {
169 | ex.printStackTrace();
170 | } catch (ClassNotFoundException ex) {
171 | ex.printStackTrace();
172 | }
173 | myPBAtable.setVisible(true);
174 | }
175 | }
176 | });
177 |
178 | pieBtn.addActionListener(new ActionListener() {
179 | @Override
180 | public void actionPerformed(ActionEvent e) {
181 | System.out.println("Log pie button "+file_name);
182 |
183 | if(file_name.length() > 0){
184 | System.out.println("Log pie legal "+file_name);
185 |
186 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
187 | setVisible(false);
188 |
189 | PieChart myPie = null;
190 | try {
191 | myPie = new PieChart(Path, file_name);
192 | } catch (IOException ex) {
193 | ex.printStackTrace();
194 | }
195 | myPie.setVisible(true);
196 | }
197 | }
198 | });
199 | distributionBtn.addActionListener(new ActionListener() {
200 | @Override
201 | public void actionPerformed(ActionEvent e) {
202 | System.out.println("Log distribution button "+file_name);
203 |
204 | if(file_name.length() > 0){
205 | System.out.println("Log distribution button legal "+file_name);
206 |
207 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
208 | setVisible(false);
209 |
210 | PBA_distribution mydistribution = null;
211 | try {
212 | mydistribution = new PBA_distribution(Path, file_name);
213 | } catch (IOException ex) {
214 | ex.printStackTrace();
215 | }
216 | mydistribution.setVisible(true);
217 | }
218 | }
219 | });
220 |
221 | }
222 |
223 | public Vector selectFile(Vector fileList) {
224 |
225 | fileList.clear();
226 |
227 | JFileChooser chooser = new JFileChooser();
228 | FileNameExtensionFilter filter = new FileNameExtensionFilter("TEXT FILES","txt");
229 | chooser.setFileFilter(filter);
230 | // optionally set chooser options ...
231 | if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
232 | File f = chooser.getSelectedFile();
233 | File file = new File(f.getAbsolutePath());
234 | try {
235 | BufferedReader bufferedReader = new BufferedReader(new FileReader(f));
236 | String st;
237 | while ((st = bufferedReader.readLine()) != null) {
238 | if (st.equals("END")) break;
239 | fileList.addElement(st);
240 | }
241 | Path =f.getAbsolutePath();
242 | fileNameLabel.setText(Path);
243 | }catch (Exception o){
244 |
245 | }
246 |
247 | //System.out.println(f.getAbsolutePath());
248 | } else {
249 | // user changed their mind
250 | }
251 | return fileList;
252 | }
253 |
254 | private void createUIComponents() {
255 | // TODO: place custom component creation code here
256 | }
257 |
258 | private class JListHandler implements ListSelectionListener
259 | {
260 | //when list item is selected
261 | @Override
262 | public void valueChanged(ListSelectionEvent event)
263 | {
264 | System.out.println(event);
265 | if(list1.getSelectedValue() != null){
266 | file_name = list1.getSelectedValue().toString();
267 | System.out.println("Log "+file_name);
268 | }
269 | }
270 | }
271 | }
--------------------------------------------------------------------------------
/SSD_Viewer/src/skku/edu/filenames.txt:
--------------------------------------------------------------------------------
1 | file1
2 | file2
3 | file3
4 | file4
5 | file5
6 | file6
7 | file7
8 | file8
9 | END
10 | file1
11 | 1000 2
12 | 1001 251
13 | 1002 252
14 | 1003 457
15 | 1004 580
16 | 1005 581
17 | 1006 112
18 | 1007 1025
19 | END
20 | file2
21 | 1000 250
22 | 1001 251
23 | 1002 252
24 | 1003 457
25 | 1004 580
26 | 1005 581
27 | 1006 112
28 | 1007 1025
--------------------------------------------------------------------------------
/fibmap.c:
--------------------------------------------------------------------------------
1 | /*
2 | * fibmap - List blocks of a file
3 | *
4 | * Written in 2012 by Prashant P Shah
5 | *
6 | * To the extent possible under law, the author(s) have dedicated
7 | * all copyright and related and neighboring rights to this software
8 | * to the public domain worldwide. This software is distributed
9 | * without any warranty.
10 | *
11 | * You should have received a copy of the CC0 Public Domain Dedication
12 | * along with this software.
13 | * If not, see .
14 | */
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | int main(int argc, char **argv)
26 | {
27 | int fd, i, block, blocksize, blkcnt;
28 | struct stat st;
29 |
30 | assert(argv[1] != NULL);
31 |
32 | fd = open(argv[1], O_RDONLY);
33 | if (fd <= 0) {
34 | perror("error opening file");
35 | goto end;
36 | }
37 |
38 | if (ioctl(fd, FIGETBSZ, &blocksize)) {
39 | perror("FIBMAP ioctl failed");
40 | goto end;
41 | }
42 |
43 | if (fstat(fd, &st)) {
44 | perror("fstat error");
45 | goto end;
46 | }
47 |
48 | blkcnt = (st.st_size + blocksize - 1) / blocksize;
49 | printf("File %s size %d blocks %d blocksize %d\n",
50 | argv[1], (int)st.st_size, blkcnt, blocksize);
51 |
52 | for (i = 0; i < blkcnt; i++) {
53 | block = i;
54 | if (ioctl(fd, FIBMAP, &block)) {
55 | perror("FIBMAP ioctl failed");
56 | }
57 | printf("%3d %10d\n", i, block);
58 | }
59 |
60 | end:
61 | close(fd);
62 | return 0;
63 | }
64 |
--------------------------------------------------------------------------------
/iterator.c:
--------------------------------------------------------------------------------
1 | // Iterator.c ver 3.1
2 | //Last Update: Added Bash Commands to get PBA
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | //Directory Looping Function
16 | static int ptree(char *curpath, char * const path);
17 | //LBA Extraction Function
18 | void fibmap_fun(char name[20]);
19 | int caller=0;//for choosing between printing the name only or with details
20 | void extract_pba();
21 | unsigned long int pba[830000];
22 | FILE *output;
23 |
24 | int main(int argc, char * const argv[])
25 | {
26 | //Step0: Clear Trace File
27 | system("echo > /sys/kernel/debug/tracing/trace");
28 | //Step1 : Check trace file size
29 | FILE *f1;
30 | char c[25];
31 | int i=0;
32 | long val;
33 | system("cat /sys/kernel/debug/tracing/buffer_size_kb > buffer_size.txt");
34 |
35 | f1=fopen("buffer_size.txt","r");
36 | while((c[i] = fgetc(f1)) != EOF) i++;
37 |
38 | c[i+1]='\0';
39 | fclose(f1);
40 |
41 | char *p=c;
42 | while (*p)
43 | {
44 | if ( isdigit(*p) || ( (*p=='-'||*p=='+') && isdigit(*(p+1)) ))
45 | {
46 | val = strtol(p, &p, 10);
47 | // printf("%ld\n", val);
48 | }
49 | else
50 | {
51 | p++;
52 | }
53 | }
54 |
55 | //Step2: Resize Trace File if Necessary
56 | if(val==1410) system("echo 780000 > /sys/kernel/debug/tracing/buffer_size_kb");
57 |
58 | //Step3: Create PBLK Instance
59 |
60 | int create_error = system("sudo nvme lnvm create -d nvme0n1 -n mydevice -t pblk -b 0 -e 3");
61 | if(create_error != 0 ){
62 | system("sudo umount /mnt/nvme");
63 | system("sudo nvme lnvm remove -n mydevice");
64 |
65 | system("sudo nvme lnvm create -d nvme0n1 -n mydevice -t pblk -b 0 -e 3");
66 | printf("mydevice is newly created.\n-------------------------------\n\n");
67 | }
68 |
69 | system("sudo mount /dev/mydevice /mnt/nvme");
70 | //Step4: invoke pblk_sysfs.c functions by check test_kdy
71 | system("cat /sys/block/mydevice/pblk/test_kdy");
72 |
73 |
74 | //Step5: EXTRACT PBA from trace file -> make a function and call it inside fibmap
75 | extract_pba();
76 |
77 | system("echo > output.txt");
78 | output = fopen("output.txt", "w");
79 | if(output == NULL){
80 | printf("File pointer error!\n\n");
81 | exit(1);
82 | }
83 |
84 | int k;
85 | int rval;
86 |
87 | for (rval = 0, k = 1; k < argc; k++)
88 | if (ptree(NULL, argv[k]) != 0)
89 | rval = 1;
90 | //calling one more time to print details
91 | fprintf(output, "END\n");
92 | caller=1;
93 | rval=0;
94 | for (rval = 0, k = 1; k < argc; k++)
95 | if (ptree(NULL, argv[k]) != 0)
96 | rval = 1;
97 |
98 | //Step6: Remove PBLK
99 | system("sudo umount /mnt/nvme");
100 | system("sudo nvme lnvm remove -n mydevice");
101 |
102 | return rval;
103 |
104 |
105 | }
106 |
107 | static int ptree(char *curpath, char * const path)
108 | {
109 |
110 | char ep[PATH_MAX];
111 | char p[PATH_MAX];
112 | DIR *dirp;
113 | struct dirent entry;
114 | struct dirent *endp;
115 | struct stat st;
116 |
117 |
118 | if (curpath != NULL)
119 | snprintf(ep, sizeof(ep), "%s/%s", curpath, path);
120 | else
121 | snprintf(ep, sizeof(ep), "%s", path);
122 | if (stat(ep, &st) == -1)
123 | return -1;
124 | if ((dirp = opendir(ep)) == NULL)
125 | return -1;
126 | //main loop for iterating through the file
127 | for (;;) {
128 | endp = NULL;
129 | if (readdir_r(dirp, &entry, &endp) == -1) {
130 | closedir(dirp);
131 | return -1;
132 | }
133 | if (endp == NULL)
134 | break;
135 | assert(endp == &entry);
136 | if (strcmp(entry.d_name, ".") == 0 ||
137 | strcmp(entry.d_name, "..") == 0)
138 | continue;
139 | if (curpath != NULL)
140 | snprintf(ep, sizeof(ep), "%s/%s/%s", curpath,
141 | path, entry.d_name);
142 | else
143 | snprintf(ep, sizeof(ep), "%s/%s", path,
144 | entry.d_name);
145 | if (stat(ep, &st) == -1) {
146 | closedir(dirp);
147 | return -1;
148 | }
149 | if (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))//main condition
150 | {
151 |
152 | char new_name[50];//increase the size if the names are too long
153 | int counter=0;
154 | int counter2=0;
155 | while(ep[counter]!='\0')
156 | {
157 | new_name[counter2]=ep[counter];
158 | counter2++;
159 | counter++;
160 | }
161 |
162 | new_name[counter2]='\0';
163 |
164 | //loop backward until the code finds a backslash / -> use new_name for full name with path notation
165 | //1) find the size of new_name ==counter2
166 |
167 | char directory_file= S_ISDIR(st.st_mode) ? 'd' : 'f';
168 | if(directory_file=='f')//if file
169 | {
170 |
171 | int k=0;
172 |
173 | for(k=counter2;;k--)
174 | {
175 | if(new_name[k]=='/')
176 | {
177 | k++;
178 | break;
179 | }
180 | }
181 | while(k<=counter2)
182 | {
183 | fprintf(output,"%c",new_name[k]);
184 | k++;
185 | }
186 | fprintf(output, "\n");
187 |
188 | if(caller==1)
189 | {
190 | fibmap_fun(new_name);
191 | }
192 | }
193 |
194 |
195 | }
196 |
197 | if (S_ISDIR(st.st_mode) == 0)
198 | continue;
199 | if (curpath != NULL)
200 | snprintf(p, sizeof(p), "%s/%s", curpath, path);
201 | else
202 | snprintf(p, sizeof(p), "%s", path);
203 |
204 | snprintf(ep, sizeof(ep), "%s", entry.d_name);
205 |
206 |
207 | ptree(p, ep);
208 | }
209 | closedir(dirp);
210 |
211 | return 0;
212 | }
213 |
214 |
215 | void fibmap_fun(char file_name[20])
216 | {
217 |
218 |
219 | int fd, i, block, blocksize, blkcnt;
220 | struct stat st;
221 |
222 | assert(file_name != NULL);
223 |
224 | fd = open(file_name, O_RDONLY);
225 | if (fd <= 0) {
226 | perror("error opening file");
227 | goto end;
228 | }
229 |
230 | if (ioctl(fd, FIGETBSZ, &blocksize)) {
231 | perror("FIBMAP ioctl failed");
232 | goto end;
233 | }
234 |
235 | if (fstat(fd, &st)) {
236 | perror("fstat error");
237 | goto end;
238 | }
239 |
240 | blkcnt = (st.st_size + blocksize - 1) / blocksize;
241 |
242 | for (i = 0; i < blkcnt; i++) {
243 | block = i;
244 | if (ioctl(fd, FIBMAP, &block)) {
245 | perror("FIBMAP ioctl failed");
246 |
247 | }
248 |
249 | if(pba[block-1000] == -1) pba[block-1000] = 4294967295;
250 | fprintf(output, "%d %ld\n", block,pba[block-1000]);
251 | }
252 |
253 | end:
254 | fprintf(output, "END\n");
255 | close(fd);
256 | }
257 |
258 |
259 | void extract_pba(){
260 |
261 | int fd = open("/sys/kernel/debug/tracing/trace", O_RDONLY);
262 | // int fd = open("sample", O_RDONLY);
263 | int idx = 0;
264 | char buf [100];
265 | int line = 1, cell = 0;
266 | int i = 0;
267 | if(fd == -1) printf("FD error\n");
268 |
269 | while(read(fd, buf+idx, 1)){
270 |
271 | if(buf[idx]=='\n'){//newline
272 |
273 | if(line > 11){
274 | *(buf + idx + 1) = '\0';
275 | //printf("num %d:%s", line, buf + 65);
276 |
277 | char* ptr = strtok(buf + 65, " ");
278 | ptr = strtok(NULL," ");
279 | pba[i] = atoi(ptr);
280 | i++;
281 | idx = 0;
282 | line++;
283 |
284 | }
285 | else{
286 | *(buf + idx + 1) = '\0';
287 | idx = 0;
288 | line++;
289 | }
290 | }
291 |
292 | else{
293 | idx++;
294 | }
295 |
296 | }
297 |
298 | }
299 |
--------------------------------------------------------------------------------