/* Copyright (c) 1997-2004
 Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
 http://www.math.tu-berlin.de/polymake,  mailto:polymake@math.tu-berlin.de
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
 Free Software Foundation; either version 2, or (at your option) any
 later version: http://www.gnu.org/licenses/gpl.txt.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 $Project: polymake $$Id: StaticGeometryControl.java,v 1.8 2005/11/18 16:59:07 wotzlaw Exp $
 */

package de.tuberlin.polymake.common;

import java.io.BufferedReader;
import java.io.IOException;
import java.nio.channels.Pipe;

/**
 * This class implements ???
 * 
 * @author Thilo Schr&ouml;der
 */
public class StaticGeometryControl extends JavaviewControl {
	public StaticGeometryControl(
			BufferedReader psReader, BufferedReader clientReader, 
			Pipe.SinkChannel sink) throws IOException{
		super(psReader, clientReader,sink);
		
		StaticGeometryFrame geomFrame = new StaticGeometryFrame(geom,null,null,this);
		frameMap.put(geom.getName(),geomFrame);
		geomFrame.setVisible(true);
	}
	
	public void update() throws IOException {
		EmbeddedGeometries m_geom = PolymakeJvxParser.parse(psReader);
		StaticGeometryFrame geomFrame = new StaticGeometryFrame(m_geom,null,null,this);
		frameMap.put(m_geom.getName(),geomFrame);
		geomFrame.setVisible(true);
	}
}
