#  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: JavaViewStaticViewer.pm,v 1.6 2004/12/06 16:40:58 gawrilow Exp $

package JavaView::Static::Viewer;

###########################################################################################
#
#  Static (file-based) implementation of the Viewer interface
#
use BackgroundViewer;
use JavaView;

use Struct [ '@ISA' => 'SimpleViewer', 'JavaView::Viewer' ];

sub new {
   my $self=&_new;
   $self->graphics=new JavaView::File(TITLE => $_[0], workfile => $self->tempfile.".jvx");
   $self;
}

sub command {
   "$JavaView::Viewer::java -cp $JavaView::Viewer::classpath javaview CodeBase=$JavaView::Viewer::install_top " .
   $_[0]->graphics->{workfile};
}

sub append {
   my $self=shift;
   $self->graphics->append(@_);
}

1

# Local Variables:
# c-basic-offset:3
# End:
