|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.kosi.gui.CConstants
This class contains the client-wide used constants an some
static
conversion and other utilitiy functions.
ChangeLog:
$Log: CConstants.java,v $ Revision 1.5 2001/07/02 17:37:18 jiriki - New Implementation of SSL Authorization - Implemented Client-Side Persistence Revision 1.4 2001/06/27 19:09:18 jiriki Resolved minor bugs. Updated docs.
Field Summary | |
static int |
BID_COUNT
The number of bids. |
static int |
BID_DOUBLE
Indicates a double bid. |
static int |
BID_PASS
Indicates a pass bid. |
static int |
BID_REDOUBLE
Indicates a redouble bid. |
static int |
BID_VOID
Indicates no bid. |
static int |
CARD_BACK
Indicates that a card image shows the back of a card. |
static int |
CARD_COUNT
The number of cards. |
static java.lang.String |
CLIENT_BUNDLE
Name of the resource bundle for the client. |
static int |
DIRECTION_EAST
The direction east. |
static int |
DIRECTION_NORTH
The direction north. |
static int |
DIRECTION_SOUTH
The direction south. |
static int |
DIRECTION_WEST
The direction west. |
static int |
INVALID
A negative value. |
static int |
ORIENTATION_BOTTOM
The orientation bottom. |
static int |
ORIENTATION_LEFT
The orientation left. |
static int |
ORIENTATION_RIGHT
The orientation right. |
static int |
ORIENTATION_TOP
The orientation top. |
static int |
SUIT_CLUBS
The suit clubs. |
static int |
SUIT_DIAMONDS
The suit diamonds. |
static int |
SUIT_HEARTS
The suit hearts. |
static int |
SUIT_NO_TRUMPS
Indicates a no trump contract. |
static int |
SUIT_SPADES
The suit spades. |
static int |
VALUE_10
The card value 10. |
static int |
VALUE_2
The card value 2. |
static int |
VALUE_3
The card value 3. |
static int |
VALUE_4
The card value 4. |
static int |
VALUE_5
The card value 5. |
static int |
VALUE_6
The card value 6. |
static int |
VALUE_7
The card value 7. |
static int |
VALUE_8
The card value 8. |
static int |
VALUE_9
The card value 9. |
static int |
VALUE_ACE
The card honour ace. |
static int |
VALUE_JACK
The card honour jack. |
static int |
VALUE_KING
The card honour king. |
static int |
VALUE_QUEEN
The card honour queen. |
Constructor Summary | |
CConstants()
|
Method Summary | |
static int |
convertBidSuit(int bidSuit)
Performs a conversion from a given de.kosi.model.game.SuitBid
suit constant to the corresponding CConstants
suit. |
static int |
convertCardSuit(int cardSuit)
Performs a conversion from a given de.kosi.model.game.Card
suit constant to the corresponding CConstants
suit. |
static int |
convertCardValue(int cardValue)
Performs a conversion from a given de.kosi.model.game.Card
card value constant to the corresponding CConstants
value. |
static java.lang.String |
directionString(int direction)
Gets a string representing the given direction. |
static boolean |
isUsingWebStart()
|
static int |
leftOf(int i)
Gets the clockwise left of an orientation or direction. |
static java.lang.String |
orientationString(int orientation)
Gets a string representing the given orientation. |
static int |
rightOf(int i)
The counterpart of @see #leftOf. |
static java.lang.String |
suitString(int suit)
Gets a string representing the given suit. |
static int |
toBidSuit(int suit)
Performs a conversion from a given CConstants
suit constant to the corresponding de.kosi.model.game.SuitBid
suit. |
static int |
toCardSuit(int suit)
Performs a conversion from a given CConstants
suit constant to the corresponding de.kosi.model.game.Card
suit. |
static int |
toCardValue(int value)
Performs a conversion from a given CConstants
card value constant to the corresponding
de.kosi.model.game.Card value. |
static java.lang.String |
valueString(int value)
Gets a string representing the given card value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CLIENT_BUNDLE
public static final int INVALID
public static final int DIRECTION_NORTH
public static final int DIRECTION_EAST
public static final int DIRECTION_SOUTH
public static final int DIRECTION_WEST
public static final int ORIENTATION_TOP
public static final int ORIENTATION_RIGHT
public static final int ORIENTATION_BOTTOM
public static final int ORIENTATION_LEFT
public static final int SUIT_CLUBS
public static final int SUIT_DIAMONDS
public static final int SUIT_HEARTS
public static final int SUIT_SPADES
public static final int SUIT_NO_TRUMPS
public static final int VALUE_2
public static final int VALUE_3
public static final int VALUE_4
public static final int VALUE_5
public static final int VALUE_6
public static final int VALUE_7
public static final int VALUE_8
public static final int VALUE_9
public static final int VALUE_10
public static final int VALUE_JACK
public static final int VALUE_QUEEN
public static final int VALUE_KING
public static final int VALUE_ACE
public static final int CARD_BACK
public static final int CARD_COUNT
public static final int BID_DOUBLE
public static final int BID_REDOUBLE
public static final int BID_PASS
public static final int BID_VOID
public static final int BID_COUNT
Constructor Detail |
public CConstants()
Method Detail |
public static java.lang.String directionString(int direction)
direction
- one of DIRECTION_NORTH, DIRECTION_SOUTH,
DIRECTION_EAST, and DIRECTION_WEST.public static java.lang.String orientationString(int orientation)
orientation
- the orientationpublic static java.lang.String suitString(int suit)
suit
- the suitpublic static java.lang.String valueString(int value)
value
- the valuepublic static int leftOf(int i)
Two examples:
leftOf(CConstants.ORIENTATION_BOTTOM) ==
CConstants.ORIENTATION_LEFT
,
leftOf(CConstants.DIRECTION_SOUTH) ==
CConstants.CConstants.DIRECTION_WEST
are always true
.
i
- the direction.public static int rightOf(int i)
i
- the direction or orientation.right of
the argument.public static int convertCardSuit(int cardSuit)
de.kosi.model.game.Card
suit constant to the corresponding CConstants
suit.cardSuit
- the de.kosi.model.game.Card
value.CConstants.SUIT_CLUBS
,
CConstants.SUIT_DIAMONDS
, ...public static int toCardSuit(int suit)
CConstants
suit constant to the corresponding de.kosi.model.game.Card
suit.suit
- the de.kosi.model.game.Card
value.Card.SUIT_CLUBS
,
Card.SUIT_DIAMONDS
, ...public static int convertBidSuit(int bidSuit)
de.kosi.model.game.SuitBid
suit constant to the corresponding CConstants
suit.bidSuit
- the de.kosi.model.game.SuitBid
object.CConstants.SUIT_
X constants.public static int toBidSuit(int suit)
CConstants
suit constant to the corresponding de.kosi.model.game.SuitBid
suit.suit
- one of the CConstant.SUIT_
X values.SuitBid.SUIT_CLUBS
,
SuitBid.SUIT_DIAMONDS
, ...public static int convertCardValue(int cardValue)
de.kosi.model.game.Card
card value constant to the corresponding CConstants
value.cardValue
- a de.kosi.model.game.Card.VALUE_
X
value.CConstants.VALUE_
X constants.public static int toCardValue(int value)
CConstants
card value constant to the corresponding
de.kosi.model.game.Card
value.value
- the CConstants.VALUE_
X constant.Card.VALUE_2
, Card.VALUE_3
, ...public static boolean isUsingWebStart()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |