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 The ECLiPSe Constraint Logic Programming System. 15// The Initial Developer of the Original Code is Cisco Systems, Inc. 16// Portions created by the Initial Developer are 17// Copyright (C) 2006 Cisco Systems, Inc. All Rights Reserved. 18// 19// Contributor(s): 20// 21// END LICENSE BLOCK 22 23package com.parctechnologies.eclipse.visualisation; 24 25/** 26 * Interface for objects which can produce new viewers when viewables are 27 * created. 28 */ 29public interface ViewerFactory 30{ 31 /** 32 * The ViewerFactory must be able to say, given a ViewableType, whether or 33 * not it can build a viewer from it. The ability to build the viewer can 34 * therefore depend only on the number and fixity of the dimensions and the 35 * element type. 36 */ 37 boolean canBuildFrom(ViewableType viewableType); 38 39 /** 40 * The contract for this method is to instantiate Viewer and initialise it 41 * as much as is possible given the basic information in the Viewable. 42 * Further initialisation of viewers comes later when the viewer has had a 43 * chance to execute some preEventGoals. 44 */ 45 Viewer build(Viewable viewable); 46} 47 48