Java Code Examples for ims.framework.controls.TreeNode.isExpanded()

The following are Jave code examples for showing how to use isExpanded() of the ims.framework.controls.TreeNode class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
/**
 * This will expand the node by getting the IHotlist based on the node id and current CciType.
 * It will then list the IHotlistItems below
 * @param TreeNode
 * @return void
 */
private void expandNode(TreeNode node)
{
	if (node == null) return;
	
	if ( node.isExpanded() )
	{
		IHotlistShort val = (IHotlistShort) node.getValue();
		IHotlist item = domain.getIHotlist(val.getIHotlistShortID(), form.getLocalContext().getcurrentCciType());
		
		node.setValue(item);
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());			
		node.getNodes().clear();
		
		for ( int i = 0; i < item.getIHotlistItems().length; i++ )
		{
			TreeNode child = node.getNodes().add(item.getIHotlistItems()[i], item.getIHotlistItems()[i].getIGenericItem().getIGenericItemInfoName());
			setNodeImage(child, Color.Blue);
			child.setEnabled(node.isEnabled());
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private StringBuilder getFormattedNodeDetails(TreeNode node, StringBuilder out)
{
	if (node.getValue() instanceof LocShortVo)
	{
		LocShortVo vo = (LocShortVo) node.getValue();
		out = formatLocationDetails(out, vo);
		if (node.isExpanded())
		{
			TreeNodeCollection treeNodeColl = node.getNodes();
			for (int i = 0; i < treeNodeColl.size(); i++)
			{
				out = getFormattedNodeDetails(treeNodeColl.get(i), out);
			}
		}
	}
	else if (node.getValue() instanceof LocationServiceVo)
	{
		out = formatServiceDetails(out, (LocationServiceVo) node.getValue());
	}
	return out;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private void treeExpandCollapse(TreeNode node)
{
	if (node.isExpanded())
	{
		if (node.getNodes().size() > 0 && node.getNodes().get(0).getValue() == null)
		{
			if (node.getValue() instanceof ServiceVo)
				form.getLocalContext().setSelectedRecord((ServiceVo) node.getValue());
			populateServiceFunctionAndActivity(node);
		}
	}
	else
	{
		if (!ConfigFlag.UI.SERVICE_TABS.getValue(false).equalsIgnoreCase("NONE"))
		{
			if (node.getNodes().get(0).getText() == form.getLocalContext().gettreMessage())
			{
				node.getNodes().get(0).setText("Loading Please wait...");
			}
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void expandNodes(TreeNodeCollection nodes) 
{
	TreeNode node;
	for (int i = 0; nodes != null && i < nodes.size(); i++) 
	{
		node = nodes.get(i);
		if(node.isExpanded() == false)
			node.setExpanded(true);
		if(node.getNodes() != null && node.getNodes().size() > 0)
			expandNodes(node.getNodes());
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void collapseNodes(TreeNodeCollection nodes) 
{
	TreeNode node;
	for (int i = 0; nodes != null && i < nodes.size(); i++) 
	{
		node = nodes.get(i);
		if(node.isExpanded())
			node.setExpanded(false);
		if(node.getNodes() != null && node.getNodes().size() > 0)
			collapseNodes(node.getNodes());
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void collapseNodes(TreeNodeCollection nodes)
{
	for (int i = 0; nodes != null && i < nodes.size(); i++)
	{
		TreeNode node = nodes.get(i);
		if (node.isExpanded())
			node.setExpanded(false);
		if (node.getNodes() != null && node.getNodes().size() > 0)
			collapseNodes(node.getNodes());
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void expandNodes(TreeNodeCollection nodes)
{
	for (int i = 0; nodes != null && i < nodes.size(); i++)
	{
		TreeNode node = nodes.get(i);
		if (node.isExpanded() == false)
			node.setExpanded(true);
		if (node.getNodes() != null && node.getNodes().size() > 0)
			expandNodes(node.getNodes());
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void collapseNodes(TreeNodeCollection nodes) 
{
	for(int i=0; nodes != null && i<nodes.size(); i++)
	{
		TreeNode node = nodes.get(i);
		if(node.isExpanded())
			node.setExpanded(false);
		if(node.getNodes() != null && node.getNodes().size() > 0)
			collapseNodes(node.getNodes());
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void expandNodes(TreeNodeCollection nodes) 
{
	for (int i = 0; nodes != null && i < nodes.size(); i++) 
	{
		TreeNode node = nodes.get(i);
		if(node.isExpanded() == false)
			node.setExpanded(true);
		if(node.getNodes() != null && node.getNodes().size() > 0)
			expandNodes(node.getNodes());
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void treeViewNodeExpandCollapse(TreeNode node)
{
	if(node == null)
		return;
	
	if (node.isExpanded())
		treeSelectionChanged(node);
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
@Override
protected void onTreFormActionsTreeViewNodeExpandCollapse(TreeNode node) throws PresentationLogicException 
{
	if(node.isExpanded())
		loadFormMenuActions(node);		
}