org.micropainter.core.layout
Class AbstractLayout

java.lang.Object
  extended by org.micropainter.core.layout.AbstractLayout
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>
Direct Known Subclasses:
AbstractBandsLayout, AbstractGridsLayout, AbstractLegendLayout, AbstractMetricsLayout, AbstractPointsLayout, CompoundLayout, OutlineLayout.LineLayout

public abstract class AbstractLayout
extends java.lang.Object
implements java.lang.Comparable<java.lang.Object>

The abstract definition of a delegate that takes the responsibility of painting a window2D Layout.

Author:
Sebastien Janaud

Field Summary
private  Antialiasing antialiasing
          aliasing
private  Fractional fractional
          fractional
private  Interpolation interpolation
          interpolation
private  float layoutAlpha
           
private  boolean lock
          lock state for this layout
private  int priority
          priority for this layout
private  TextAntialiasing textAnliasing
          text aliasing
private  Window2D window2D
          the window2D to lay out
private  int windowZone
          the zone to lay out
 
Constructor Summary
AbstractLayout()
           
 
Method Summary
 int compareTo(java.lang.Object o)
          compare priority of this layout to another layout
protected abstract  void doPaintLayout(View2D v2d, java.awt.Graphics2D g2d)
          Subclass this for custom paint
 Antialiasing getAntialiasing()
          return true if anti alias is required, false otherwise
 Fractional getFractional()
          return Fractional
 Interpolation getInterpolation()
          get the interpolation
 float getLayoutAlpha()
          get the alpha
 int getPriority()
          get the priority level
 TextAntialiasing getTextAnliasing()
          return TextAntialiasing
 Window2D getWindow2D()
          get the window2D
 int getWindowZone()
          get the window zone
 boolean isLock()
          return true if the layout is lock, false otherwise
 void lockLayout()
          lock this layout
 void paint(View2D v2d, java.awt.Graphics2D g2d)
          paint the layout
 void setAntialiasing(Antialiasing antialiasing)
          set the antialiasing
 void setFractional(Fractional fractional)
          set the fractional
 void setInterpolation(Interpolation interpolation)
          set the interpolation
 void setLayoutAlpha(float layoutAlpha)
          set the alpha
 void setPriority(int priority)
          set the priority
private  void setQuality(java.awt.Graphics2D g2d)
          set the rendering quality for painting this layout
 void setTextAnliasing(TextAntialiasing textAnliasing)
          set the TextAntialiasing
 void setWindow2D(Window2D window2D)
          set the window2D
 void setWindowZone(int windowZone)
          set the window zone
 void unlockLayout()
          unlock this layout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

window2D

private Window2D window2D
the window2D to lay out


windowZone

private int windowZone
the zone to lay out


layoutAlpha

private float layoutAlpha

priority

private int priority
priority for this layout


lock

private boolean lock
lock state for this layout


interpolation

private Interpolation interpolation
interpolation


antialiasing

private Antialiasing antialiasing
aliasing


fractional

private Fractional fractional
fractional


textAnliasing

private TextAntialiasing textAnliasing
text aliasing

Constructor Detail

AbstractLayout

public AbstractLayout()
Method Detail

lockLayout

public void lockLayout()
lock this layout


unlockLayout

public void unlockLayout()
unlock this layout


isLock

public boolean isLock()
return true if the layout is lock, false otherwise

Returns:
lock

getWindowZone

public int getWindowZone()
get the window zone

Returns:
zone

setWindowZone

public void setWindowZone(int windowZone)
set the window zone

Parameters:
windowZone -

getWindow2D

public Window2D getWindow2D()
get the window2D

Returns:
the window2D

setWindow2D

public void setWindow2D(Window2D window2D)
set the window2D

Parameters:
window2D -

getPriority

public int getPriority()
get the priority level

Returns:
priority

setPriority

public void setPriority(int priority)
set the priority

Parameters:
priority -

getLayoutAlpha

public float getLayoutAlpha()
get the alpha

Returns:
alpha

setLayoutAlpha

public void setLayoutAlpha(float layoutAlpha)
set the alpha

Parameters:
layoutAlpha -

compareTo

public int compareTo(java.lang.Object o)
compare priority of this layout to another layout

Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>
Parameters:
o -

getInterpolation

public Interpolation getInterpolation()
get the interpolation

Returns:

setInterpolation

public void setInterpolation(Interpolation interpolation)
set the interpolation

Parameters:
value -

getAntialiasing

public Antialiasing getAntialiasing()
return true if anti alias is required, false otherwise

Returns:
antialiasing

setAntialiasing

public void setAntialiasing(Antialiasing antialiasing)
set the antialiasing

Parameters:
antialias -

setFractional

public void setFractional(Fractional fractional)
set the fractional

Parameters:
fractional -

getFractional

public Fractional getFractional()
return Fractional

Returns:
fractional

getTextAnliasing

public TextAntialiasing getTextAnliasing()
return TextAntialiasing

Returns:
TextAntialiasing

setTextAnliasing

public void setTextAnliasing(TextAntialiasing textAnliasing)
set the TextAntialiasing

Parameters:
TextAntialiasing -

setQuality

private void setQuality(java.awt.Graphics2D g2d)
set the rendering quality for painting this layout

Parameters:
g2d -

doPaintLayout

protected abstract void doPaintLayout(View2D v2d,
                                      java.awt.Graphics2D g2d)
Subclass this for custom paint

Parameters:
v2d - the View2D to lay out.
g2d - the Graphics context in which to paint

paint

public void paint(View2D v2d,
                  java.awt.Graphics2D g2d)
paint the layout

Parameters:
v2d - the View2D to lay out.
g2d - the Graphics context in which to paint