net.sf.latexdraw.glib.views.pst
Class PSTViewsSynchroniser

java.lang.Object
  extended by net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniser
      extended by net.sf.latexdraw.glib.views.pst.PSTViewsSynchroniser

public class PSTViewsSynchroniser
extends ViewsSynchroniser

Defines a synchroniser between a sets of Java2D views and their PSTricks views.

This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw 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 of the License, or (at your option) any later version.
LaTeXDraw is distributed 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.

05/23/2010

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
 
Fields inherited from class net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniser
drawing, handler, viewsCode
 
Constructor Summary
PSTViewsSynchroniser(ViewsSynchroniserHandler h, IDrawing drawing)
          Creates and launches the synchronisation of the synchroniser.
 
Method Summary
 PSTShapeView<?> getView(IShape shape)
           
 PSTShapeView<?> getViewAt(int position)
           
 void synchronise()
          Synchronises the Java2D views with their PSTricks views.
 boolean updateCode(IShape view)
          Updates the code corresponding to the given shape.
 void updateFull()
          Updates the cache of every shapes.
 
Methods inherited from class net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniser
clean, getDrawing, getHandler, setHandler, setViews2D
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSTViewsSynchroniser

public PSTViewsSynchroniser(ViewsSynchroniserHandler h,
                            IDrawing drawing)
Creates and launches the synchronisation of the synchroniser.

Parameters:
drawing - The shapes to synchronise.
h - The object called for several operations needed by the synchroniser.
Since:
3.0
Method Detail

synchronise

public void synchronise()
Description copied from class: ViewsSynchroniser
Synchronises the Java2D views with their PSTricks views.

Specified by:
synchronise in class ViewsSynchroniser

getView

public PSTShapeView<?> getView(IShape shape)
Overrides:
getView in class ViewsSynchroniser
Parameters:
shape - The shape that the researched view contains.
Returns:
The corresponding code view or null.

getViewAt

public PSTShapeView<?> getViewAt(int position)
Overrides:
getViewAt in class ViewsSynchroniser
Parameters:
position - The position of the researched views.
Returns:
The corresponding code view at the given position or null.

updateCode

public boolean updateCode(IShape view)
Description copied from class: ViewsSynchroniser
Updates the code corresponding to the given shape.

Specified by:
updateCode in class ViewsSynchroniser
Parameters:
view - The shape to updated.
Returns:
True if the code has been updated.

updateFull

public void updateFull()
Updates the cache of every shapes.

Since:
3.0