Add JavaDoc comments to view interfaces
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@62 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
6d406adc6d
commit
e39dc98249
5 changed files with 101 additions and 0 deletions
|
@ -6,5 +6,11 @@ import jrummikub.model.Position;
|
||||||
import jrummikub.model.Stone;
|
import jrummikub.model.Stone;
|
||||||
|
|
||||||
public interface IBoard extends IClickable {
|
public interface IBoard extends IClickable {
|
||||||
|
/**
|
||||||
|
* Set the player's stones to display on the board
|
||||||
|
*
|
||||||
|
* @param stones
|
||||||
|
* the stones
|
||||||
|
*/
|
||||||
public void setStones(Map<Stone, Position> stones);
|
public void setStones(Map<Stone, Position> stones);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,32 @@ import jrummikub.model.Position;
|
||||||
import jrummikub.util.IEvent2;
|
import jrummikub.util.IEvent2;
|
||||||
|
|
||||||
public interface IClickable {
|
public interface IClickable {
|
||||||
|
/**
|
||||||
|
* the click event is emitted when the player clicks on the table/board/etc.
|
||||||
|
*
|
||||||
|
* @return the event; the first parameter is the position of the click in grid
|
||||||
|
* coordinates, the second is true when the player wants to add stones
|
||||||
|
* to his selection instead of replacing them
|
||||||
|
*/
|
||||||
public IEvent2<Position, Boolean> getClickEvent();
|
public IEvent2<Position, Boolean> getClickEvent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the range click event is emitted when the player clicks on the table/board/
|
||||||
|
* etc. and wants to select a range instead of a single stone
|
||||||
|
*
|
||||||
|
* @return the event; the first parameter is the position of the click in grid
|
||||||
|
* coordinates, the second is true when the player wants to add stones
|
||||||
|
* to his selection instead of replacing them
|
||||||
|
*/
|
||||||
public IEvent2<Position, Boolean> getRangeClickEvent();
|
public IEvent2<Position, Boolean> getRangeClickEvent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the set click event is emitted when the player clicks on the table/board/
|
||||||
|
* etc. and wants to select a whole set instead of a single stone
|
||||||
|
*
|
||||||
|
* @return the event; the first parameter is the position of the click in grid
|
||||||
|
* coordinates, the second is true when the player wants to add stones
|
||||||
|
* to his selection instead of replacing them
|
||||||
|
*/
|
||||||
public IEvent2<Position, Boolean> getSetClickEvent();
|
public IEvent2<Position, Boolean> getSetClickEvent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,15 +3,47 @@ package jrummikub.view;
|
||||||
import jrummikub.util.IEvent;
|
import jrummikub.util.IEvent;
|
||||||
|
|
||||||
public interface IPlayerPanel {
|
public interface IPlayerPanel {
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public IBoard getBoard();
|
public IBoard getBoard();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current player's name
|
||||||
|
*
|
||||||
|
* @param playerName
|
||||||
|
* the player name
|
||||||
|
*/
|
||||||
public void setCurrentPlayerName(String playerName);
|
public void setCurrentPlayerName(String playerName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the time the player has left for his turn
|
||||||
|
*
|
||||||
|
* @param time
|
||||||
|
* the time left
|
||||||
|
*/
|
||||||
public void setTimeLeft(int time);
|
public void setTimeLeft(int time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The sort by number event is emitted when the player wants to sort his
|
||||||
|
* stones by number
|
||||||
|
*
|
||||||
|
* @return the event
|
||||||
|
*/
|
||||||
public IEvent getSortByNumberEvent();
|
public IEvent getSortByNumberEvent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The sort by number event is emitted when the player wants to sort his
|
||||||
|
* stones by number
|
||||||
|
*
|
||||||
|
* @return the event
|
||||||
|
*/
|
||||||
public IEvent getSortByColorEvent();
|
public IEvent getSortByColorEvent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The end turn event is emitted when the player wants to end his turn
|
||||||
|
*
|
||||||
|
* @return the event
|
||||||
|
*/
|
||||||
public IEvent getEndTurnEvent();
|
public IEvent getEndTurnEvent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,43 @@ import jrummikub.model.Position;
|
||||||
import jrummikub.model.StoneSet;
|
import jrummikub.model.StoneSet;
|
||||||
|
|
||||||
public interface ITable extends IClickable {
|
public interface ITable extends IClickable {
|
||||||
|
/**
|
||||||
|
* Sets the player name on the left label
|
||||||
|
*
|
||||||
|
* @param playerName
|
||||||
|
* the name to set
|
||||||
|
*/
|
||||||
public void setLeftPlayerName(String playerName);
|
public void setLeftPlayerName(String playerName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the player name on the top label
|
||||||
|
*
|
||||||
|
* @param playerName
|
||||||
|
* the name to set
|
||||||
|
*/
|
||||||
public void setTopPlayerName(String playerName);
|
public void setTopPlayerName(String playerName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the player name on the right label
|
||||||
|
*
|
||||||
|
* @param playerName
|
||||||
|
* the name to set
|
||||||
|
*/
|
||||||
public void setRightPlayerName(String playerName);
|
public void setRightPlayerName(String playerName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the stone sets lying on the table
|
||||||
|
*
|
||||||
|
* @param stoneSets
|
||||||
|
* set stone sets on the table
|
||||||
|
*/
|
||||||
public void setStoneSets(Map<StoneSet, Position> stoneSets);
|
public void setStoneSets(Map<StoneSet, Position> stoneSets);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the stone collection (the panel showing the stones currently
|
||||||
|
* selected)
|
||||||
|
*
|
||||||
|
* @return the stone collection
|
||||||
|
*/
|
||||||
IStoneCollection getStoneCollection();
|
IStoneCollection getStoneCollection();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,24 @@ import jrummikub.model.Stone;
|
||||||
|
|
||||||
public interface IView {
|
public interface IView {
|
||||||
/**
|
/**
|
||||||
|
* Returns the table
|
||||||
|
*
|
||||||
* @return the table
|
* @return the table
|
||||||
*/
|
*/
|
||||||
public ITable getTable();
|
public ITable getTable();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns the player panel
|
||||||
|
*
|
||||||
* @return the playerPanel
|
* @return the playerPanel
|
||||||
*/
|
*/
|
||||||
public IPlayerPanel getPlayerPanel();
|
public IPlayerPanel getPlayerPanel();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the stones that are to be drawn selected
|
||||||
|
*
|
||||||
|
* @param stones
|
||||||
|
* the stones to be drawn selected
|
||||||
|
*/
|
||||||
public void setSelectedStones(Collection<Stone> stones);
|
public void setSelectedStones(Collection<Stone> stones);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue