<%@ page contentType="text/html;charset=UTF-8pageEncoding="UTF-8"%>
<%--
 * Copyright (c) Rogue Wave Software, Inc. 1997, 2015
 * All rights reserved.
 *
 * This source code is an addition to the Rogue Wave JViews Reference Manual
 * delivered with the Rogue Wave JViews library.
 * It is supplied as an example to show you how to code with Rogue Wave JViews Charts Faces.
 * Feel free to use, copy, or modify it within the framework of your
 * Rogue Wave JViews license agreement.
 --%>
<%@ taglib uri="http://java.sun.com/jsf/core"   prefix="f%>
<%@ taglib uri="http://www.ilog.com/jviews/tlds/jviews-faces.tld" prefix="jv%>
<%@ taglib uri="http://www.ilog.com/jviews/tlds/jviews-framework-faces.tld" prefix="jvf%>
<%@ taglib uri="http://www.ilog.com/jviews/tlds/jviews-diagrammer-faces.tld" prefix="jvdf%>
<%@ taglib uri="http://www.ilog.com/jviews/tlds/jviews-tgo-faces.tld" prefix="jvtf%>
<%@ taglib uri="http://www.icesoft.com/icefaces/component" prefix="ice%>

<f:view>
<f:loadBundle basename="messagesvar="msg/>
<html>
<head>
<meta http-equiv="Content-Typecontent="text/html; charset=UTF-8/>
<title><ice:outputText value="#{msg.tgoTitle}"/></title>
<style>
  body { font-family: sans-serif; }
</style>
<style>
.titleStyle {
  font-weight: bold;
}

.buttonStyle {
  width: 22px;
  height: 22px;
}

.operationsStyle {
  border: double;
  width: 175px;
}

.overviewStyle {
  border: double;
  width: 175px;
}

.messageBoxStyle {
  border: double;
  width: 175px;
}

.mainComponentStyle {
  border: groove;
  width: 900px;
}

.overviewComponentStyle {
  width: 155px;
  height: 100px;
}

.menuItem {
  background: #e5e5e5;
  font-family: sans-serif;
  font-size: 12px;
  color: black;
}

.menuItemHighlighted {
  background: #fefdfe;
}

.menuItemDisabled {
  color: #b19999;
}
</style>
</head>
<body>

<h1><ice:outputText value="#{msg.tgoH1}"/></h1>
<p><ice:outputText value="#{msg.tgoP1}"/></p>
<ul>
  <li><ice:outputText value="#{msg.tgoLi1}"/></li>
  <li><ice:outputText value="#{msg.tgoLi2}"/></li>
  <li><ice:outputText value="#{msg.tgoLi3}"/></li>
  <li><ice:outputText value="#{msg.tgoLi4}"/></li>
</ul>

