Interface Item

All Superinterfaces:
Comparable<Item>
All Known Implementing Classes:
ImageItem, ShapeItem, TextItem

public interface Item extends Comparable<Item>
Represent a renderable element in a Swing context.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    compareTo(Item other)
     
    float
     
    void
    Renders the item.
  • Method Details

    • getDepth

      float getDepth()
      Returns:
      render priority, lower-values drawn first
    • render

      void render(Graphics2D g)
      Renders the item.
      Parameters:
      g - target context, not null
    • compareTo

      default int compareTo(Item other)
      Specified by:
      compareTo in interface Comparable<Item>