Package fr.formiko.views.gui2d
Class Data
java.lang.Object
fr.formiko.views.gui2d.Data
Contain all data (images) that will be used by the graphic interface.
- Author:
 - Hydrolien
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BufferedImage[]private BufferedImage[]private Imageprivate Imageprivate BufferedImage[]private Colorprivate Colorprivate Colorprivate Colorprivate Colorprivate Colorprivate Colorprivate Colorprivate BufferedImageprivate BufferedImageprivate BufferedImageprivate BufferedImageprivate BufferedImageprivate BufferedImageprivate BufferedImageprivate HashMap<String,BufferedImage> private booleanprivate booleanprivate FImageTreeprivate FImageTreeprivate BufferedImageprivate BufferedImageprivate booleanprivate intprivate BufferedImageprivate BufferedImageprivate BufferedImageprivate HashMap<String,BufferedImage> Contains all not resize image.private BufferedImageprivate intprivate Color[]private BufferedImage[][]private BufferedImage[][]private BufferedImage[]private BufferedImage[]private Image[]private BufferedImage[]private BufferedImage[]private BufferedImage[]private BufferedImage[]private BufferedImage[] - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidLoad image in map resolution.voidLoad image in full resolution.voidLoad Case imageImage[]Load images for FPanelZoomvoidLoad graphics for FPanelActionprivate voidLoad images for FPanelAction without backgroundprivate voidchargerTImageAvecFond(fr.formiko.usual.images.Pixel pi) Load images for FPanelAction with backgroundBufferedImage[][]BufferedImage[][]BufferedImage[][]BufferedImage[][]Load a group of BufferedImage that starts with a similar name.voidData()Main constructor.Return an array with all images use to draw an ant.getB()getButtonColor(int colorId) Return color used by the buttons.Return the Image that fit to a Creature.getFere()Return the Image that fit to a Seed.getIconImage(String name) Return an IconImage.Return an image from otherImages.getMap()getPick()BufferedImage[][]getScaledInstance(BufferedImage[][] ti, int dim) BufferedImage[][]getScaledInstance(BufferedImage[][] ti, int dim, int b) Return a scaled BufferedImage [][]getScaledInstance(BufferedImage[] ti, int dim) getScaledInstance(BufferedImage[] ti, int dim, int b) Return a scaled BufferedImage []getScaledInstance(BufferedImage bi, int dim) getScaledInstance(BufferedImage bi, int dim, int b) Return a scaled BufferedImageintintBufferedImage[][]getTF()getTG()voidCreate a background image from tI1 and tI2 images.private voidCreate a cloud image from loading image.voidInitialize all images that don't need to be resize.voidInitialize color used by the buttons.private voidLoad backgroundPAIprivate voidLoad backgroundPASbooleanLoad a loading image for FPanelChargement.voidloadPnpImage(int buttonSize) Load the FPanelNouvellePartie images if they aren't load yet.voidsetImageIniForNewGame(boolean b) voidsetTailleDUneCase(int x) voidvoidtournerLesFleches(String nom) Turn the arrow for FPanelZoom. 
- 
Field Details
- 
tailleDUneCase
private int tailleDUneCase - 
imageIni
private boolean imageIni - 
imageIniForNewGame
private boolean imageIniForNewGame - 
imgNull
 - 
fere
 - 
cNuageuse
 - 
cSombre
 - 
b
 - 
tICarte
 - 
tIF
 - 
tG
 - 
tF
 - 
antLeg
 - 
map
 - 
cloudMap
 - 
loopArrow
 - 
pick
 - 
imgNullIni
 - 
fereIni
 - 
cNuageuseIni
 - 
cSombreIni
 - 
bIni
 - 
tICarteIni
 - 
tIFIni
 - 
tGIni
 - 
tFIni
 - 
imageTree
 - 
imageTreeIni
 - 
iconMap
 - 
tImage
 - 
tIBZoom
 - 
initialisationFX
private boolean initialisationFX - 
loadingImage
 - 
backgroundPAI
 - 
backgroundPAS
 - 
otherImages
Contains all not resize image. - 
buttonColor
 - 
buttonActivateColor
 - 
buttonFocusColor
 - 
buttonDisableColor
 - 
tButtonColor
 - 
lenTButtonColor
private int lenTButtonColor - 
buttonColorWithoutAlpha
 - 
