com.rolemodelsoft.drawlet.basics
Class SimpleDrawingStyle

java.lang.Object
  |
  +--com.rolemodelsoft.drawlet.basics.SimpleDrawingStyle
Direct Known Subclasses:
ArrowStyle

public class SimpleDrawingStyle
extends java.lang.Object
implements DrawingStyle

This provides basic functionality necessary to provide a meaningful working version of a DrawingStyle.


Field Summary
protected  java.awt.Color backgroundColor
          Holds this style's background color.
protected  java.awt.Color fillColor
          Holds this style's fill color.
protected  java.awt.Font font
          Holds this style's font.
protected  java.awt.Color foregroundColor
          Holds this style's foreground color.
protected  java.awt.Color highlightColor
          Holds this style's highlight color.
protected  java.awt.Color lineColor
          Holds this style's line color.
protected  java.awt.Color selectionBackgroundColor
          Holds this style's selection background color.
protected  java.awt.Color selectionForegroundColor
          Holds this style's selection foreground color.
protected  java.awt.Color textColor
          Holds this style's text color.
 
Constructor Summary
SimpleDrawingStyle()
           
 
Method Summary
protected  java.awt.Color defaultBackgroundColor()
          Answer the default/initial value for backgroundColor
protected  java.awt.Color defaultFillColor()
          Answer the default/initial value for fillColor
protected  java.awt.Font defaultFont()
          Answer the default/initial value for the font
protected  java.awt.Color defaultForegroundColor()
          Answer the default/initial value for foregroundColor
protected  java.awt.Color defaultHighlightColor()
          Answer the default/initial value for selectionBackgroundColor
protected  java.awt.Color defaultLineColor()
          Answer the default/initial value for lineColor
protected  java.awt.Color defaultSelectionBackgroundColor()
          Answer the default/initial value for selectionBackgroundColor
protected  java.awt.Color defaultSelectionForegroundColor()
          Answer the default/initial value for selectionForegroundColor
protected  java.awt.Color defaultTextColor()
          Answer the default/initial value for textColor
 java.lang.Object duplicate()
          Duplicates the receiver.
 java.lang.Object duplicateIn(java.util.Hashtable duplicates)
          Duplicates the receiver in the given Hashtable.
 java.awt.Color getBackgroundColor()
          Answer this style's background Color.
 java.awt.Color getFillColor()
          Answer this style's fill Color.
 java.awt.Font getFont()
          Answer this style's font.
 java.awt.Color getForegroundColor()
          Answer this style's foreground Color.
 java.awt.Color getHighlightColor()
          Answer this style's highlight Color.
 java.awt.Color getLineColor()
          Answer this style's line Color.
 java.awt.Color getSelectionBackgroundColor()
          Answer this style's selection background Color.
 java.awt.Color getSelectionForegroundColor()
          Answer this style's selection foreground Color.
 java.awt.Color getTextColor()
          Answer this style's text Color.
 void postDuplicate(java.util.Hashtable duplicates)
          After a series of objects are duplicated, this can be sent to each of the duplicates to resolve any changes it might like to reconcile.
 void setBackgroundColor(java.awt.Color color)
          Set this style's background Color.
 void setFillColor(java.awt.Color color)
          Set this style's fill Color.
 void setFont(java.awt.Font newFont)
          Set this style's font.
 void setForegroundColor(java.awt.Color color)
          Set this style's foreground Color.
 void setHighlightColor(java.awt.Color color)
          Set this style's highlight Color.
 void setLineColor(java.awt.Color color)
          Set this style's line Color.
 void setSelectionBackgroundColor(java.awt.Color color)
          Set this style's selection background Color.
 void setSelectionForegroundColor(java.awt.Color color)
          Set this style's selection foreground Color.
 void setTextColor(java.awt.Color color)
          Set this style's text Color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backgroundColor

protected java.awt.Color backgroundColor
Holds this style's background color.

foregroundColor

protected java.awt.Color foregroundColor
Holds this style's foreground color.

font

protected java.awt.Font font
Holds this style's font.

fillColor

protected java.awt.Color fillColor
Holds this style's fill color.

lineColor

protected java.awt.Color lineColor
Holds this style's line color.

textColor

protected java.awt.Color textColor
Holds this style's text color.

selectionBackgroundColor

protected java.awt.Color selectionBackgroundColor
Holds this style's selection background color.

selectionForegroundColor

protected java.awt.Color selectionForegroundColor
Holds this style's selection foreground color.

highlightColor

protected java.awt.Color highlightColor
Holds this style's highlight color.
Constructor Detail

SimpleDrawingStyle

public SimpleDrawingStyle()
Method Detail

defaultBackgroundColor

protected java.awt.Color defaultBackgroundColor()
Answer the default/initial value for backgroundColor
Returns:
a Color representing the default/initial value for backgroundColor

defaultFillColor

protected java.awt.Color defaultFillColor()
Answer the default/initial value for fillColor
Returns:
a Color representing the default/initial value for fillColor

defaultFont

protected java.awt.Font defaultFont()
Answer the default/initial value for the font
Returns:
a Font representing the default/initial value for the font

defaultForegroundColor

protected java.awt.Color defaultForegroundColor()
Answer the default/initial value for foregroundColor
Returns:
a Color representing the default/initial value for foregroundColor

