jdraw.drawing_options
Class BrushPatternColor

java.lang.Object
  |
  +--java.util.Observable
        |
        +--mvp.Model
              |
              +--jdraw.drawing_options.BrushPatternColor
All Implemented Interfaces:
java.io.Serializable

public class BrushPatternColor
extends mvp.Model

Class BrushPatternColor is the Model class for the drawing tool options: Brush, Pattern, FGColor, BGColor. ...

See Also:
Serialized Form

Field Summary
protected  BrushEditDialog brushEditDialog
          A BrushEditDialog instance for user-created brushes.
protected  JDraw jdraw
          A local reference to the top-level JDraw object.
protected  PaintEditDialog paintEditDialog
          A PaintEditDialog instance for user-created paint patterns.
 
Fields inherited from class mvp.Model
view
 
Constructor Summary
BrushPatternColor(mvp.View view, JDraw jdraw)
          Construct this with the given View object.
 
Method Summary
 void redrawActiveCanvasWindow()
          Calls the redrawPage method of the currently active CanvasWindow.
 void saveActiveWindowState()
          Saves the state of the Active Canvas.
 void selectBackgroundColor(java.awt.Color color)
          Set the background color given the parameter Color.
 void selectBrush(int brush)
          Select the brush, given the passed in int value.
 void selectFillPattern(int fillPattern)
          Select the fill pattern, given the parameter int value.
 void selectForegroundColor(java.awt.Color color)
          Set the foreground color given the parameter Color.
 void setBrush(java.awt.BasicStroke bs, int arrows)
          Method setBrush sets the Brush and Arrows property within the system and for all selected graphics.
 void setFillPattern(java.util.Vector paint)
          Method setFillPattern sets the Paint property within the system and for all selected graphics.
 
Methods inherited from class mvp.Model
getView, setView
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jdraw

protected JDraw jdraw
A local reference to the top-level JDraw object.

brushEditDialog

protected BrushEditDialog brushEditDialog
A BrushEditDialog instance for user-created brushes.

paintEditDialog

protected PaintEditDialog paintEditDialog
A PaintEditDialog instance for user-created paint patterns.
Constructor Detail

BrushPatternColor

public BrushPatternColor(mvp.View view,
                         JDraw jdraw)
Construct this with the given View object.
Parameters:
view - - The View object to be passed to the parent constructor.
Method Detail

selectBrush

public void selectBrush(int brush)
Select the brush, given the passed in int value.
Parameters:
brush - - The int value to be used to determine the new BasicStroke.

setBrush

public void setBrush(java.awt.BasicStroke bs,
                     int arrows)
Method setBrush sets the Brush and Arrows property within the system and for all selected graphics.
Parameters:
bs - - The BasicStroke object to be used in setting Brush.
arrows - - The int value to be used in setting arrows.

selectFillPattern

public void selectFillPattern(int fillPattern)
Select the fill pattern, given the parameter int value.
Parameters:
fillPattern - - The int value to be used when calling methods.

setFillPattern

public void setFillPattern(java.util.Vector paint)
Method setFillPattern sets the Paint property within the system and for all selected graphics.
Parameters:
paint - - The Vector containing the necessary Paint information.

selectForegroundColor

public void selectForegroundColor(java.awt.Color color)
Set the foreground color given the parameter Color.
Parameters:
color - - The Color to be used as foreground color.

selectBackgroundColor

public void selectBackgroundColor(java.awt.Color color)
Set the background color given the parameter Color.
Parameters:
color - - The Color to be used as background color.

redrawActiveCanvasWindow

public void redrawActiveCanvasWindow()
Calls the redrawPage method of the currently active CanvasWindow.

saveActiveWindowState

public void saveActiveWindowState()
Saves the state of the Active Canvas.