de.kosi.gui.view.game
Class CardDimension

java.lang.Object
  |
  +--de.kosi.gui.view.game.CardDimension

public class CardDimension
extends java.lang.Object

The CarDimension object contains the current dimensions of a card.

ChangeLog:

 $Log: CardDimension.java,v $
 Revision 1.5  2001/06/14 14:41:01  jiriki
 Code maintanance
 (Updated docs, removed unused code, improved code style)

 

Version:
$Revision: 1.5 $ ($Date: 2001/06/14 14:41:01 $)
Author:
Jan-Christian Marinesse, Niklas Mehner

Constructor Summary
CardDimension(int height, int width)
          Creates a new CardDimension object.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener listener)
          Add a change listener, that is notified, when the card dimension changes-
protected  void fireStateChanged()
          Fire a change event for this card dimension object.
 int getHeight()
          Returns the current height of the card.
 int getMaxHeight()
          Returns the maximum height for cards.
 double getMinHVisibleRatio()
          Returns the current minimum ratio horizontally visible.
 int getMinimumHVisible()
          Returns the current minimum amount horizontally visible.
 int getMinimumVVisible()
          Returns the current minimum amount vertically visible.
 double getMinVVisibleRatio()
          Returns the current minimum ratio vertically visible.
 int getWidth()
          Returns the current width of the card.
 double getWidthHeightRatio()
          Return the width / height ratio of the card.
 void removeChangeListener(javax.swing.event.ChangeListener listener)
          Remove a change listener.
 void updateSize(int height)
          Set the new height for a card.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CardDimension

public CardDimension(int height,
                     int width)
Creates a new CardDimension object.
Parameters:
height - of the card image.
width - of the card image.
Method Detail

getHeight

public int getHeight()
Returns the current height of the card.
Returns:
The current height.

getWidth

public int getWidth()
Returns the current width of the card.
Returns:
The current width.

getMinimumHVisible

public int getMinimumHVisible()
Returns the current minimum amount horizontally visible.
Returns:
The current minimum amount horizontally visible.

getMinimumVVisible

public int getMinimumVVisible()
Returns the current minimum amount vertically visible.
Returns:
The current minimum amount vertically visible.

getMinHVisibleRatio

public double getMinHVisibleRatio()
Returns the current minimum ratio horizontally visible.
Returns:
The current minimum ratio horizontally visible.

getMinVVisibleRatio

public double getMinVVisibleRatio()
Returns the current minimum ratio vertically visible.
Returns:
The current minimum ratio vertically visible.

getWidthHeightRatio

public double getWidthHeightRatio()
Return the width / height ratio of the card.
Returns:
Width / height ratio.

getMaxHeight

public int getMaxHeight()
Returns the maximum height for cards.
Returns:
Maximum height.

updateSize

public void updateSize(int height)
Set the new height for a card.
Parameters:
height - New height.

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener listener)
Add a change listener, that is notified, when the card dimension changes-
Parameters:
listener - ChangeListener for this cardDimension,

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a change listener.
Parameters:
listener - Listener to be removed.

fireStateChanged

protected void fireStateChanged()
Fire a change event for this card dimension object.