bibliothek.extension.gui.dock.theme.eclipse.stack.tab
Class Arch

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.eclipse.stack.tab.Arch

public class Arch
extends Object

An arch is a mathematical description of an curve, the curve is within a given rectangle, starting at the top left and ending at the bottom right edge. The curve is horizontal at the beginning and at the end. The curve is within a discrete space, and there is exactly one y-value for each given x-value.

Author:
Benjamin Sigg

Constructor Summary
Arch(int width, int height)
          Creates a new arch.
 
Method Summary
 boolean equals(Object obj)
           
 int getHeight()
          Gets the height of the arch.
 int getValue(int x)
          Gets the position of the arch at x.
 int getWidth()
          Gets the width of the arch.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Arch

public Arch(int width,
            int height)
Creates a new arch.

Parameters:
width - the width of the arch
height - the height of the arch
Throws:
IllegalArgumentException - if either of width or height is smaller than 1
Method Detail

getWidth

public int getWidth()
Gets the width of the arch.

Returns:
the width

getHeight

public int getHeight()
Gets the height of the arch.

Returns:
the height

getValue

public int getValue(int x)
Gets the position of the arch at x. x must be between 0 (incl.) and width (excl.). The result will be between 0 (incl.) and height (excl.).

Parameters:
x - the x component
Returns:
the associated y component

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object