bibliothek.gui.dock.station.stack.tab
Class DefaultAxisConversion

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.tab.DefaultAxisConversion
All Implemented Interfaces:
AxisConversion

public class DefaultAxisConversion
extends Object
implements AxisConversion

The default AxisConversion assumes:

Author:
Benjamin Sigg

Constructor Summary
DefaultAxisConversion(Rectangle space, TabPlacement side)
          Creates a new axis converter
 
Method Summary
 Dimension modelToView(Dimension size)
          Converts size from model to view.
 Rectangle modelToView(Rectangle bounds)
          Converts bounds from model to view.
 Dimension viewToModel(Dimension size)
          Converts size from view to model.
 Rectangle viewToModel(Rectangle bounds)
          Converts bounds from view to model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAxisConversion

public DefaultAxisConversion(Rectangle space,
                             TabPlacement side)
Creates a new axis converter

Parameters:
space - the space available for the view, not null
side - the side of the available space at which the view hangs, not null.
Method Detail

modelToView

public Dimension modelToView(Dimension size)
Description copied from interface: AxisConversion
Converts size from model to view.

Specified by:
modelToView in interface AxisConversion
Parameters:
size - some dimension in the model, not null
Returns:
the converted dimension in the view, must not be null nor size

modelToView

public Rectangle modelToView(Rectangle bounds)
Description copied from interface: AxisConversion
Converts bounds from model to view.

Specified by:
modelToView in interface AxisConversion
Parameters:
bounds - some boundaries given in the model, not null
Returns:
the converted boundaries in the view, must not be null nor bounds

viewToModel

public Dimension viewToModel(Dimension size)
Description copied from interface: AxisConversion
Converts size from view to model.

Specified by:
viewToModel in interface AxisConversion
Parameters:
size - some dimension in the view, not null
Returns:
the converted dimension in the model, must not be null nor size

viewToModel

public Rectangle viewToModel(Rectangle bounds)
Description copied from interface: AxisConversion
Converts bounds from view to model.

Specified by:
viewToModel in interface AxisConversion
Parameters:
bounds - some boundaries given in the view, not null
Returns:
the converted boundaries in the model, must not be null nor bounds