|
a/tool/src/GUI/TreeRenderer.java |
|
b/tool/src/GUI/TreeRenderer.java |
1 |
/*
|
1 |
/*
|
2 |
* SPDXVersion: SPDX-1.1
|
2 |
* SPDXVersion: SPDX-1.1
|
3 |
*
|
|
|
4 |
* Creator: Person: Nuno Brito (nuno.brito@triplecheck.de)
|
3 |
* Creator: Person: Nuno Brito (nuno.brito@triplecheck.de)
|
5 |
*
|
|
|
6 |
* Creator: Organization: TripleCheck (contact@triplecheck.de)
|
4 |
* Creator: Organization: TripleCheck (contact@triplecheck.de)
|
7 |
*
|
|
|
8 |
* Created: 2013-09-17T00:00:00Z
|
5 |
* Created: 2013-09-17T00:00:00Z
|
9 |
*
|
|
|
10 |
* LicenseName: NOASSERTION
|
6 |
* LicenseName: NOASSERTION
|
11 |
*
|
|
|
12 |
* FileName: TreeRenderer.java
|
7 |
* FileName: TreeRenderer.java
|
13 |
*
|
|
|
14 |
* FileType: SOURCE
|
8 |
* FileType: SOURCE
|
15 |
*
|
|
|
16 |
* FileCopyrightText: <text> Copyright 2013 Nuno Brito, TripleCheck </text>
|
9 |
* FileCopyrightText: <text> Copyright 2013 Nuno Brito, TripleCheck </text>
|
17 |
*
|
|
|
18 |
* FileComment: <text> Adds the pretty icons on tree objects </text>
|
10 |
* FileComment: <text> Add the pretty icons on tree objects </text>
|
19 |
*/
|
11 |
*/
|
20 |
|
12 |
|
21 |
package GUI;
|
13 |
package GUI;
|
22 |
|
14 |
|
23 |
import java.awt.Component;
|
15 |
import java.awt.Component;
|
|
... |
|
... |
43 |
sectionPackage = get("box.png"),
|
35 |
sectionPackage = get("box.png"),
|
44 |
sectionFile = get("documents-stack.png"),
|
36 |
sectionFile = get("documents-stack.png"),
|
45 |
sectionReview = get("geolocation.png"),
|
37 |
sectionReview = get("geolocation.png"),
|
46 |
//dependency = get("envelope.png"),
|
38 |
//dependency = get("envelope.png"),
|
47 |
file = get("document-number.png"),
|
39 |
file = get("document-number.png"),
|
48 |
home = get("home.png");
|
40 |
home = get("home.png"),
|
|
|
41 |
|
|
|
42 |
folderClosed = get("folder-horizontal.png"),
|
|
|
43 |
folderOpen = get("folder-horizontal-open.png");
|
|
|
44 |
|
49 |
// medal-premium.png
|
45 |
// medal-premium.png
|
50 |
|
46 |
|
51 |
@Override
|
47 |
@Override
|
52 |
public Component getTreeCellRendererComponent(JTree tree, Object value,
|
48 |
public Component getTreeCellRendererComponent(JTree tree, Object value,
|
53 |
boolean sel, boolean exp, boolean leaf, int row, boolean hasFocus) {
|
49 |
boolean sel, boolean exp, boolean leaf, int row, boolean hasFocus) {
|
|
... |
|
... |
66 |
case none:
|
62 |
case none:
|
67 |
setIcon(none);
|
63 |
setIcon(none);
|
68 |
break;
|
64 |
break;
|
69 |
case file:
|
65 |
case file:
|
70 |
setIcon(file);
|
66 |
setIcon(file);
|
|
|
67 |
break;
|
|
|
68 |
case folder:
|
|
|
69 |
setIcon(folderClosed);
|
|
|
70 |
node.iconWhenSelected = get("folder-horizontal-open.png");
|
71 |
break;
|
71 |
break;
|
72 |
case person:
|
72 |
case person:
|
73 |
setIcon(person);
|
73 |
setIcon(person);
|
74 |
break;
|
74 |
break;
|
75 |
case sectionCreator:
|
75 |
case sectionCreator:
|