jcreek.gui.conceptmap
Class DefaultConceptMapController

java.lang.Object
  extended byjcreek.gui.conceptmap.DefaultConceptMapController
All Implemented Interfaces:
ConceptMapController

public class DefaultConceptMapController
extends java.lang.Object
implements ConceptMapController


Field Summary
protected  double currentScale
           
protected static java.awt.Color ENTITY_COLOR
           
protected static java.awt.Color ENTITY_FONT_COLOR
           
protected static java.awt.Color ENTITY_SELECTED_COLOR
           
protected static java.awt.Dimension ENTITY_SIZE
           
protected  java.awt.Font entityFont
           
protected static java.awt.Dimension INSETS
           
protected static java.awt.Color RELATION_COLOR
           
protected static java.awt.Color RELATION_FONT_COLOR
           
protected static java.awt.Color RELATION_SELECTED_COLOR
           
protected  java.awt.Font relationFont
           
 
Constructor Summary
DefaultConceptMapController()
           
 
Method Summary
 java.awt.Color getEntityColor(Entity entity)
          The color to use when diplaying this entity.
 java.awt.Font getEntityFont(Entity entity, double scale)
          The font to use when displaying this entity.
 java.awt.Color getEntityFontColor(Entity entity)
          The color of the font used to draw the entity fonts.
 java.awt.Color getEntitySelectedColor(Entity entity)
          The color to draw the "selection cross" on the entity if it is selected.
 java.awt.Dimension getEntitySize()
          The size of the circle representing an entity.
 java.awt.Color getRelationColor(Relation relation)
          The color to use when diplaying this relation.
 java.awt.Font getRelationFont(Relation relation, double scale)
          The font to use when displaying this entity.
 java.awt.Color getRelationFontColor(Relation entity)
          The color of the font used to draw the relation fonts.
 java.awt.Color getRelationSelectedColor(Relation relation)
          The color to use when diplaying this relation.
 java.awt.Dimension getViewInsets()
          The extra border space drawn outside the minimal square occupied by all the entities in the model.
 boolean showEntityNames(double scale)
          Should entity names be displayed?
 boolean showRelationNames(double scale)
          Should relation names be displayed?
protected  void updateFonts(double scale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTITY_SIZE

protected static final java.awt.Dimension ENTITY_SIZE

ENTITY_COLOR

protected static final java.awt.Color ENTITY_COLOR

ENTITY_SELECTED_COLOR

protected static final java.awt.Color ENTITY_SELECTED_COLOR

RELATION_COLOR

protected static final java.awt.Color RELATION_COLOR

RELATION_SELECTED_COLOR

protected static final java.awt.Color RELATION_SELECTED_COLOR

ENTITY_FONT_COLOR

protected static final java.awt.Color ENTITY_FONT_COLOR

RELATION_FONT_COLOR

protected static final java.awt.Color RELATION_FONT_COLOR

INSETS

protected static final java.awt.Dimension INSETS

entityFont

protected java.awt.Font entityFont

currentScale

protected double currentScale

relationFont

protected java.awt.Font relationFont
Constructor Detail

DefaultConceptMapController

public DefaultConceptMapController()
Method Detail

getEntityColor

public java.awt.Color getEntityColor(Entity entity)
The color to use when diplaying this entity.

Specified by:
getEntityColor in interface ConceptMapController

getEntityFontColor

public java.awt.Color getEntityFontColor(Entity entity)
The color of the font used to draw the entity fonts.

Specified by:
getEntityFontColor in interface ConceptMapController

getEntitySelectedColor

public java.awt.Color getEntitySelectedColor(Entity entity)
The color to draw the "selection cross" on the entity if it is selected.

Specified by:
getEntitySelectedColor in interface ConceptMapController

getEntitySize

public java.awt.Dimension getEntitySize()
The size of the circle representing an entity.

Specified by:
getEntitySize in interface ConceptMapController

getViewInsets

public java.awt.Dimension getViewInsets()
The extra border space drawn outside the minimal square occupied by all the entities in the model. This means that the entity with the lowest x value will be drawn at exactly getViewInsets().width in the view.

Specified by:
getViewInsets in interface ConceptMapController

updateFonts

protected void updateFonts(double scale)

getEntityFont

public java.awt.Font getEntityFont(Entity entity,
                                   double scale)
The font to use when displaying this entity.

Specified by:
getEntityFont in interface ConceptMapController

getRelationColor

public java.awt.Color getRelationColor(Relation relation)
The color to use when diplaying this relation.

Specified by:
getRelationColor in interface ConceptMapController

getRelationSelectedColor

public java.awt.Color getRelationSelectedColor(Relation relation)
The color to use when diplaying this relation.

Specified by:
getRelationSelectedColor in interface ConceptMapController

getRelationFontColor

public java.awt.Color getRelationFontColor(Relation entity)
The color of the font used to draw the relation fonts.

Specified by:
getRelationFontColor in interface ConceptMapController

getRelationFont

public java.awt.Font getRelationFont(Relation relation,
                                     double scale)
The font to use when displaying this entity.

Specified by:
getRelationFont in interface ConceptMapController

showEntityNames

public boolean showEntityNames(double scale)
Should entity names be displayed?

Specified by:
showEntityNames in interface ConceptMapController
Parameters:
scale - The current scale (with 1.0 meaning normal scale).

showRelationNames

public boolean showRelationNames(double scale)
Should relation names be displayed?

Specified by:
showRelationNames in interface ConceptMapController
Parameters:
scale - The current scale (with 1.0 meaning normal scale).


Created at IDI, NTNU by the Artificial Intelligence and Learning group