|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.clickable.targetable.card.CardFactory
public final class CardFactory
Field Summary | |
---|---|
static java.awt.Color |
ACTIVATED_COLOR
The color identifying the playable activated abilities. |
static java.awt.Color |
borderColor
The border color of all card |
static int |
cardHeight
Scaled height of card to display |
static int |
cardWidth
Scaled width of card to display |
static javax.swing.JMenuItem |
countItem
The "count card" item of context menu |
static javax.swing.JMenuItem |
expandItem
The "expand panel" item of context menu |
static java.util.Map<java.lang.Integer,java.lang.String> |
exportedProperties
The available properties. |
static java.lang.String[] |
exportedTypeNames
The available type names. |
static int[] |
exportedTypeValues
The available type values. |
static javax.swing.JMenuItem |
gatherItem
The "gathered panel" item of context menu |
static java.awt.Color |
powerToughnessColor
Custom colors of Power/Toughness |
static Picture |
previewCard
the back image of all Magic card |
static java.util.Map<java.lang.Integer,java.awt.Image> |
propertyPictures
The available properties pictures as Image. |
static java.util.Map<java.lang.Integer,java.lang.String> |
propertyPicturesHTML
The available properties pictures as Html. |
static double |
ROTATE_SCALE
Rotate angle * PI |
static java.lang.String |
STR_EXPAND
The key identifying the "expand" zone text/action. |
static java.lang.String |
STR_GATHER
The key identifying the "gathered" zone text/action. |
static java.lang.String |
ttHeader
The "header" and "cardname" topics string part of tooltip |
static javax.swing.Icon |
WARNING_PICTURE
The warning Icon. |
Method Summary | |
---|---|
static CardModel |
getCardModel(java.lang.String cardName)
Return an instance of CardModel. |
static CardModel |
getCardModel(java.lang.String cardName,
java.io.InputStream inputStream)
Return an instance of CardModel. |
static float |
getScale()
Returns the scale of images of cards. |
static void |
init(java.io.InputStream inputFile)
Read from the specified stream the state picture options. |
static Picture |
initPreview()
Initialize the preview card picture |
static void |
initSettings()
All settings defined in the properties file and relating cards are managed here. |
static void |
saveSettings()
Save editable string settings of cards |
static void |
updateAllCardsUI()
Update the scale, sizes and random angle of all cards of current game. |
static void |
updateColor(java.lang.String colorStr)
Update the card border's color and other UI colors requiring only a global repaint to update the UI. |
static void |
updateScale()
Update the scaling transformation for all cards |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STR_GATHER
public static final java.lang.String STR_EXPAND
public static final double ROTATE_SCALE
public static final java.awt.Color ACTIVATED_COLOR
public static java.awt.Color powerToughnessColor
public static int cardHeight
public static int cardWidth
public static java.awt.Color borderColor
public static java.lang.String ttHeader
public static javax.swing.JMenuItem countItem
public static javax.swing.JMenuItem expandItem
public static javax.swing.JMenuItem gatherItem
public static java.lang.String[] exportedTypeNames
public static int[] exportedTypeValues
public static java.util.Map<java.lang.Integer,java.lang.String> exportedProperties
public static java.util.Map<java.lang.Integer,java.lang.String> propertyPicturesHTML
public static java.util.Map<java.lang.Integer,java.awt.Image> propertyPictures
public static final javax.swing.Icon WARNING_PICTURE
public static Picture previewCard
Method Detail |
---|
public static Picture initPreview()
public static CardModel getCardModel(java.lang.String cardName)
cardName
- the card name
public static CardModel getCardModel(java.lang.String cardName, java.io.InputStream inputStream)
cardName
- the card nameinputStream
- the input stream containing the data of this card.
public static void initSettings()
public static void updateAllCardsUI()
public static void updateColor(java.lang.String colorStr)
colorStr
- is the new card border's colorpublic static void saveSettings()
public static void init(java.io.InputStream inputFile) throws java.io.IOException
inputFile
- the stream containing settings.
java.io.IOException
- If some other I/O error occurspublic static void updateScale()
public static float getScale()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |