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

The following are Jave code examples for showing how to use getText() 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
private String getFavouriteFolderName()
{
	String name = "Favourite";
	int newIndex = 0;
	for (int i = 0; i < form.lyrTabs().tabPageFavourites().treFavourites().getNodes().size(); i++)
	{
		TreeNode node = form.lyrTabs().tabPageFavourites().treFavourites().getNodes().get(i);
		if(node.getValue() == null && node.getText() != null)
		{
			int textLength = node.getText().length();
			if(textLength > 0)
			{
				char chIndex = node.getText().charAt(textLength - 1);
				if(Character.isDigit(chIndex))
				{
					int currentIndex = Integer.valueOf(Character.toString(chIndex)).intValue();
					if(currentIndex > newIndex)
						newIndex = currentIndex;
				}
			}
		}
	}		
	name = name + (newIndex + 1);
	return name;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private String getFavouriteFolderName()
{
	String name = "Favourite";
	int newIndex = 0;
	for (int i = 0; i < form.lyr1().tabFavourites().treFavourites().getNodes().size(); i++)
	{
		TreeNode node = form.lyr1().tabFavourites().treFavourites().getNodes().get(i);
		if (node.getValue() == null && node.getText() != null)
		{
			int textLength = node.getText().length();
			if (textLength > 0)
			{
				char chIndex = node.getText().charAt(textLength - 1);
				if (Character.isDigit(chIndex))
				{
					int currentIndex = Integer.valueOf(Character.toString(chIndex)).intValue();
					if (currentIndex > newIndex)
						newIndex = currentIndex;
				}
			}
		}
	}
	name = name + (newIndex + 1);
	return name;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private TreeNode getFolderRootRow(String folder)
{
	if(folder == null)
		return null;
	
	for (int i = 0; i < form.lyrTabs().tabPageFavourites().treFavourites().getNodes().size(); i++)
	{
		TreeNode node   = form.lyrTabs().tabPageFavourites().treFavourites().getNodes().get(i);
		String nodeText = node.getText();
		if(nodeText != null && nodeText.startsWith(folder))
			return node; 
	}
	return null;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private TreeNode getFolderRootRow(String folder)
{
	for (int i = 0; i < form.lyr1().tabFavourites().treFavourites().getNodes().size(); i++)
	{
		TreeNode node = form.lyr1().tabFavourites().treFavourites().getNodes().get(i);
		String nodeText = node.getText();
		if (nodeText != null && nodeText.startsWith(folder))
			return node;
	}
	return null;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void processNodeRename(TreeNode node)
{
	if(node != null)
	{
		String nodeText = node.getText();
		
		Object value = node.getValue();
		if(value != null)
		{
			if(value instanceof AppTopButtonSectionVo)
			{
				if(nodeText == null || nodeText.length() == 0)
					nodeText = " ";
				((AppTopButtonSectionVo)value).setText(nodeText);
			}				
			else if(value instanceof AppTopButtonVo)
			{
				if(nodeText == null || nodeText.length() == 0)
				{
					nodeText = "Untitled";
					node.setText(nodeText);						
				}
				
				((AppTopButtonVo)value).setText(nodeText);					
			}
		}
	}
}