Module hw06

Interface IModelAdapter<CBoxItem>

Type Parameters:
CBoxItem - The type of objects being put in the host JComboBox

public interface IModelAdapter<CBoxItem>
The view's adapter to the model
Author:
swong
  • Method Summary

    Modifier and Type
    Method
    Description
    Get an array of CBoxItems to place in the JComboBox
    void
    Ask the model to paint something on this Graphics object.
    run​(CBoxItem host, String visitorClassname)
    Ask the model to process the given host object with the given a visitor
  • Method Details

    • getHosts

      CBoxItem[] getHosts()
      Get an array of CBoxItems to place in the JComboBox
      Returns:
      An array of CBoxItems
    • run

      String run(CBoxItem host, String visitorClassname)
      Ask the model to process the given host object with the given a visitor
      Parameters:
      host - A host item
      visitorClassname - The name of the visitor to use, though the leading "visitors.impl." part is missing.
      Returns:
      The results of this particular algorithm.
    • paint

      void paint(Graphics g)
      Ask the model to paint something on this Graphics object.
      Parameters:
      g - The Graphics object to paint on.