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

The following are Jave code examples for showing how to use setTooltip() 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 void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceMidVoCollection voLocationServices;
	voLocationServices = domain.listLocationServiceLite(voLocation);
	TreeNode childServiceNode = null;
	clearServiceNodes(node);
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : ""));
			childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i)));
			childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.sortChildrenByText();
			childServiceNode.setExpanded(false);
		}
	}

	node.setExpanded(true);

	form.lyr1().Details().chkHTMLActiveOnly().setValue(true);
	form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node));

}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private void populatePricing(TreeNode rootNode, ActivityContextPricingDetailsVoCollection voCollActivityContextPricing)
{
	voCollActivityContextPricing.sort();

	if (rootNode.getNodes().size() > 0)
		rootNode.getNodes().clear();

	setHospitalSpecialtyProcedure();

	TreeNode pricingNode;
	for (int j = 0; j < voCollActivityContextPricing.size(); j++)
	{
		if ((voCollActivityContextPricing.get(j).getIsActiveIsNotNull() && voCollActivityContextPricing.get(j).getIsActive().booleanValue() && voCollActivityContextPricing.get(j).getEffectiveTo() == null && form.lyr1().Edit().lyrLocationDetail().tabPagePricing().chkActivePricing().getValue()) || form.lyr1().Edit().lyrLocationDetail().tabPagePricing().chkActivePricing().getValue() == false)
		{
			StringBuffer sb = createPricingString(voCollActivityContextPricing.get(j));
			pricingNode = rootNode.getNodes().add(voCollActivityContextPricing.get(j), sb.toString());
			pricingNode.setCollapsedImage(voCollActivityContextPricing.get(j).getCurrency().getImage() == null ? form.getImages().Core.help1 : voCollActivityContextPricing.get(j).getCurrency().getImage());
			pricingNode.setExpandedImage(voCollActivityContextPricing.get(j).getCurrency().getImage() == null ? form.getImages().Core.help1 : voCollActivityContextPricing.get(j).getCurrency().getImage());
			if (voCollActivityContextPricing.get(j).getEffectiveToIsNotNull())
				pricingNode.setTextColor(Color.Gray);

			pricingNode.setTooltip(createPricingTooltip(voCollActivityContextPricing.get(j)));
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private void addUrl(TreeNode parentNode, AppTopButtonVo value, boolean autoSelect) 
{
	if(parentNode != null && value != null)
	{
		String nodeText = value.getText();
		if(nodeText == null)
			nodeText = " ";
		
		TreeNode node = parentNode.getNodes().add(value, nodeText, autoSelect, BUTTON_DRAGDROP_TYPE, new int[] { BUTTONS_DRAGDROP_TYPE, SECTION_DRAGDROP_TYPE });
		
		node.setSelectedImage(form.getImages().Core.Web);
		node.setCollapsedImage(form.getImages().Core.Web);
		node.setExpandedImage(form.getImages().Core.Web);
		node.setTooltip(value.getURL());	
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private void populateGrid(TreeNode parentNode, IFlag[] flags) 
{
	Image expImage = form.getImages().Core.YellowFlag;
	Image collImage = form.getImages().Core.YellowFlag;		
	
	TreeNode node = null;
	for (int i = 0; i < flags.length; i++)
	{
		IFlag flag = flags[i];
		node = parentNode.getNodes().add(flag, flag.getName());
		if (flag.isSystem())
		{
			node.setCollapsedImage(form.getImages().Core.RedFlag);
			node.setExpandedImage(form.getImages().Core.RedFlag);
		}
		else
		{
			node.setCollapsedImage(collImage);
			node.setExpandedImage(expImage);				
		}
		node.setTooltip(flag.getToolTip());
		node.setValue(flag);
	}		
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private MyOrderComponentVo addComponentToTree(TreeNode node, SelectedComponentFromSelectOrderVo component, Image image)
{
	node.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	node.setCollapsedImage(image);

	MyOrderComponentVo orderComponent = new MyOrderComponentVo();
	orderComponent.setID(component.getID());
	orderComponent.setComponentType(component.getComponentType());
	orderComponent.setText(component.getText());
	orderComponent.setCategory(component.getCategory());
	orderComponent.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	orderComponent.setParentInvestigationId(component.getParentInvestigationId());
	orderComponent.setIsAddon(component.getIsAddon());
	orderComponent.setRequiresSite(component.getRequiresSite());
	orderComponent.setServiceID(component.getServiceID());
	orderComponent.setMinReOrderPeriod(component.getMinReOrderPeriod());
	orderComponent.setMinReOrderVal(component.getMinReOrderVal());
	orderComponent.setMinReOrderFemalePeriod(component.getMinReOrderFemalePeriod());
	orderComponent.setMinReOrderFemaleVal(component.getMinReOrderFemaleVal());
	orderComponent.setPhlebMayCollect(component.getPhlebMayCollect());
	orderComponent.setGenderSpecific(component.getGenderSpecific());
	orderComponent.setReOrderReason(component.getReOrderReason());//WDEV-16624

	return orderComponent;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateTree(SessionShortVoCollection voCollSession) 
{
	form.treSessions().clear();
	TreeNode node;
	
	for(int i=0;i<voCollSession.size();i++)
	{
		node = form.treSessions().getNodes().add(voCollSession.get(i), voCollSession.get(i).toString());
		if(voCollSession.get(i).getIsActiveIsNotNull() && voCollSession.get(i).getIsActive().equals(Boolean.TRUE))
		{
			if(voCollSession.get(i).getSessionStatusIsNotNull())
			{
				if(voCollSession.get(i).getSessionStatus().equals(Session_Status_and_Reason.OPEN))
					node.setCollapsedImage(form.getImages().Core.Tick);
				else if(voCollSession.get(i).getSessionStatus().equals(Session_Status_and_Reason.CANCELLED))
				{
					node.setCollapsedImage(form.getImages().Scheduling.Cancelled);
					
					String nodeTooltip = voCollSession.get(i).getCancellationReason() != null ? "<b>Cancellation reason: </b>" + voCollSession.get(i).getCancellationReason().getText() + "<br>": "";
					
					if (voCollSession.get(i).getComment() != null)
					{
						nodeTooltip = nodeTooltip + "<b>Comment: </b>" + voCollSession.get(i).getComment();
					}
					
					node.setTooltip(nodeTooltip);
				}
				else if(voCollSession.get(i).getSessionStatus().equals(Session_Status_and_Reason.BLOCKED))
				{
					node.setCollapsedImage(form.getImages().Core.RedFlag);
					node.setTooltip(voCollSession.get(i).getComment() != null ? "<b>Block reason: </b>" + voCollSession.get(i).getComment() : "");
				}
			}
		}
		else
			node.setCollapsedImage(form.getImages().Core.Delete);
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
/**
 * populates the screen from data from specified Vo Collection
 * 
 * @param ServiceVoCollection
 * @return void
 */
public void populateListControl(ServiceVoCollection voColl)
{
	clear();

	if (voColl == null || voColl.size() == 0)
	{
		engine.showMessage("No results found.");
		return;
	}

	for (int i = 0; i < voColl.size(); i++)
	{
		ServiceVo voService = voColl.get(i);
		if (voService.getServiceNameIsNotNull())
		{
			TreeNode newNode = form.treService().getNodes().add(voService, (voService.getServiceNameIsNotNull() ? voService.getServiceName() : ""));
			newNode.setTooltip(formatServicevoTooltip(voService));
			newNode.setExpandedImage(form.getImages().Admin.Service);
			newNode.setCollapsedImage(form.getImages().Admin.Service);
			newNode.setSelectedImage(form.getImages().Admin.Service);
			if (voService.getIsActiveIsNotNull() && !voService.getIsActive().booleanValue())
				newNode.setTextColor(Color.Red);

			if (!ConfigFlag.UI.SERVICE_TABS.getValue(false).equalsIgnoreCase("NONE"))
				newNode.getNodes().add(null, "Loading Please wait...");
		}
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceVoCollection voLocationServices = domain.listLocationService(voLocation);
	TreeNode childServiceNode = null;
	String service = "";
	String HtmlOut = "";
	node.getNodes().clear();
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull() && voLocationServices.get(i).getService().getServiceNameIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), voLocationServices.get(i).getService().getServiceName());
			service = formatServiceVo(voLocationServices.get(i));
			HtmlOut += service;
			childServiceNode.setTooltip(service);
			childServiceNode.setExpandedImage(form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(form.getImages().Admin.Service);
		}
	}

	node.setExpanded(true);

	String out = "";
	if (voLocation.getNameIsNotNull() && voLocationServices.size() > 0)
	{
		out = makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + ": " + voLocation.getName() + "*</CENTER>", "SlateBlue", "tahoma", "14");
		out += HtmlOut;
		form.htmProviderView().setHTML(new TextileString(out).toString());
	}
	else
		form.htmProviderView().setHTML("");

}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void addForm(TreeNode parentNode, AppTopButtonVo value, boolean autoSelect) 
{
	String nodeText = value.getText();
	if(nodeText == null)
		nodeText = " ";
	
	if(parentNode != null && value != null)
	{
		TreeNode node = parentNode.getNodes().add(value, nodeText, autoSelect, BUTTON_DRAGDROP_TYPE, new int[] { BUTTONS_DRAGDROP_TYPE, SECTION_DRAGDROP_TYPE });
		
		node.setSelectedImage(form.getImages().Core.Form);
		node.setCollapsedImage(form.getImages().Core.Form);
		node.setExpandedImage(form.getImages().Core.Form);			
		node.setTooltip(buildFormTooltip(value));
		
		if (engine.getRegisteredForm(value.getForm()).isDialog())
		{
			//Display maximise button if available on dialog open by top button
			TreeNode nodeChild = node.getNodes().add(value, "Show maximize button", false);
			nodeChild.setIdentifier(DIALOG_MAXIMISE_BUTTON_TAG);
			nodeChild.setCheckBoxVisible(true);				
			nodeChild.setChecked(value != null ? (value.getDisplayMaximiseButton() == null ? false : value.getDisplayMaximiseButton()) : false);
			
			//Display close button if available on dialog open by top button
			nodeChild = node.getNodes().add(value, "Enable close button if available", false);
			nodeChild.setIdentifier(DIALOG_CLOSE_BUTTON_TAG);
			nodeChild.setCheckBoxVisible(true);				
			nodeChild.setChecked(value != null ? (value.getDisplayCloseButton() == null ? false : value.getDisplayCloseButton()) : false);
		}
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void loadComponents(MyOrderComponentVoCollection components)
{
	for (int x = 0; x < components.size(); x++)
	{
		MyOrderComponentVo component = components.get(x);

		if (component != null)
		{
			boolean isProfile = false;
			TreeNode node = form.treeComponents().getNodes().add(component, component.getText());
			if (component.getTooltipIsNotNull())
				node.setTooltip(component.getTooltip());
			isProfile = component.getComponentTypeIsNotNull() && component.getComponentType().equals(SelectAndOrderComponentType.PROFILE);
			node.setExpandedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
			node.setCollapsedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
			node.setExpanded(true);

			if (component.getComponentsIsNotNull())
			{
				for (int y = 0; y < component.getComponents().size(); y++)
				{
					MyOrderChildComponentVo childComponent = component.getComponents().get(y);

					TreeNode childNode = node.getNodes().add(childComponent, childComponent.getText());
					if (childComponent.getTooltipIsNotNull())
						childNode.setTooltip(childComponent.getTooltip());
					isProfile = childComponent.getComponentTypeIsNotNull() && childComponent.getComponentType().equals(SelectAndOrderComponentType.PROFILE);
					childNode.setExpandedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
					childNode.setCollapsedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
				}
			}
		}
	}
}