|
JHotDraw 7.0.9 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DrawingView
DrawingView renders a Drawing and listens to its changes. It receives user input and forwards it to registered listeners.
Method Summary | |
---|---|
void |
addFigureSelectionListener(FigureSelectionListener fsl)
Add a listener for selection changes in this DrawingView. |
void |
addKeyListener(java.awt.event.KeyListener l)
|
void |
addMouseListener(java.awt.event.MouseListener l)
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener l)
|
void |
addNotify(DrawingEditor editor)
Informs the view that it has been added to the specified editor. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
addToSelection(java.util.Collection<Figure> figures)
Adds a collection of figures to the current selection. |
void |
addToSelection(Figure figure)
Adds a figure to the current selection. |
void |
clearSelection()
Clears the current selection. |
java.awt.Point |
drawingToView(java.awt.geom.Point2D.Double p)
Converts drawing coordinates to view coordinates. |
java.awt.Rectangle |
drawingToView(java.awt.geom.Rectangle2D.Double p)
Converts drawing coordinates to view coordinates. |
Figure |
findFigure(java.awt.Point p)
Finds a figure at the given point. |
java.util.Collection<Figure> |
findFigures(java.awt.Rectangle r)
Returns all figures that lie within or intersect the specified bounds. |
java.util.Collection<Figure> |
findFiguresWithin(java.awt.Rectangle r)
Returns all figures that lie within the specified bounds. |
Handle |
findHandle(java.awt.Point p)
Finds a handle at the given coordinates. |
java.util.Collection<Handle> |
getCompatibleHandles(Handle handle)
Gets compatible handles. |
javax.swing.JComponent |
getComponent()
Returns the JComponent of the drawing view. |
Constrainer |
getConstrainer()
Gets the editor's constrainer. |
Drawing |
getDrawing()
Gets the drawing. |
java.awt.geom.AffineTransform |
getDrawingToViewTransform()
Gets an transform which can be used to convert drawing coordinates to view coordinates. |
int |
getHandleDetailLevel()
Returns the detail level of the handles. |
double |
getScaleFactor()
Gets the scale factor of the drawing view. |
java.util.Set<Figure> |
getSelectedFigures()
Gets the current selection as a FigureSelection. |
int |
getSelectionCount()
Gets the number of selected figures. |
boolean |
isEnabled()
Gets the enabled state of the drawing view. |
boolean |
isFigureSelected(Figure checkFigure)
Test whether a given figure is selected. |
void |
removeFigureSelectionListener(FigureSelectionListener fsl)
Remove a listener for selection changes in this DrawingView. |
void |
removeFromSelection(Figure figure)
Removes a figure from the selection. |
void |
removeKeyListener(java.awt.event.KeyListener l)
|
void |
removeMouseListener(java.awt.event.MouseListener l)
|
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener l)
|
void |
removeNotify(DrawingEditor editor)
Informs the view that it has been removed from the specified editor. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
requestFocus()
|
void |
selectAll()
Selects all figures. |
void |
setConstrainer(Constrainer constrainer)
Sets the editor's constrainer. |
void |
setCursor(java.awt.Cursor c)
Sets the cursor of the DrawingView |
void |
setDrawing(Drawing d)
Sets and installs another drawing in the view. |
void |
setEnabled(boolean newValue)
Sets the enabled state of the drawing view. |
void |
setHandleDetailLevel(int newValue)
The detail level of the handles. |
void |
setScaleFactor(double newValue)
Sets the scale factor of the drawing view. |
void |
toggleSelection(Figure figure)
If a figure isn't selected it is added to the selection. |
java.awt.geom.Point2D.Double |
viewToDrawing(java.awt.Point p)
Converts view coordinates to drawing coordinates. |
java.awt.geom.Rectangle2D.Double |
viewToDrawing(java.awt.Rectangle p)
Converts view coordinates to drawing coordinates. |
Method Detail |
---|
Drawing getDrawing()
void setDrawing(Drawing d)
void setCursor(java.awt.Cursor c)
boolean isFigureSelected(Figure checkFigure)
void addToSelection(Figure figure)
void addToSelection(java.util.Collection<Figure> figures)
void removeFromSelection(Figure figure)
void toggleSelection(Figure figure)
void clearSelection()
void selectAll()
java.util.Set<Figure> getSelectedFigures()
int getSelectionCount()
Handle findHandle(java.awt.Point p)
java.util.Collection<Handle> getCompatibleHandles(Handle handle)
Figure findFigure(java.awt.Point p)
java.util.Collection<Figure> findFigures(java.awt.Rectangle r)
java.util.Collection<Figure> findFiguresWithin(java.awt.Rectangle r)
void addNotify(DrawingEditor editor)
void removeNotify(DrawingEditor editor)
void addMouseListener(java.awt.event.MouseListener l)
void removeMouseListener(java.awt.event.MouseListener l)
void addKeyListener(java.awt.event.KeyListener l)
void removeKeyListener(java.awt.event.KeyListener l)
void addMouseMotionListener(java.awt.event.MouseMotionListener l)
void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
void addFigureSelectionListener(FigureSelectionListener fsl)
fsl
- jhotdraw.framework.FigureSelectionListenervoid removeFigureSelectionListener(FigureSelectionListener fsl)
fsl
- jhotdraw.framework.FigureSelectionListenervoid requestFocus()
java.awt.Point drawingToView(java.awt.geom.Point2D.Double p)
java.awt.geom.Point2D.Double viewToDrawing(java.awt.Point p)
java.awt.Rectangle drawingToView(java.awt.geom.Rectangle2D.Double p)
java.awt.geom.Rectangle2D.Double viewToDrawing(java.awt.Rectangle p)
void setConstrainer(Constrainer constrainer)
Constrainer getConstrainer()
javax.swing.JComponent getComponent()
java.awt.geom.AffineTransform getDrawingToViewTransform()
double getScaleFactor()
void setScaleFactor(double newValue)
void setHandleDetailLevel(int newValue)
int getHandleDetailLevel()
void setEnabled(boolean newValue)
boolean isEnabled()
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |