// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Network component additional customization // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Network { view: true; toolbar: true; interactor: true; zooming: true; backgrounds: true; } // Configure the view View { keepingAspectRatio: true; maxZoomXFactor: 10; maxZoomYFactor: 10; horizontalScrollBarPolicy: Never; verticalScrollBarPolicy: Never; } // Configure the toolbar. ToolBar { enabled: true; button[0]: @+SelectButton; button[1]: @+PanButton; button[2]: @+ZoomInButton; button[3]: @+ZoomOutButton; button[4]: @+ZoomViewButton; button[5]: @+ZoomBackButton; button[6]: @+ZoomResetButton; button[7]: @+FitToContentsButton; button[8]: @+MagnifyButton; button[9]: @+AutoMagnifyButton; } #SelectButton { actionType: "Select"; usingObjectInteractor: true; opaqueMove: true; action[0]: @+action0; } #action0 { key: "control A"; class: "ilog.cpl.graph.action.IlpSelectAllObjectsAction"; } #PanButton { actionType: "Pan"; usingObjectInteractor: false; } #ZoomInButton { actionType: "ZoomIn"; } #ZoomOutButton { actionType: "ZoomOut"; } #ZoomViewButton { actionType: "ZoomView"; usingObjectInteractor: false; } #ZoomBackButton { actionType: "ZoomBack"; } #ZoomResetButton { actionType: "ZoomReset"; } #FitToContentsButton { actionType: "FitToContents"; margins: "5"; } #MagnifyButton { actionType: "bandwidth.Magnify"; name: "Magnify"; toolTipText: '@|resource("SampleMessages", "tooltip.magnify")'; icon: @+magnifyIcon; usingObjectInteractor: false; // Note that this magnify effect consumes memory // proportional to factor * lensSize factor: 2; lensSize: 200; } #magnifyIcon { class: javax.swing.ImageIcon; image: @|image("magnify.png"); } #AutoMagnifyButton { actionType: "bandwidth.AutoMagnify"; name: "AutoMagnify"; toolTipText: '@|resource("SampleMessages", "tooltip.autoMagnify")'; icon: @+autoMagnifyIcon; usingObjectInteractor: false; // Note that this magnify effect consumes memory // proportional to factor * lensSize factor: 2; lensSize: 200; } #autoMagnifyIcon { class: javax.swing.ImageIcon; image: @|image("automagnify.png"); } // Set the default interactor. Interactor { name: "AutoMagnify"; } // Set the Mixed zoom policy. Zooming { type: "Mixed"; } // Load a background file. Backgrounds { background[0]: "us_map.png"; } // ----------------------------------------------------------- // Object Customization // ----------------------------------------------------------- object."ilog.tgo.model.IltObject" { labelBackground: #80FFFFFF; } object."ilog.tgo.model.IltLink" { lineWidth: 1; borderWidth: 1; } // // Change the link width according to the performance state // object."ilog.tgo.model.IltLink"["objectState.Performance.SecState.In" > 30] { lineWidth: @|@"objectState.Performance.SecState.In"/10-2; } // // Change the link width according to the performance state // The selector order is important, for more information, see the // JTGO User's Manual - Introducing Cascading Style Sheets // object."ilog.tgo.model.IltLink"["objectState.Performance.SecState.In" > 75] { borderWidth: 2; lineWidth: @|@"objectState.Performance.SecState.In"/10-2; }