All Implemented Interfaces:
DynamicPropertyProvider, LocaleListener, MutableDynamicPropertyProvider, StyleProvider, ComponentLifecycle, DesignerInitializable, QualityMonitor, VisionComponent, ActionListener, MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
ScheduleView

See Also:
  • Field Details

    • todayDate

      public Date todayDate
  • Constructor Details

    • PMIWeekView

      public PMIWeekView()
  • Method Details

    • isOptimizedDrawingEnabled

      public boolean isOptimizedDrawingEnabled()
      Overrides:
      isOptimizedDrawingEnabled in class JComponent
    • isFocusable

      public boolean isFocusable()
      Overrides:
      isFocusable in class Component
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • onStartup

      protected void onStartup()
      Description copied from class: AbstractVisionPanel
      Subclasses should override this to provide startup logic.
      Overrides:
      onStartup in class AbstractVisionPanel
    • onShutdown

      protected void onShutdown()
      Description copied from class: AbstractVisionPanel
      Subclasses should override this to provide shutdown logic.
      Overrides:
      onShutdown in class AbstractVisionPanel
    • initUI

      protected void initUI()
    • setBeginningOfDay

      protected final void setBeginningOfDay(Calendar cal)
      Sets the calendar to 00:00:00.000 (12 AM)
    • setEndOfDay

      protected final void setEndOfDay(Calendar cal)
      Sets the calendar to 23:59:59 (11:59 PM)
    • getLayer

      protected int getLayer(EventItem event)
      Overridden in subclasses to display events on separate layers rather than side-by-side
    • findEventsForDay

      protected List<EventItem> findEventsForDay(Date day)
    • createComponent

      protected JComponent createComponent(EventItem item, Date startDate, Date endDate)
    • main

      public static void main(String[] args)
    • getEvents

      public Dataset getEvents()
    • setEvents

      public void setEvents(Dataset events)
    • isAutoZoom

      public boolean isAutoZoom()
    • setAutoZoom

      public void setAutoZoom(boolean autoZoom)
    • isShowEventTime

      public boolean isShowEventTime()
    • setShowEventTime

      public void setShowEventTime(boolean showTime)
    • getAutoZoomStartHour

      public int getAutoZoomStartHour()
    • setAutoZoomStartHour

      public void setAutoZoomStartHour(int autoZoomStartHour)
    • getAutoZoomEndHour

      public int getAutoZoomEndHour()
    • setAutoZoomEndHour

      public void setAutoZoomEndHour(int autoZoomEndHour)
    • getWorkingStartHour

      public int getWorkingStartHour()
    • setWorkingStartHour

      public void setWorkingStartHour(int workingStartHour)
    • getWorkingEndHour

      public int getWorkingEndHour()
    • setWorkingEndHour

      public void setWorkingEndHour(int workingEndHour)
    • getGridMarks

      public int getGridMarks()
    • setGridMarks

      public void setGridMarks(int gridMarks)
    • setDate

      public void setDate(int year, int month, int day)
      Sets the year, month and day all at once in order to avoid updating the internal calendar one field at a time, waiting until the end of the method to fire property changes and reinit the UI. Otherwise an exception can be thrown when going to a month with fewer days than the current month when you happen to be on the day that doesn't exist. (e.g. 3/31 -> 4/x)
      Parameters:
      year - >= 0
      month - 1-12
      day - 1-31
    • getDay

      public int getDay()
    • setDay

      public void setDay(int day)
    • getMonth

      public int getMonth()
    • setMonth

      public void setMonth(int month)
    • getYear

      public int getYear()
    • setYear

      public void setYear(int year)
    • getSelectedDay

      public String getSelectedDay()
    • setSelectedDayOnly

      public void setSelectedDayOnly(String selectedDay)
    • setSelectedDay

      public void setSelectedDay(String selectedDay)
    • getHoveredDay

      public String getHoveredDay()
    • setHoveredDay

      public void setHoveredDay(String hoveredDay)
    • setHoveredDayOnly

      public void setHoveredDayOnly(String hoveredDay)
    • getHoveredTime

      public String getHoveredTime()
    • setHoveredTime

      public void setHoveredTime(String hoveredTime)
    • setHoveredTimeOnly

      public void setHoveredTimeOnly(String hoveredTime)
    • getSelectedEvent

      public int getSelectedEvent()
    • setSelectedEventOnly

      public void setSelectedEventOnly(int selectedEvent)
    • setSelectedEvent

      public void setSelectedEvent(int selectedEvent)
    • getHoveredEvent

      public int getHoveredEvent()
    • setHoveredEvent

      public void setHoveredEvent(int hoveredEvent)
    • setHoveredEventOnly

      public void setHoveredEventOnly(int hoveredEvent)
    • getCurrentDay

      public com.inductiveautomation.factorypmi.application.components.PMIWeekView.DayInfo getCurrentDay()
    • setCurrentDay

      public void setCurrentDay(com.inductiveautomation.factorypmi.application.components.PMIWeekView.DayInfo currentDay)
    • getCurrentEvent

      public EventBox getCurrentEvent()
    • setCurrentEvent

      public void setCurrentEvent(EventBox currentEvent)
    • setEventFont

      public void setEventFont(Font eventFont)
    • getEventFont

      public Font getEventFont()
    • setEventForeground

      public void setEventForeground(Color color)
      Sets the text color for objects on this view.
      Parameters:
      color - the color to set
    • getEventForeground

      public Color getEventForeground()
      Gets the text color for objects on this view.
      Returns:
      the Color that is currently set. Will not be null
    • setHourFont

      public void setHourFont(Font hourFont)
    • getHourFont

      public Font getHourFont()
    • getWeekdayFont

      public Font getWeekdayFont()
    • setWeekdayFont

      public void setWeekdayFont(Font weekdayFont)
    • getWeekDaysForeground

      public Color getWeekDaysForeground()
    • setWeekDaysForeground

      public void setWeekDaysForeground(Color weekDaysForeground)
    • getWeekDaysBackground

      public Color getWeekDaysBackground()
    • setWeekDaysBackground

      public void setWeekDaysBackground(Color weekDaysBackground)
    • getBoxOutline

      public Color getBoxOutline()
    • setBoxOutline

      public void setBoxOutline(Color boxOutline)
    • getCalendarBackground

      public Color getCalendarBackground()
    • setCalendarBackground

      public void setCalendarBackground(Color calendarBackground)
    • getTodayBackground

      public Color getTodayBackground()
    • setTodayBackground

      public void setTodayBackground(Color todayBackground)
    • getSelectedBackground

      public Color getSelectedBackground()
    • setSelectedBackground

      public void setSelectedBackground(Color selectedBackground)
    • getHoverBackground

      public Color getHoverBackground()
    • setHoverBackground

      public void setHoverBackground(Color hoverBackground)
    • getHourForeground

      public Color getHourForeground()
    • setHourForeground

      public void setHourForeground(Color hourForeground)
    • getNonWorkingHourBackground

      public Color getNonWorkingHourBackground()
    • setNonWorkingHourBackground

      public void setNonWorkingHourBackground(Color nonWorkingHourBackground)
    • isTwentyFourHour

      public boolean isTwentyFourHour()
    • setTwentyFourHour

      public void setTwentyFourHour(boolean twentyFourHour)
    • setUseLocaleTimeFormat

      public void setUseLocaleTimeFormat(boolean useLocaleTimeFormat)
    • isShowWeekend

      public boolean isShowWeekend()
    • setShowWeekend

      public void setShowWeekend(boolean showWeekend)
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Specified by:
      mouseDragged in interface MouseMotionListener
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      Specified by:
      mouseMoved in interface MouseMotionListener
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Specified by:
      mouseClicked in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent e)
      Specified by:
      mouseExited in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent e)
      The EventBox components add this as a mouse listener, so these are listening to the event boxes themselves
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Specified by:
      mouseReleased in interface MouseListener
    • findDayAt

      protected com.inductiveautomation.factorypmi.application.components.PMIWeekView.DayInfo findDayAt(int x, int y)
    • findTimeAt

      protected PMIWeekView.TimeInfo findTimeAt(int x, int y)
    • paintComponent

      protected void paintComponent(Graphics graphics)
      Overrides:
      paintComponent in class AbstractVisionPanel
    • paintWeekDays

      protected void paintWeekDays(Graphics2D g, int x, int y, int w, int h)
    • paintChildren

      protected void paintChildren(Graphics g)
      Overrides:
      paintChildren in class AbstractVisionPanel
    • paintCalendar

      protected void paintCalendar(Graphics2D g, int x, int y, int w, int h)
    • getCal

      public Calendar getCal()
    • initialize

      public void initialize()
      Specified by:
      initialize in interface DesignerInitializable
    • localeChanged

      public void localeChanged(Locale newLocale)
      Specified by:
      localeChanged in interface LocaleListener
      Overrides:
      localeChanged in class AbstractVisionPanel
    • updateDateInfo

      public void updateDateInfo(Locale locale)