Class FPanelInfoCreature.FPanelInfoCreatureBuilder

java.lang.Object
fr.formiko.views.gui2d.FPanelInfo.FPanelInfoBuilder
fr.formiko.views.gui2d.FPanelInfoCreature.FPanelInfoCreatureBuilder
Enclosing class:
FPanelInfoCreature

static class FPanelInfoCreature.FPanelInfoCreatureBuilder extends FPanelInfo.FPanelInfoBuilder
Standard Builder for this.
Author:
Hydrolien
  • Field Details

  • Constructor Details

    • FPanelInfoCreatureBuilder

      FPanelInfoCreatureBuilder()
  • Method Details

    • addCreature

      public FPanelInfo.FPanelInfoBuilder addCreature(Creature c)
      Standard Builder for this.
    • build

      public FPanelInfo build()
      Build including the tranfomation of Creature to Panel.
      Creature are represent as icon & FProgressBar.
      Overrides:
      build in class FPanelInfo.FPanelInfoBuilder
    • addCreatureInfo

      private void addCreatureInfo()
      Add the icons then the progress bar with there icon.
    • addCreatureIcons

      private void addCreatureIcons()
      Add the icons.
      Icon are : the creature itself, the icon draw on the map if creature is not the playing ant, seed if there is any.
      Specie name is also print.
    • addCreatureProgressBars

      private void addCreatureProgressBars()
      Add the progress bars.
    • addCreatureProgressBar

      private void addCreatureProgressBar(int state, int value, int maxValue, String iconName)
      Add a progress bar.
      Parameters:
      state - state that define color of the bar
      value - curent value of the bar
      maxValue - max value of the bar