|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniser
public abstract class ViewsSynchroniser
Defines an abstract synchroniser between a sets of Java2D views and other 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/25/2010
Field Summary | |
---|---|
protected IDrawing |
drawing
The shapes to synchronise. |
protected ViewsSynchroniserHandler |
handler
The handler thats provides information to the synchroniser. |
protected java.util.Map<IShape,AbstractCodeView<?>> |
viewsCode
The code views to synchronise. |
Constructor Summary | |
---|---|
ViewsSynchroniser(ViewsSynchroniserHandler h,
IDrawing drawing)
Creates and initialises the synchroniser. |
Method Summary | |
---|---|
void |
clean()
Removes the useless PSTricks views still in the synchroniser but removed from the drawing. |
IDrawing |
getDrawing()
|
ViewsSynchroniserHandler |
getHandler()
|
AbstractCodeView<?> |
getView(IShape shape)
|
AbstractCodeView<?> |
getViewAt(int position)
|
void |
setHandler(ViewsSynchroniserHandler handler)
|
void |
setViews2D(IDrawing drawing)
|
abstract void |
synchronise()
Synchronises the Java2D views with their PSTricks views. |
abstract boolean |
updateCode(IShape shape)
Updates the code corresponding to the given shape. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ViewsSynchroniserHandler handler
protected IDrawing drawing
protected java.util.Map<IShape,AbstractCodeView<?>> viewsCode
Constructor Detail |
---|
public ViewsSynchroniser(ViewsSynchroniserHandler h, IDrawing drawing)
h
- The handler.drawing
- The shapes to handle.
java.lang.IllegalArgumentException
- If the given views or handler is null.Method Detail |
---|
public abstract void synchronise()
public abstract boolean updateCode(IShape shape)
shape
- The shape to updated.
public void clean()
public AbstractCodeView<?> getView(IShape shape)
shape
- The shape that the researched view contains.
public AbstractCodeView<?> getViewAt(int position)
position
- The position of the researched views.
public ViewsSynchroniserHandler getHandler()
public void setHandler(ViewsSynchroniserHandler handler)
handler
- The new handler thats provides information to the synchroniser.public IDrawing getDrawing()
public void setViews2D(IDrawing drawing)
drawing
- The drawing used to generate the code. Must not be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |