Package gui.media

Class GUIShapeFactory

java.lang.Object
gui.media.GUIShapeFactory

public class GUIShapeFactory extends Object
Instantiate the correct GUIMedia subclass for a given GenericShape object.

Determines the appropriate GenericShape subclass to create, given a GenericShape Used as a helper class for the GUIMediaFactory

  • Constructor Details

    • GUIShapeFactory

      public GUIShapeFactory()
  • Method Details

    • getFor

      public static GUIShape getFor(GenericShape shape) throws Exception
      Returns the GUIMedia representation of a GenericShape class
      Parameters:
      shape - The GenericShape to be represented
      Returns:
      The GUIMedia class representing the GenericShape provided
      Throws:
      Exception - Thrown if shape is not a valid type of GenericShape