defaultHighlightColor

protected java.awt.Color defaultHighlightColor()
Answer the default/initial value for selectionBackgroundColor
Returns:
a Color representing the default/initial value for selectionBackgroundColor

defaultLineColor

protected java.awt.Color defaultLineColor()
Answer the default/initial value for lineColor
Returns:
a Color representing the default/initial value for lineColor

defaultSelectionBackgroundColor

protected java.awt.Color defaultSelectionBackgroundColor()
Answer the default/initial value for selectionBackgroundColor
Returns:
a Color representing the default/initial value for selectionBackgroundColor

defaultSelectionForegroundColor

protected java.awt.Color defaultSelectionForegroundColor()
Answer the default/initial value for selectionForegroundColor
Returns:
a Color representing the default/initial value for selectionForegroundColor

defaultTextColor

protected java.awt.Color defaultTextColor()
Answer the default/initial value for textColor
Returns:
a Color representing the default/initial value for textColor

duplicate

public java.lang.Object duplicate()
Duplicates the receiver.
Returns:
an Object which is a duplicate of the receiver

duplicateIn

public java.lang.Object duplicateIn(java.util.Hashtable duplicates)
Duplicates the receiver in the given Hashtable.
Parameters:
duplicates - the Hashtable to put the new duplicate in
Returns:
an Object which is a duplicate of the receiver

getBackgroundColor

public java.awt.Color getBackgroundColor()
Answer this style's background Color.
Specified by:
getBackgroundColor in interface DrawingStyle
Returns:
the Color to use for the background

getFillColor

public java.awt.Color getFillColor()
Answer this style's fill Color.
Specified by:
getFillColor in interface DrawingStyle
Returns:
the Color to use for filling.

getFont

public java.awt.Font getFont()
Answer this style's font.
Specified by:
getFont in interface DrawingStyle
Returns:
the font to use.

getForegroundColor

public java.awt.Color getForegroundColor()
Answer this style's foreground Color.
Specified by:
getForegroundColor in interface DrawingStyle
Returns:
the Color to use for the foreground.

getHighlightColor

public java.awt.Color getHighlightColor()
Answer this style's highlight Color.
Specified by:
getHighlightColor in interface DrawingStyle
Returns:
the Color to use for the highlight.

getLineColor

public java.awt.Color getLineColor()
Answer this style's line Color.
Specified by:
getLineColor in interface DrawingStyle
Returns:
the Color to use for the line.

getSelectionBackgroundColor

public java.awt.Color getSelectionBackgroundColor()
Answer this style's selection background Color.
Specified by:
getSelectionBackgroundColor in interface DrawingStyle
Returns:
the Color to use for the selection's background

getSelectionForegroundColor

public java.awt.Color getSelectionForegroundColor()
Answer this style's selection foreground Color.
Specified by:
getSelectionForegroundColor in interface DrawingStyle
Returns:
the Color to use for the selection's foreground.

getTextColor

public java.awt.Color getTextColor()
Answer this style's text Color.
Specified by:
getTextColor in interface DrawingStyle
Returns:
the Color to use for the text.

postDuplicate

public void postDuplicate(java.util.Hashtable duplicates)
After a series of objects are duplicated, this can be sent to each of the duplicates to resolve any changes it might like to reconcile. For example, replacing observers with their duplicates, if available.
Parameters:
duplicates - a Hashtable with originals as keys and duplicats as elements

setBackgroundColor

public void setBackgroundColor(java.awt.Color color)
Set this style's background Color.
Specified by:
setBackgroundColor in interface DrawingStyle
Parameters:
color - the Color to use for the background.

setFillColor

public void setFillColor(java.awt.Color color)
Set this style's fill Color.
Specified by:
setFillColor in interface DrawingStyle
Parameters:
color - the Color to use for filling.

setFont

public void setFont(java.awt.Font newFont)
Set this style's font.
Specified by:
setFont in interface DrawingStyle
Parameters:
newFont - the font to use.

setForegroundColor

public void setForegroundColor(java.awt.Color color)
Set this style's foreground Color.
Specified by:
setForegroundColor in interface DrawingStyle
Parameters:
color - the Color to use for the foreground.

setHighlightColor

public void setHighlightColor(java.awt.Color color)
Set this style's highlight Color.
Specified by:
setHighlightColor in interface DrawingStyle
Parameters:
color - the Color to use for the highlight.

setLineColor

public void setLineColor(java.awt.Color color)
Set this style's line Color.
Specified by:
setLineColor in interface DrawingStyle
Parameters:
color - the Color to use for the line.

setSelectionBackgroundColor

public void setSelectionBackgroundColor(java.awt.Color color)
Set this style's selection background Color.
Specified by:
setSelectionBackgroundColor in interface DrawingStyle
Parameters:
color - the Color to use for the selection's background.

setSelectionForegroundColor

public void setSelectionForegroundColor(java.awt.Color color)
Set this style's selection foreground Color.
Specified by:
setSelectionForegroundColor in interface DrawingStyle
Parameters:
color - the Color to use for the selection's foreground.

setTextColor

public void setTextColor(java.awt.Color color)
Set this style's text Color.
Specified by:
setTextColor in interface DrawingStyle
Parameters:
color - the Color to use for the text.