net.sourceforge.toscanaj.view.diagram
Class DiagramSchema

java.lang.Object
  extended bynet.sourceforge.toscanaj.view.diagram.DiagramSchema
All Implemented Interfaces:
java.lang.Comparable

public class DiagramSchema
extends java.lang.Object
implements java.lang.Comparable

DiagramSchema will hold the palette colors, line widths and similar information for the DiagramView. This class uses a Singleton design pattern.


Field Summary
static org.tockit.swing.preferences.ExtendedPreferences preferences
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.awt.Color fadeOut(java.awt.Color original)
          Fades a color into the background.
 ArrowStyle[] getArrowStyles()
           
 java.awt.Color getBackgroundColor()
          Returns background color.
 java.awt.Color getCircleColor()
          Returns color for the circles around the nodes.
 java.awt.Color getCircleFilterColor()
          Returns color for the circles around the nodes in the filter of the selected concept.
 java.awt.Color getCircleIdealColor()
          Returns color for the circles around the nodes in the ideal of the selected.
 java.awt.Color getCircleSelectionColor()
          Returns color for the circles around the node with the selected concept.
static DiagramSchema getCurrentSchema()
           
 Gradient getDefaultGradient()
          Returns a gradient to be used for the node colors.
 float getDefaultLineWidth()
           
 java.awt.Color getForegroundColor()
           
 Gradient getGradient()
           
 ConceptInterpreter.IntervalType getGradientType()
          Returns the type of information that should be used to create the diagram.
 java.awt.Font getLabelFont()
           
 java.awt.Color getLineColor()
          Returns color for the lines between nodes.
 int getMargin()
           
 java.lang.String getName()
           
 java.awt.Color getNestedDiagramNodeColor()
          Returns background color for the nested diagrams.
 ConceptInterpreter.IntervalType getNodeSizeScalingType()
           
 float getNodeStrokeWidth()
           
 java.awt.Color getNotRealisedNodeColor(java.awt.Color nodeColor)
           
 double getNotRealizedNodeSizeReductionFactor()
           
static java.util.Collection getSchemas()
           
 float getSelectionLineWidth()
           
 void restore(org.tockit.swing.preferences.ExtendedPreferences extPrefs)
           
 void setAsCurrent()
           
 void setBottomColor(java.awt.Color bottomColor)
          Set the bottom color to new color.
 void setCircleColor(java.awt.Color circleColor)
          Set the circle color to new color.
 void setDefaultLineWidth(float lineWidth)
           
 void setGradient(Gradient gradient)
           
 void setGradientType(ConceptInterpreter.IntervalType gradientType)
          Sets the type of information that should be used to create the diagram.
 void setLineColor(java.awt.Color lineColor)
          Set the line color to new color.
 void setNodeSizeScalingType(ConceptInterpreter.IntervalType nodeSizeScalingType)
           
 void setNodeStrokeWidth(float nodeStrokeWidth)
           
 void setSelectionLineWidth(float lineWidth)
           
 void setTopColor(java.awt.Color topColor)
          Set the top color to new color.
 void store()
          Stores the schema in the preferences.
static void storeAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preferences

public static org.tockit.swing.preferences.ExtendedPreferences preferences
Method Detail

getSchemas

public static java.util.Collection getSchemas()

getCurrentSchema

public static DiagramSchema getCurrentSchema()

getForegroundColor

public java.awt.Color getForegroundColor()

getBackgroundColor

public java.awt.Color getBackgroundColor()
Returns background color.


getGradient

public Gradient getGradient()

setGradient

public void setGradient(Gradient gradient)

getDefaultGradient

public Gradient getDefaultGradient()
Returns a gradient to be used for the node colors.


getCircleColor

public java.awt.Color getCircleColor()
Returns color for the circles around the nodes.


getLineColor

public java.awt.Color getLineColor()
Returns color for the lines between nodes.


getCircleSelectionColor

public java.awt.Color getCircleSelectionColor()
Returns color for the circles around the node with the selected concept.


getCircleIdealColor

public java.awt.Color getCircleIdealColor()
Returns color for the circles around the nodes in the ideal of the selected.


getCircleFilterColor

public java.awt.Color getCircleFilterColor()
Returns color for the circles around the nodes in the filter of the selected concept.


getNestedDiagramNodeColor

public java.awt.Color getNestedDiagramNodeColor()
Returns background color for the nested diagrams.


getGradientType

public ConceptInterpreter.IntervalType getGradientType()
Returns the type of information that should be used to create the diagram.


getDefaultLineWidth

public float getDefaultLineWidth()

setDefaultLineWidth

public void setDefaultLineWidth(float lineWidth)

getSelectionLineWidth

public float getSelectionLineWidth()

setSelectionLineWidth

public void setSelectionLineWidth(float lineWidth)

getNodeStrokeWidth

public float getNodeStrokeWidth()

setNodeStrokeWidth

public void setNodeStrokeWidth(float nodeStrokeWidth)

setCircleColor

public void setCircleColor(java.awt.Color circleColor)
Set the circle color to new color.


setLineColor

public void setLineColor(java.awt.Color lineColor)
Set the line color to new color.


setTopColor

public void setTopColor(java.awt.Color topColor)
Set the top color to new color.


setBottomColor

public void setBottomColor(java.awt.Color bottomColor)
Set the bottom color to new color.


setGradientType

public void setGradientType(ConceptInterpreter.IntervalType gradientType)
Sets the type of information that should be used to create the diagram.


fadeOut

public java.awt.Color fadeOut(java.awt.Color original)
Fades a color into the background. This is typically used for highlighting the rest of the diagram by using the returned colors for the non-highlighted part.


getMargin

public int getMargin()

getNotRealizedNodeSizeReductionFactor

public double getNotRealizedNodeSizeReductionFactor()

getNodeSizeScalingType

public ConceptInterpreter.IntervalType getNodeSizeScalingType()

setNodeSizeScalingType

public void setNodeSizeScalingType(ConceptInterpreter.IntervalType nodeSizeScalingType)

getNotRealisedNodeColor

public java.awt.Color getNotRealisedNodeColor(java.awt.Color nodeColor)

getLabelFont

public java.awt.Font getLabelFont()

store

public void store()
Stores the schema in the preferences.


setAsCurrent

public void setAsCurrent()

getArrowStyles

public ArrowStyle[] getArrowStyles()

storeAll

public static void storeAll()

getName

public java.lang.String getName()

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

restore

public void restore(org.tockit.swing.preferences.ExtendedPreferences extPrefs)


The ToscanaJ project