Module hw06

Interface IDimension

All Known Subinterfaces:
IATImage

public interface IDimension
Abstract representation of an entity with an integer width and height. This interface is useful for representing components the model needs that have a width and height, such as a drawing canvas but without exposing the model to the full GUI-specific objects such as JPanels. Also, unlike java.awt.Dimension, this interface is able to represent a dynamically changing width and height, not just a static value.

Typical usage: Have the controller wrap a GUI element from the view with an instance of this interface that is then given to the model to use.
Author:
swong
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The height of the entity
    int
    The width of the entity
  • Method Details

    • getWidth

      int getWidth()
      The width of the entity
      Returns:
      An integer width
    • getHeight

      int getHeight()
      The height of the entity
      Returns:
      An integer height