Jadex 0.96

jadex.examples.blocksworld
Class Block

java.lang.Object
  extended by jadex.examples.blocksworld.Block
Direct Known Subclasses:
Table

public class Block
extends Object

A block in the blocks-world.


Field Summary
 SimplePropertyChangeSupport pcs
          The helper object for bean events.
 
Constructor Summary
Block(Color color, Block lower)
          Create a new block.
Block(int number, Color color, Block lower)
          Create a new block.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 boolean equals(Object o)
          Check for equality.
 Color getColor()
          Get the color of the block.
 Block getLower()
          Get the block where this block is located on.
 boolean isClear()
          Check if this block is clear.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 void stackOn(Block lower)
          Move this block on top of another block.
 String toString()
          Create a string representation of this block.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pcs

public SimplePropertyChangeSupport pcs
The helper object for bean events.

Constructor Detail

Block

public Block(Color color,
             Block lower)
Create a new block.

Parameters:
color - The color of the block.
lower - The block where this block is located on.

Block

public Block(int number,
             Color color,
             Block lower)
Create a new block.

Parameters:
number - The number of the block.
color - The color of the block.
lower - The block where this block is located on.
Method Detail

getColor

public Color getColor()
Get the color of the block.

Returns:
The color of the block.

getLower

public Block getLower()
Get the block where this block is located on.

Returns:
The block where this block is located on.

isClear

public boolean isClear()
Check if this block is clear.


stackOn

public void stackOn(Block lower)
Move this block on top of another block.


toString

public String toString()
Create a string representation of this block.

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Check for equality.

Overrides:
equals in class Object

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

Parameters:
listener - The PropertyChangeListener to be added.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
listener - The PropertyChangeListener to be removed.

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.