Last change
on this file since 193 was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | package com.framsticks.gui.tree; |
---|
2 | |
---|
3 | |
---|
4 | import com.framsticks.gui.AbstractPanel; |
---|
5 | import com.framsticks.gui.Frame; |
---|
6 | import com.framsticks.gui.ImageProvider; |
---|
7 | import com.framsticks.params.CompositeParam; |
---|
8 | |
---|
9 | public class EmptyNode extends AbstractNode { |
---|
10 | |
---|
11 | protected final CompositeParam param; |
---|
12 | protected final Frame frame; |
---|
13 | |
---|
14 | /** |
---|
15 | * @param param |
---|
16 | */ |
---|
17 | public EmptyNode(Frame frame, CompositeParam param) { |
---|
18 | this.param = param; |
---|
19 | this.frame = frame; |
---|
20 | } |
---|
21 | |
---|
22 | @Override |
---|
23 | public int getChildCount() { |
---|
24 | return 0; |
---|
25 | } |
---|
26 | |
---|
27 | @Override |
---|
28 | public Object getChild(int number) { |
---|
29 | return null; |
---|
30 | } |
---|
31 | |
---|
32 | @Override |
---|
33 | public int getIndexOfChild(Object child) { |
---|
34 | return -1; |
---|
35 | } |
---|
36 | |
---|
37 | @Override |
---|
38 | public boolean isLeaf() { |
---|
39 | return false; |
---|
40 | } |
---|
41 | |
---|
42 | @Override |
---|
43 | public void render(TreeCellRenderer renderer) { |
---|
44 | |
---|
45 | renderer.setToolTipText("?"); |
---|
46 | renderer.setText(param.getId()); |
---|
47 | renderer.setIcon(ImageProvider.loadImage(ImageProvider.FOLDER_CLOSED)); |
---|
48 | } |
---|
49 | |
---|
50 | /** |
---|
51 | * @return the param |
---|
52 | */ |
---|
53 | public CompositeParam getParam() { |
---|
54 | return param; |
---|
55 | } |
---|
56 | |
---|
57 | @Override |
---|
58 | public AbstractPanel getPanel() { |
---|
59 | return frame.getEmptyPanel(); |
---|
60 | } |
---|
61 | |
---|
62 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.