1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.custom.fisheye;
20
21 import java.util.Iterator;
22
23 import javax.faces.component.UIComponent;
24 import javax.faces.component.UIData;
25 import javax.faces.context.FacesContext;
26 import javax.faces.el.ValueBinding;
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 public abstract class AbstractHtmlFishEyeNavigationMenu extends UIData
53 {
54 public static final String COMPONENT_TYPE = "org.apache.myfaces.FishEyeList";
55 private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.FishEyeList";
56
57 public static final String EDGE_BOTTOM = "bottom";
58 public static final String EDGE_CENTER = "center";
59 public static final String EDGE_LEFT = "left";
60 public static final String EDGE_RIGHT = "right";
61 public static final String EDGE_TOP = "top";
62 public static final String HORIZONTAL_ORIENTATION = "horizontal";
63 public static final String VERTICAL_ORIENTATION = "vertical";
64 private static final String NODE_STAMP_FACET_NAME = "nodeStamp";
65
66 public void processDecodes(FacesContext context) {
67 super.processDecodes(context);
68 int first = getFirst();
69 int rows = getRows();
70 int last;
71 if (rows == 0)
72 {
73 last = getRowCount();
74 }
75 else
76 {
77 last = first + rows;
78 }
79 for (int rowIndex = first; last==-1 || rowIndex < last; rowIndex++)
80 {
81 setRowIndex(rowIndex);
82
83
84 if (!isRowAvailable())
85 break;
86
87 for (Iterator it = getChildren().iterator(); it.hasNext();)
88 {
89 UIComponent child = (UIComponent) it.next();
90 if (child instanceof FishEyeCommandLink)
91 {
92 if (!child.isRendered())
93 {
94
95 continue;
96 }
97 child.processDecodes(context);
98 }
99 }
100 }
101 }
102
103 public void setValueBinding(String string, ValueBinding valueBinding) {
104 super.setValueBinding(string, valueBinding);
105 }
106
107
108
109
110 public abstract Integer getVisibleWindow();
111
112
113
114
115 public UIComponent getNodeStamp()
116 {
117 return (UIComponent) getFacets().get(NODE_STAMP_FACET_NAME);
118 }
119
120
121
122
123 public abstract String getAttachEdge();
124
125
126
127
128 public abstract Boolean getConservativeTrigger();
129
130
131
132
133 public abstract Integer getEffectUnits();
134
135
136
137
138 public abstract Integer getItemHeight();
139
140
141
142
143 public abstract Integer getItemMaxHeight();
144
145
146
147
148 public abstract Integer getItemMaxWidth();
149
150
151
152
153 public abstract Integer getItemPadding();
154
155
156
157
158 public abstract Integer getItemWidth();
159
160
161
162
163 public abstract String getLabelEdge();
164
165
166
167
168 public abstract String getOrientation();
169
170 public boolean getRendersChildren()
171 {
172 return true;
173 }
174
175 }