1// BEGIN LICENSE BLOCK 2// Version: CMPL 1.1 3// 4// The contents of this file are subject to the Cisco-style Mozilla Public 5// License Version 1.1 (the "License"); you may not use this file except 6// in compliance with the License. You may obtain a copy of the License 7// at www.eclipse-clp.org/license. 8// 9// Software distributed under the License is distributed on an "AS IS" 10// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11// the License for the specific language governing rights and limitations 12// under the License. 13// 14// The Original Code is CPViz Constraint Visualization System 15// The Initial Developer of the Original Code is Helmut Simonis 16// Portions created by the Initial Developer are 17// Copyright (C) 2009-2010 Helmut Simonis 18// 19// Contributor(s): Helmut Simonis, 4C, Univerity College Cork, Cork 20// 21// 22// END LICENSE BLOCK 23// ---------------------------------------------------------------------- 24package ie.ucc.cccc.viz; 25 26import java.io.PrintWriter; 27import java.util.Map; 28 29/** 30 * Visualizer for the gcc_matrix constraint. Does nothing more than VisualizerMatrix 31 * @author hsimonis 32 * 33 */ 34public class VisualizerGCCMatrix extends VisualizerMatrix { 35 36 public VisualizerGCCMatrix(VisualContext context){ 37 super(context); 38 } 39 40 @Override 41 public void draw(PrintWriter out, VisualState visualState) { 42 FullDomainMap matrix = visualState.argument("3").asDomainMap(); 43 // debug help 44 out.println("<!-- Matrix " + context + " -->"); 45 // draw grid 46 standardGrid(out); 47 // draw entries 48 for(Map.Entry<Pair, FullDomain> entry : matrix.entrySet()){ 49 drawMatrixEntry(out,entry.getKey(),entry.getValue(),new FullDomain()); 50 } 51 } 52 53} 54 55