Back to index

moin  1.9.0~rc2
DrawingView.java
Go to the documentation of this file.
00001 /*
00002  * @(#)DrawingView.java 5.1
00003  *
00004  */
00005 
00006 package CH.ifa.draw.framework;
00007 
00008 import java.awt.image.ImageObserver;
00009 import java.awt.*;
00010 import java.util.*;
00011 import java.io.*;
00012 import CH.ifa.draw.util.*;
00013 
00038 public interface DrawingView extends ImageObserver, DrawingChangeListener {
00039 
00043     public void setEditor(DrawingEditor editor);
00044 
00048     public Tool tool();
00049 
00053     public Drawing drawing();
00054 
00055     public void enableGuides(boolean enable);
00056 
00057     public boolean guidesEnabled();
00058 
00062     public void setDrawing(Drawing d);
00063 
00067     public DrawingEditor editor();
00068 
00073     public Figure add(Figure figure);
00074 
00079     public Figure remove(Figure figure);
00080 
00084     public void addAll(Vector figures);
00085 
00089     public Dimension getSize();
00090 
00094     public Dimension getMinimumSize();
00095 
00099     public Dimension getPreferredSize();
00100 
00105     public void setDisplayUpdate(Painter updateStrategy);
00106 
00112     public Vector selection();
00113 
00117     public FigureEnumeration selectionElements();
00118 
00125     public Vector selectionZOrdered();
00126 
00130     public int selectionCount();
00131 
00135     public void addToSelection(Figure figure);
00136 
00140     public void addToSelectionAll(Vector figures);
00141 
00145     public void removeFromSelection(Figure figure);
00146 
00151     public void toggleSelection(Figure figure);
00152 
00156     public void clearSelection();
00157 
00162     public FigureSelection getFigureSelection();
00163 
00167     public void moveSelection(int dx, int dy);
00168 
00173     public Handle findHandle(int x, int y);
00174 
00178     public Point lastClick();
00179 
00183     public void setConstrainer(PointConstrainer p);
00184 
00188     public PointConstrainer getConstrainer();
00189 
00193     public void checkDamage();
00194 
00198     public void repairDamage();
00199 
00205     public void paint(Graphics g);
00206 
00210     public Image createImage(int width, int height);
00211 
00215     public Graphics getGraphics();
00216 
00220     public Color getBackground();
00221 
00225     public void setBackground(Color c);
00226 
00232     public void drawAll(Graphics g);
00233 
00237     public void drawHandles(Graphics g);
00238 
00242     public void drawDrawing(Graphics g, boolean showGuides);
00243 
00249     public void drawBackground(Graphics g);
00250 
00254     public void setCursor(Cursor c);
00255 
00260     public void freezeView();
00261 
00266     public void unfreezeView();
00267 }