org.ceryle.wiki.visualizer.core.graph
Class PainterParameters

java.lang.Object
  extended by org.ceryle.wiki.visualizer.core.graph.PainterParameters

public class PainterParameters
extends Object

Hold all the parameter values to paint a decorated WikiNode.

          nodeX
           \ /    / Border
            |    /
   --------------------- 
  / Pin          h-dep  \
  |        Label        |  <---- nodeY
  | Icon         h-link |
  +---------------------+
  | Subtext1            |
  | Subtext2            |
  \            /        /
   -----------/--------- 
    Backcolor/
 
 
Note all drawing is done relative to the center of the label.


Constructor Summary
PainterParameters()
           
 
Method Summary
 Color getBackgroundColor()
           
 Color getBorderColor()
           
 int getBotomMarginHeight()
           
 Color getDefaultBackgroundColor()
           
 Color getDefaultBorderColor()
           
 Font getDefaultFont()
           
 Color getDefaultTextColor()
           
 Font getFont()
           
 int getLabelCenterX()
           
 int getLabelCenterY()
           
 int getLabelHeight()
           
 int getLabelWidth()
           
 int getLeftMarginWidth()
           
 int getNodeHeight()
          Sum of top and bottom margin and the label hieghts.
 int getNodeWidth()
          Sum on left and right margins and the label width.
 int getRightMarginWidth()
           
 Color getTextColor()
           
 int getTopMarginHeight()
           
 boolean isDragging()
           
 boolean isHighlighted()
           
 boolean isSelected()
           
 void requiredBottomMarginHeight(int bottomMarginHeight)
           
 void requiredLeftMarginWidth(int leftMarginWidth)
           
 void requiredRightMarginWidth(int rightMarginWidth)
           
 void requiredTopMarginHeight(int topMarginHeight)
           
 void reset()
           
 void setBackgroundColor(Color backgroundColor)
           
 void setBorderColor(Color borderColor)
           
 void setDefaultBackgroundColor(Color defaultBackgroundColor)
           
 void setDefaultBorderColor(Color defaultBorderColor)
           
 void setDefaultFont(Font defaultFont)
           
 void setDefaultTextColor(Color defaultTextColor)
           
 void setFont(Font font)
           
 void setInteractionStates(boolean isHighlighted, boolean isSelected, boolean isDragging)
           
 void setLabelCenterX(int labelCenterX)
           
 void setLabelCenterY(int labelCenterY)
           
 void setLabelHeight(int labelHeight)
           
 void setLabelWidth(int labelWidth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PainterParameters

public PainterParameters()
Method Detail

reset

public void reset()

getNodeWidth

public int getNodeWidth()
Sum on left and right margins and the label width.

Returns:
Total width of the node to be painted.

getNodeHeight

public int getNodeHeight()
Sum of top and bottom margin and the label hieghts.

Returns:
Total height of the node to be painted.

getBotomMarginHeight

public int getBotomMarginHeight()
Returns:
Returns the botomMarginHeight.

requiredBottomMarginHeight

public void requiredBottomMarginHeight(int bottomMarginHeight)
Parameters:
bottomMarginHeight - The botomMarginHeight to set.

getLabelHeight

public int getLabelHeight()
Returns:
Returns the labelHeight.

setLabelHeight

public void setLabelHeight(int labelHeight)
Parameters:
labelHeight - The labelHeight to set.

getLabelWidth

public int getLabelWidth()
Returns:
Returns the labelWidth.

setLabelWidth

public void setLabelWidth(int labelWidth)
Parameters:
labelWidth - The labelWidth to set.

getLeftMarginWidth

public int getLeftMarginWidth()
Returns:
Returns the leftMarginWidth.

requiredLeftMarginWidth

public void requiredLeftMarginWidth(int leftMarginWidth)
Parameters:
leftMarginWidth - The leftMarginWidth to set.

getRightMarginWidth

public int getRightMarginWidth()
Returns:
Returns the rightMarginWidth.

requiredRightMarginWidth

public void requiredRightMarginWidth(int rightMarginWidth)
Parameters:
rightMarginWidth - The rightMarginWidth to set.

getTopMarginHeight

public int getTopMarginHeight()
Returns:
Returns the topMarginHeight.

requiredTopMarginHeight

public void requiredTopMarginHeight(int topMarginHeight)
Parameters:
topMarginHeight - The topMarginHeight to set.

getLabelCenterX

public int getLabelCenterX()
Returns:
Returns the nodeCenterX.

setLabelCenterX

public void setLabelCenterX(int labelCenterX)
Parameters:
labelCenterX - The nodeCenterX to set.

getLabelCenterY

public int getLabelCenterY()
Returns:
Returns the nodeCenterY.

setLabelCenterY

public void setLabelCenterY(int labelCenterY)
Parameters:
labelCenterY - The nodeCenterY to set.

setInteractionStates

public void setInteractionStates(boolean isHighlighted,
                                 boolean isSelected,
                                 boolean isDragging)
Parameters:
isHighlighted -
isSelected -
isDragging -

getBackgroundColor

public Color getBackgroundColor()
Returns:
Returns the backgroundColor.

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)
Parameters:
backgroundColor - The backgroundColor to set.

getBorderColor

public Color getBorderColor()
Returns:
Returns the borderColor.

setBorderColor

public void setBorderColor(Color borderColor)
Parameters:
borderColor - The borderColor to set.

getDefaultBackgroundColor

public Color getDefaultBackgroundColor()
Returns:
Returns the defaultBackgroundColor.

setDefaultBackgroundColor

public void setDefaultBackgroundColor(Color defaultBackgroundColor)
Parameters:
defaultBackgroundColor - The defaultBackgroundColor to set.

getDefaultBorderColor

public Color getDefaultBorderColor()
Returns:
Returns the defaultBorderColor.

setDefaultBorderColor

public void setDefaultBorderColor(Color defaultBorderColor)
Parameters:
defaultBorderColor - The defaultBorderColor to set.

getDefaultTextColor

public Color getDefaultTextColor()
Returns:
Returns the defaultTextColor.

setDefaultTextColor

public void setDefaultTextColor(Color defaultTextColor)
Parameters:
defaultTextColor - The defaultTextColor to set.

getDefaultFont

public Font getDefaultFont()
Returns:
Returns the defaultFont.

setDefaultFont

public void setDefaultFont(Font defaultFont)
Parameters:
defaultFont - The defaultFont to set.

getFont

public Font getFont()
Returns:
Returns the font.

setFont

public void setFont(Font font)
Parameters:
font - The font to set.

isDragging

public boolean isDragging()
Returns:
Returns the isDragging.

isHighlighted

public boolean isHighlighted()
Returns:
Returns the isHighlighted.

isSelected

public boolean isSelected()
Returns:
Returns the isSelected.

getTextColor

public Color getTextColor()
Returns:
Returns the textColor.


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.