<ice:form id="form">
  <!-- Declare the predefined interactors -->
  <jvf:zoomInteractor id="zoomInteractormenuModelId="#{popupMenuFactory.zoomMenuModelId}/>
  <jvf:panInteractor id="panInteractormenuModelId="#{popupMenuFactory.panMenuModelId}/>
  <jvtf:clientSelectInteractor id="selectInteractor"
    menuModelId="#{popupMenuFactory.selectMenuModelId}/>
  <ice:panelGrid columns="2styleClass="mainComponentStyle">
    <ice:panelGrid columns="1">
      <ice:outputText id="networkTitlevalue="NetworkstyleClass="titleStyle/>
      <!-- Declare the network JSF component -->
      <jvtf:networkView id="networkViewcontext="#{sampleContext.context}width="700height="400"
        network="#{sampleContext.network}imageFormat="PNG">
        <f:facet name="selectionManager">
          <jvtf:selectionManager id="selectionManagerimageMode="falselineColor="#D0D0D0"
            lineWidth="2/>
        </f:facet>
        <!-- Declare the contextual menu with given pop-up menu factory -->
        <jvf:contextualMenu factory="#{popupMenuFactory}itemStyleClass="menuItem"
          itemHighlightedStyleClass="menuItemHighlighteditemDisabledStyleClass="menuItemDisabled/>
      </jvtf:networkView>
    </ice:panelGrid>
    <ice:panelGrid columns="1styleClass="tableStyle">
      <ice:panelGrid columns="1styleClass="overviewStyle">
        <ice:outputText id="overviewTitlevalue="#{msg.tgoOverview}styleClass="titleStyle/>
        <jvf:overview id="overviewviewId="networkViewstyleClass="overviewComponentStyle/>
      </ice:panelGrid>
      <ice:panelGrid columns="1styleClass="operationsStyle">
        <ice:panelGrid columns="1">
          <ice:outputText id="toolbarTitlevalue="#{msg.tgoOperations}styleClass="titleStyle/>
        </ice:panelGrid>
        <!-- Declare the six buttons -->
        <ice:panelGrid columns="6">
          <jv:imageButton id="selectButtonstyleClass="buttonStyle"
            onclick="networkView.setInteractor(selectInteractor)"
            image="/resources/images/toolbar/arrow.gifbuttonGroupId="interactors"
            rolloverImage="/resources/images/toolbar/arrowh.gif"
            selectedImage="/resources/images/toolbar/arrowd.gifmessageBoxId="messages"
            title="#{msg.SelectInteractorTitle}message="#{msg.SelectInteractorMsg}/>
          <jv:imageButton id="panButtonstyleClass="buttonStyle"
            onclick="networkView.setInteractor(panInteractor)"
            image="/resources/images/toolbar/pan.gifbuttonGroupId="interactors"
            rolloverImage="/resources/images/toolbar/panh.gif"
            selectedImage="/resources/images/toolbar/pand.gifmessageBoxId="messages"
            title="#{msg.PanInteractorTitle}message="#{msg.PanInteractorMsg}/>
          <jv:imageButton id="zoomButtonstyleClass="buttonStyle"
            onclick="networkView.setInteractor(zoomInteractor)"
            image="/resources/images/toolbar/zoomrect.gifbuttonGroupId="interactors"
            rolloverImage="/resources/images/toolbar/zoomrecth.gif"
            selectedImage="/resources/images/toolbar/zoomrectd.gifmessageBoxId="messages"
            title="#{msg.ZoomInteractorTitle}message="#{msg.ZoomInteractorMsg}/>
          <jv:imageButton id="showAllButtonstyleClass="buttonStyle"
            onclick="networkView.showAll(true)image="/resources/images/toolbar/zoomfit.gif"
            rolloverImage="/resources/images/toolbar/zoomfith.gif"
            selectedImage="/resources/images/toolbar/zoomfitd.gifmessageBoxId="messages"
            title="#{msg.ShowAllTitle}message="#{msg.ShowAllMsg}/>
          <jv:imageButton id="zoomInButtonstyleClass="buttonStyle"
            onclick="networkView.zoomIn(true)image="/resources/images/toolbar/zoom.gif"
            rolloverImage="/resources/images/toolbar/zoomh.gif"
            selectedImage="/resources/images/toolbar/zoomd.gifmessageBoxId="messages"
            title="#{msg.ZoomInTitle}message="#{msg.ZoomInMsg}/>
          <jv:imageButton id="zoomOutButtonstyleClass="buttonStyle"
            onclick="networkView.zoomOut(true)image="/resources/images/toolbar/unzoom.gif"
            rolloverImage="/resources/images/toolbar/unzoomh.gif"
            selectedImage="/resources/images/toolbar/unzoomd.gifmessageBoxId="messages"
            title="#{msg.ZoomOutTitle}message="#{msg.ZoomOutMsg}/>
        </ice:panelGrid>
      </ice:panelGrid>
      <ice:panelGrid id="messageGridcolumns="1styleClass="messageBoxStyle">
        <ice:outputText id="messageTitlevalue="#{msg.tgoMessages}styleClass="titleStyle/>
        <jv:messageBox height="22width="100id="messagesstyleClass="text/>
      </ice:panelGrid>
    </ice:panelGrid>
  </ice:panelGrid>
</ice:form>

</body>
</html>
</f:view>