|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
The class DrawView displays a graphic model. It is responsible for the presentation of the model and the interaction with the user (selecting, moving and dragging new figures). The type of new figures which are generated if a rectangle is drawn is defined by the currently installed factory.
DrawModel,
DrawTool| Method Summary | |
void |
addToSelection(jdraw.framework.Figure f)
Adds a figure to the selected figures. |
void |
clearSelection()
Clears the selection. |
jdraw.framework.PointConstrainer |
getConstrainer()
Gets the current grid setting. |
jdraw.framework.DrawEditor |
getEditor()
Returns the draw editor which contains this view. |
jdraw.framework.DrawModel |
getModel()
Returns the graphic model of this view. |
java.util.Set |
getSelection()
Returns the selected figures. |
java.awt.Dimension |
getSize()
Returns the size of the drawing. |
jdraw.framework.DrawTool |
getTool()
Returns the currently active tool. |
void |
paint(java.awt.Graphics g)
Draws the graphic model. |
void |
removeFromSelection(jdraw.framework.Figure f)
Removes a figure from the selected figures. |
void |
repaint()
Repaints this view. |
void |
setConstrainer(jdraw.framework.PointConstrainer p)
Sets the current point constrainer. |
void |
setCursor(java.awt.Cursor c)
Sets the cursor of the DrawingView. |
void |
setDefaultTool()
Sets the default tool (selection and moving of figures). |
void |
setTool(jdraw.framework.DrawTool tool)
Sets the tool to be used. |
| Method Detail |
public jdraw.framework.DrawModel getModel()
public jdraw.framework.DrawEditor getEditor()
public jdraw.framework.DrawTool getTool()
public void setTool(jdraw.framework.DrawTool tool)
tool - tool to be used by the draw viewpublic void setDefaultTool()
public void setConstrainer(jdraw.framework.PointConstrainer p)
public jdraw.framework.PointConstrainer getConstrainer()
public java.util.Set getSelection()
public void clearSelection()
public void addToSelection(jdraw.framework.Figure f)
public void removeFromSelection(jdraw.framework.Figure f)
public void paint(java.awt.Graphics g)
public void repaint()
public java.awt.Dimension getSize()
public void setCursor(java.awt.Cursor c)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||