Interface ScheduleItemRenderer

All Known Implementing Classes:
DefaultScheduleItemRenderer

public interface ScheduleItemRenderer

Paints one item of a Scheduler.

The views draw items themselves and keep no component per item, so this is the place to change how an item looks. DefaultScheduleItemRenderer is the one a scheduler starts with, and is made to be extended.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The rectangle is a single line: a month cell or the all day lane.
    static final int
    The item is being dragged, and this is the copy under the pointer.
    static final int
    The item goes on after the part of it that is painted here.
    static final int
    Time runs across, as in the resource timeline, not down.
    static final int
    The pointer of a desktop rests on the item.
    static final int
    The item is the selected one.
    static final int
    The item began before the part of it that is painted here.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    paintItem(Graphics g, Scheduler scheduler, ScheduleItem item, int x, int y, int width, int height, int state)
    Paints item into a rectangle.
  • Field Details

    • SELECTED

      static final int SELECTED
      The item is the selected one.
      See Also:
    • DRAGGED

      static final int DRAGGED
      The item is being dragged, and this is the copy under the pointer.
      See Also:
    • STARTS_BEFORE

      static final int STARTS_BEFORE
      The item began before the part of it that is painted here.
      See Also:
    • ENDS_AFTER

      static final int ENDS_AFTER
      The item goes on after the part of it that is painted here.
      See Also:
    • COMPACT

      static final int COMPACT
      The rectangle is a single line: a month cell or the all day lane.
      See Also:
    • HORIZONTAL

      static final int HORIZONTAL
      Time runs across, as in the resource timeline, not down.
      See Also:
    • HOVERED

      static final int HOVERED
      The pointer of a desktop rests on the item. The view lights the item itself; a renderer that wants more can tell by this.
      See Also:
  • Method Details

    • paintItem

      void paintItem(Graphics g, Scheduler scheduler, ScheduleItem item, int x, int y, int width, int height, int state)

      Paints item into a rectangle. The clip is already inside the view; an implementation that sets one of its own restores it.

      Parameters
      • state: a combination of the constants of this interface