litesoft
Diff Revisions
949
vs
950
for /trunk/Java/GWT/OldClient/src/org/litesoft/GWT/forms/client/nonpublic/HorizontalPeerDeterminer.java
|
@@ -1,38 +1,38 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.forms.client.nonpublic; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.ui.def.*; |
5 |
|
- |
import org.litesoft.ui.def.nonpublic.support.*; |
6 |
|
- |
|
7 |
|
- |
import java.util.*; |
8 |
|
- |
|
9 |
|
- |
public class HorizontalPeerDeterminer implements Iterator { |
10 |
|
- |
protected UiDef[] mChildDefs; |
11 |
|
- |
private int mNextIndex = 0; |
12 |
|
- |
protected boolean mHorizontalPeers; |
13 |
|
- |
|
14 |
|
- |
public HorizontalPeerDeterminer( UiContainerMarker pUiDef, boolean pHorizontalPeers ) { |
15 |
|
- |
mChildDefs = pUiDef.getChildrenHelper().getChildren(); |
16 |
|
- |
mHorizontalPeers = pHorizontalPeers; |
17 |
|
- |
} |
18 |
|
- |
|
19 |
|
- |
public boolean hasNext() { |
20 |
|
- |
return mNextIndex < mChildDefs.length; |
21 |
|
- |
} |
22 |
|
- |
|
23 |
|
- |
public Object next() { |
24 |
|
- |
if ( hasNext() ) { |
25 |
|
- |
return mChildDefs[mNextIndex++]; |
26 |
|
- |
} |
27 |
|
- |
throw new NoSuchElementException(); |
28 |
|
- |
} |
29 |
|
- |
|
30 |
|
- |
public void remove() { |
31 |
|
- |
throw new UnsupportedOperationException( |
32 |
|
- |
"remove should never have been in the iterator, but then Josh knows better that the GOF" ); |
33 |
|
- |
} |
34 |
|
- |
|
35 |
|
- |
public boolean hasHorizontalPeer() { |
36 |
|
- |
return mHorizontalPeers; |
37 |
|
- |
} |
38 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.forms.client.nonpublic; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.ui.def.*; |
|
5 |
+ |
import org.litesoft.ui.def.nonpublic.support.*; |
|
6 |
+ |
|
|
7 |
+ |
import java.util.*; |
|
8 |
+ |
|
|
9 |
+ |
public class HorizontalPeerDeterminer implements Iterator { |
|
10 |
+ |
protected UiDef[] mChildDefs; |
|
11 |
+ |
private int mNextIndex = 0; |
|
12 |
+ |
protected boolean mHorizontalPeers; |
|
13 |
+ |
|
|
14 |
+ |
public HorizontalPeerDeterminer( UiContainerMarker pUiDef, boolean pHorizontalPeers ) { |
|
15 |
+ |
mChildDefs = pUiDef.getChildrenHelper().getChildren(); |
|
16 |
+ |
mHorizontalPeers = pHorizontalPeers; |
|
17 |
+ |
} |
|
18 |
+ |
|
|
19 |
+ |
public boolean hasNext() { |
|
20 |
+ |
return mNextIndex < mChildDefs.length; |
|
21 |
+ |
} |
|
22 |
+ |
|
|
23 |
+ |
public Object next() { |
|
24 |
+ |
if ( hasNext() ) { |
|
25 |
+ |
return mChildDefs[mNextIndex++]; |
|
26 |
+ |
} |
|
27 |
+ |
throw new NoSuchElementException(); |
|
28 |
+ |
} |
|
29 |
+ |
|
|
30 |
+ |
public void remove() { |
|
31 |
+ |
throw new UnsupportedOperationException( |
|
32 |
+ |
"remove should never have been in the iterator, but then Josh knows better that the GOF" ); |
|
33 |
+ |
} |
|
34 |
+ |
|
|
35 |
+ |
public boolean hasHorizontalPeer() { |
|
36 |
+ |
return mHorizontalPeers; |
|
37 |
+ |
} |
|
38 |
+ |
} |