sources
Class Layer

java.lang.Object
  extended bysources.Layer
Direct Known Subclasses:
FlowLayer, FlowLayer1Curves, FlowLayer2, FlowLayer2Curves, ImageLayer, MapLayer, NodeLayer, NodeLayer2, NodeLayer3

public abstract class Layer
extends java.lang.Object

Superclass for all painters that wants to draw anything. This class is used in Flow and Map Diagrams


Field Summary
protected  int mode
           
protected  java.awt.Color nonCol
          Foreground Color
protected  java.awt.Color selCol
          Selection Color
 
Constructor Summary
Layer()
           
 
Method Summary
abstract  void changeBinheight(int i)
           
abstract  void changeMaxBinheight(int i)
           
abstract  void createPolygons(int width, int height, boolean onlyselected)
           
abstract  void createValues(boolean onlySelected)
           
 int getMode()
          Getter for property mode.
abstract  java.lang.Object getObjectAtKoord(int x, int y, boolean selected)
          returns the Object that lies on the specified point
abstract  java.lang.Object getObjectsUnderRect(java.awt.Rectangle rect, boolean selected)
           
abstract  boolean isOnly()
          Getter for property only.
abstract  void paintLayer(java.awt.Graphics2D g, boolean selected, java.awt.Rectangle vsRect)
          paints the Layer
 void setForegroundColor(java.awt.Color col)
          Sets the Foreground Color
 void setMode(int mode)
          Setter for property mode.
abstract  void setOnly(boolean only)
          Setter for property only.
 void setSelectionColor(java.awt.Color col)
          Sets the Selection Color
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mode

protected int mode

selCol

protected java.awt.Color selCol
Selection Color


nonCol

protected java.awt.Color nonCol
Foreground Color

Constructor Detail

Layer

public Layer()
Method Detail

setSelectionColor

public void setSelectionColor(java.awt.Color col)
Sets the Selection Color

Parameters:
col - the desired Selection Color

setForegroundColor

public void setForegroundColor(java.awt.Color col)
Sets the Foreground Color

Parameters:
col - the desired Foreground Color

createPolygons

public abstract void createPolygons(int width,
                                    int height,
                                    boolean onlyselected)

paintLayer

public abstract void paintLayer(java.awt.Graphics2D g,
                                boolean selected,
                                java.awt.Rectangle vsRect)
paints the Layer

Parameters:
g - the graphics to paint on
vsRect - visible Rectangle

getObjectAtKoord

public abstract java.lang.Object getObjectAtKoord(int x,
                                                  int y,
                                                  boolean selected)
returns the Object that lies on the specified point

Parameters:
x - x-coordinate
y - y-coordinate
Returns:
the Object lying under that point

getObjectsUnderRect

public abstract java.lang.Object getObjectsUnderRect(java.awt.Rectangle rect,
                                                     boolean selected)

changeBinheight

public abstract void changeBinheight(int i)

changeMaxBinheight

public abstract void changeMaxBinheight(int i)

createValues

public abstract void createValues(boolean onlySelected)

getMode

public int getMode()
Getter for property mode.

Returns:
Value of property mode.

setMode

public void setMode(int mode)
Setter for property mode.

Parameters:
mode - New value of property mode.

isOnly

public abstract boolean isOnly()
Getter for property only.

Returns:
Value of property only.

setOnly

public abstract void setOnly(boolean only)
Setter for property only.

Parameters:
only - New value of property only.