<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<tr:document xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core" xmlns:tr="http://myfaces.apache.org/trinidad"
  xmlns:trh="http://myfaces.apache.org/trinidad/html"
  xmlns:jv="http://www.ilog.com/jviews/tlds/jviews-faces.tld"
  xmlns:jvcf="http://www.ilog.com/jviews/tlds/jviews-chart-faces.tld">
    <f:loadBundle basename="messages" var="msg" /> 
  <trh:head title="#{msg.chartAndTrinidadTitle}"/>  
   <f:facet name="metaContainer">
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  </f:facet>
  <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>
  <tr:form>
    <tr:panelTabbed position="above">
      <tr:showDetailItem text="#{msg.FakeItem}">
         <p><tr:outputText value="#{msg.FakeitemPPR}"/></p>
      </tr:showDetailItem>
      <tr:showDetailItem text="#{msg.ChartsTest}">
        <jvcf:chartZoomInteractor id="chartZoomInteractor" XZoomAllowed="true" partialSubmit="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" partialSubmit="true" />
          
        <jv:interactorGroup id="selectPan" interactors="chartSelectInteractor chartPanInteractor"/>
        <!--  JV-3917: remove some leftover partial triggers -->  
        <jvcf:chartView id="chartView" interactorId="chartSelectInteractor" data="/data/projLegend1.icpr"
          style="height:300px;width:100%" partialTriggers="chartPanInteractor chartSelectInteractor chartZoomInteractor">
          <!--   factoryClass="demo.charts.ChartMenuFactory"-->
          <!--   static menu: factoryClass="demo.charts.ChartMenuFactory" -->
          <jvcf:chartContextualMenu value="#{chartBean.menu}" itemStyleClass="menuItem" baseTextDirection="RTL"
            itemHighlightedStyleClass="menuItemHighlighted" 
            itemDisabledStyleClass="menuItemDisabled" pickingMode="item" />
        </jvcf:chartView>
        <tr:panelGroupLayout layout="horizontal">
          <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);" />
          <tr:outputText value="X:" />
          <tr:outputText value="#{chartBean.dataX}" partialTriggers="chartSelectInteractor" />
          <tr:outputText value="Y:" />
          <tr:outputText value="#{chartBean.dataY}" partialTriggers="chartSelectInteractor" />
        </tr:panelGroupLayout>
      </tr:showDetailItem>
    </tr:panelTabbed>
  </tr:form>
</tr:document>