buttonDisableColorWithoutAlpha
 - 
buttonFocusColorWithoutAlpha
 - 
butonBorderColor
 
 - 
 - 
Constructor Details
- 
Data
public Data() 
 - 
 - 
Method Details
- 
Data
public void Data()Main constructor. - 
getTailleDUneCase
public int getTailleDUneCase() - 
getTailleIcon
public int getTailleIcon() - 
setTailleDUneCase
public void setTailleDUneCase(int x)  - 
getImgNull
 - 
getFere
 - 
getCNuageuse
 - 
getCSombre
 - 
getB
 - 
getTICarte
 - 
getTG
 - 
getTF
 - 
getMap
 - 
getCloudMap
 - 
getLoopArrow
 - 
getPick
 - 
getTImage
 - 
getImageChargement
 - 
setImageIniForNewGame
public void setImageIniForNewGame(boolean b)  - 
getBackgroundPAI
 - 
getBackgroundPAS
 - 
getButtonColor
 - 
getButtonDisableColor
 - 
getButtonFocusColor
 - 
getButtonActivateColor
 - 
getButtonColorWithoutAlpha
 - 
getButtonDisableColorWithoutAlpha
 - 
getButtonFocusColorWithoutAlpha
 - 
getButonBorderColor
 - 
getButtonColor
Return color used by the buttons. - 
iniTButtonColor
public void iniTButtonColor()Initialize color used by the buttons. - 
getImage
Return an image from otherImages. Image from otherImages can be acces by there name. - 
getCreatureImage
Return the Image that fit to a Creature.- Parameters:
 c- the Creature to represent.
 - 
getGraineImage
Return the Image that fit to a Seed.- Parameters:
 s- the Seed to represent
 - 
getIconImage
Return an IconImage.- Parameters:
 name- the name of the icon, the name of the file without ".png"
 - 
getAntImage
Return an array with all images use to draw an ant.
This image are sorted by order to daw.- Legs
 - Body
 - Color of the thorax
 - Wings
 
 - 
chargerImages
public void chargerImages()Load image in map resolution.
If the original image have'nt been load, it will call chargerImagesIni.
The images defined here have the rigth dimention for being used on the map. - 
chargerImagesIni
public void chargerImagesIni()Load image in full resolution.
Image need to be load in full resolution 1 time only. If it have alredy be done the function will do nothing. - 
iniOtherImages
public void iniOtherImages()Initialize all images that don't need to be resize. Image from otherImages can be acces by there name. - 
loadPnpImage
public void loadPnpImage(int buttonSize) Load the FPanelNouvellePartie images if they aren't load yet. If size is different, image will be reload with the greate size.- Parameters:
 buttonSize- size of the 2 image to load.
 - 
chargerTI
public void chargerTI()Load Case image - 
chargerTX
Load a group of BufferedImage that starts with a similar name.
see FImages.getImagess() for more informations.- Parameters:
 name- Name of de group. Every image will start by this name.
 - 
chargerTX
 - 
chargerTX
 - 
chargerTX
 - 
iniBackgroundMapImage
public void iniBackgroundMapImage()Create a background image from tI1 and tI2 images. - 
iniCloudMapImage
private void iniCloudMapImage()Create a cloud image from loading image. - 
getScaledInstance
Return a scaled BufferedImage - 
getScaledInstance
 - 
getScaledInstance
Return a scaled BufferedImage [] - 
getScaledInstance
 - 
getScaledInstance
Return a scaled BufferedImage [][] - 
getScaledInstance
 - 
chargerTIFPanelAction
public void chargerTIFPanelAction()Load graphics for FPanelAction - 
loadBackgroundPAI
private void loadBackgroundPAI()Load backgroundPAI - 
loadBackgroundPAS
private void loadBackgroundPAS()Load backgroundPAS - 
chargerTImage
private void chargerTImage()Load images for FPanelAction without background - 
chargerTImageAvecFond
private void chargerTImageAvecFond(fr.formiko.usual.images.Pixel pi) Load images for FPanelAction with background - 
chargerTIBZoom
Load images for FPanelZoom - 
tournerLesFleches
Turn the arrow for FPanelZoom. - 
tournerLesFleches
public void tournerLesFleches() - 
loadImageChargement
public boolean loadImageChargement()Load a loading image for FPanelChargement. 
 -