Package com.j3d.gen.guide


package com.j3d.gen.guide
Guide

Guide

The Guide or otherwise tutorial makes full use of EventEmitter and EventListeners. Every single interaction other than starting it uses this.

Say we have the following "Guide Steps" we want to show to the user:

WelcomeStep, SceneStep, SelectionStep

And obviously they all cant be shown at the same time. but need to be shown in that order, this is how it works.
  1. GuideManager instantiates a new GuideFlow which calls GuideFlow.start() which shows WelcomeStep (the first GuideInfo in the start of list)
  2. WelcomeStep displays its stuff over the entire engine using GuidePanelAdapter
  3. The user does some specific event that WelcomeStep listens for
  4. WelcomeStep fires an event to GuideFlow, specifically being GuideInfoClosingPayload
  5. GuideFlow makes sure that WelcomeStep can indeed close. If so, it calls its GuideInfo.breakdown() and removes it from the top of the list.
  6. GuideFlow calls GuideFlow.start() once again and repeats but now SceneStep is the head of the list

Classes

  • GuidePanelAdapter, a simple class which just adds helper methods on top of the GuidePanel which is nothing more than just a JPanel over the entire frame.
  • GuideInfo, a singular step within the guide which only needs to know the engine event it wants to listen to that the user has to perform in order for this specific step to close itself and for the next one to proceed. It can build itself and stuff using GuidePanelAdapter
  • GuideManager, the orchestrator that starts the GuideFlow and holds the created GuidePanelAdapter.
  • GuideFlow, the flowwwwerr that manages the sequence and progression of GuideInfo steps.
  • GuideInfoClosingPayload, An event payload indicating that a GuideInfo step is requesting to close.
  • Anchor, a utility class providing constants for positioning UI components within the guide panel components.
Author:
Lehlogonolo Poole