<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:jv="http://www.ilog.com/jviews/tlds/jviews-faces.tld" xmlns:jvf="http://www.ilog.com/jviews/tlds/jviews-framework-faces.tld" xmlns:jvcf="http://www.ilog.com/jviews/tlds/jviews-chart-faces.tld"> <f:view> <f:loadBundle basename="messages" var="msg" /> <head> <title><h:outputText value="#{msg.chartTitle}"/></title> <style> .menuItem { background: #ece9d8; color: black; font-family: sans-serif; font-size: 12px; } .menuItemHighlighted { background: #316ac5; color: white; } .menuItemDisabled { background: #ece9d8; font-style: italic; color: #aca899; } </style> </head> <body> <h:form> <jvcf:chartZoomInteractor id="chartZoomInteractor" XZoomAllowed="true" YZoomAllowed="false" /> <jvcf:chartPanInteractor id="chartPanInteractor" XPanAllowed="true" YPanAllowed="false" /> <jvcf:chartSelectInteractor id="chartSelectInteractor" valueChangeListener="#{chartBean.pointSelected}" objectSelectedFinder="#{chartBean.finder}" cursor="cross" pickingMode="NEAREST_POINT_PICKING" invocationContext="IMAGE_SERVLET_CONTEXT" /> <jv:interactorGroup id="selectPan" interactors="chartSelectInteractor chartPanInteractor"/> <jvcf:chartView id="chartView" interactorId="selectPan" data="/data/projLegend1.icpr" style="height:300px;width:100%"> <!-- for a dynamic menu, use factoryClass="demo.charts.ChartMenuFactory"--> <jvcf:chartContextualMenu value="#{chartBean.menu}" itemStyleClass="menuItem" itemHighlightedStyleClass="menuItemHighlighted" itemDisabledStyleClass="menuItemDisabled" pickingMode="item" /> </jvcf:chartView> <h:panelGrid columns="4"> <jv:imageButton id="fitButton" style="width:22px;height:22px" image="/images/zoomfit.gif" rolloverImage="/images/zoomfith.gif" selectedImage="/images/zoomfitd.gif" onclick="chartView.zoomToFit()" /> <jv:imageButton id="zoomButton" style="width:22px;height:22px" image="/images/zoomrect.gif" buttonGroupId="interactors" rolloverImage="/images/zoomrecth.gif" selectedImage="/images/zoomrectd.gif" onclick="chartView.setInteractor(chartZoomInteractor);" /> <!-- <jv:imageButton id="panButton" style="width:22px;height:22px" image="/images/pan.gif"--> <!-- buttonGroupId="interactors" rolloverImage="/images/panh.gif" selectedImage="/images/pand.gif"--> <!-- onclick="chartView.setInteractor(chartPanInteractor);" />--> <jv:imageButton id="selectButton" style="width:22px;height:22px" image="/images/arrow.gif" selected="true" buttonGroupId="interactors" rolloverImage="/images/arrowh.gif" selectedImage="/images/arrowd.gif" onclick="chartView.setInteractor(selectPan);" /> <h:outputText value="X:" /> <h:outputText value="#{chartBean.dataX}" /> <h:outputText value="Y:" /> <h:outputText value="#{chartBean.dataY}" /> </h:panelGrid> </h:form> </body> </f:view> </html>