Class GCableInventory

  • All Implemented Interfaces:
    java.lang.Iterable<sag.elements.GElement>, sag.elements.Drawable

    public class GCableInventory
    extends sag.elements.GGroup
    The cable inventory of a player
    Author:
    Luna Otte
    • Field Summary

      Fields 
      Modifier and Type Field Description
      float height  
      static float WIDTH  
      • Fields inherited from class sag.elements.GElement

        handleMouseEvents, mouseListener, mouseListenerSync, positionX, positionY, rawSVGElement, rotation, scaleX, scaleY, skewX, skewY
    • Constructor Summary

      Constructors 
      Constructor Description
      GCableInventory​(java.util.Collection<CableConfig> cableConfig)
      Creates a new GCableInventory with the chosen cable config
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getHeight()  
      void setCableAmounts​(java.util.HashMap<java.lang.String,​java.lang.Integer> amounts)
      Set the amounts of each cable type that are in the current player's inventory
      • Methods inherited from class sag.elements.GGroup

        addChild, addChild, getChildByRenderingIndex, getNumChildren, getRawSVGGroup, indexOfChild, iterator, processMouseButtonEvent, processMouseMotionEvent, processMouseWheelEvent, removeChild, renderChildAfter, renderChildBefore, renderChildEarlier, renderChildFirst, renderChildLast, renderChildLater, setChildRenderingIndex, setRootSAGPanel, swapChildren
      • Methods inherited from class sag.elements.GElement

        amIPicked, executeUpdate, flipHorizontal, flipVertical, getGElement, getParent, getPositionX, getPositionY, getRGBStringFromColor, getRootSAGPanel, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, move, removeCSSAttribute, removeXMLAttribute, rotate, scale, scale, setAttribute, setCSSAttribute, setCSSAttribute, setDisplay, setFill, setFill, setFillOpacity, setMouseEventListener, setOpacity, setParent, setPosition, setRotation, setScale, setScale, setSkew, setStroke, setStroke, setStroke, setStrokeLinecap, setStrokeLinejoin, setStrokeOpacity, setStrokePattern, setStrokePatternOffset, setStrokeWidth, setXMLAttribute, setXMLAttribute, skew, unsetFill, unsetFillOpacity, unsetOpacity, unsetStroke, unsetStrokeLinecap, unsetStrokeLinejoin, unsetStrokeOpacity, unsetStrokePattern, unsetStrokePatternOffset, unsetStrokeWidth, update, updateTransform
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • GCableInventory

        public GCableInventory​(java.util.Collection<CableConfig> cableConfig)
        Creates a new GCableInventory with the chosen cable config
        Parameters:
        cableConfig - What cable types are available
    • Method Detail

      • setCableAmounts

        public void setCableAmounts​(java.util.HashMap<java.lang.String,​java.lang.Integer> amounts)
        Set the amounts of each cable type that are in the current player's inventory
        Parameters:
        amounts - The respective amounts of cables
      • getHeight

        public float getHeight()