Author: ppitonak(a)redhat.com
Date: 2012-01-04 07:15:02 -0500 (Wed, 04 Jan 2012)
New Revision: 23123
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java
Log:
code refactored
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java 2012-01-04
11:25:38 UTC (rev 23122)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java 2012-01-04
12:15:02 UTC (rev 23123)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -145,10 +145,10 @@
public RichFacesTreeNode<Labeled> getRichFacesTreeNodeRoot() {
if (richfacesTreeNodeRoot == null) {
- List<RichFacesTreeNode<Labeled>> richfacesTreeNodeList =
(List<RichFacesTreeNode<Labeled>>) (List<?>)
buldTree(RichFacesTreeNode.createFactory());
+ List<RichFacesTreeNode<Labeled>> richfacesTreeNodeList =
(List<RichFacesTreeNode<Labeled>>) (List<?>)
buildTree(RichFacesTreeNode.createFactory());
richfacesTreeNodeRoot = new RichFacesTreeNode<Labeled>();
int i=0;
- for (RichFacesTreeNode node : richfacesTreeNodeList) {
+ for (RichFacesTreeNode<?> node : richfacesTreeNodeList) {
richfacesTreeNodeRoot.addChild(i, node);
i++;
}
@@ -158,8 +158,8 @@
public List<SwingTreeNode<Labeled>> getSwingTreeNodeRoot() {
if (swingTreeNodeRoot == null) {
- List<SwingTreeNode<Labeled>> swingTreeNodelist =
(List<SwingTreeNode<Labeled>>) (List<?>)
buldTree(SwingTreeNode.createFactory());
- swingTreeNodeRoot = swingTreeNodelist;
+ List<SwingTreeNode<Labeled>> swingTreeNodeList =
(List<SwingTreeNode<Labeled>>) (List<?>)
buildTree(SwingTreeNode.createFactory());
+ swingTreeNodeRoot = swingTreeNodeList;
}
return swingTreeNodeRoot;
}
@@ -214,7 +214,7 @@
}
}
- private List<TreeNodeWithContent<Labeled>>
buldTree(TreeNodeWithContentFactory<TreeNodeWithContent<Labeled>>
treeNodeFactory) {
+ private List<TreeNodeWithContent<Labeled>>
buildTree(TreeNodeWithContentFactory<TreeNodeWithContent<Labeled>>
treeNodeFactory) {
List<TreeNodeWithContent<Labeled>> firstLevelNodes = new
ArrayList<TreeNodeWithContent<Labeled>>();
for(State state : companiesCache.keySet()) {
TreeNodeWithContent<Labeled> stateTreeNode =
treeNodeFactory.createTreeNode(null, state);
Show replies by date