Core Architecture: User Interface - UA-ScriptEase/scriptease GitHub Wiki

#General Principles ScriptEase II should not just be an improvement over ScriptEase in terms of code and translators, but also in usability. Therefore, you should adhere to some general guidelines.

  • Use as few Frames (windows) as possible. Too many frames get confusing and annoying to switch between.
  • Reduce the need for modes. The user doesn't want to remember which mode lets them drag items and which lets them delete items.
  • Allow hotkeys for most actions. Users will eventually get frustrated with menu diving once they know the basics.
  • Minimize the chance that errors will occur. It's easy to generate a popup with a big X shouting at the user to be more careful next time. It's better to never let them do something wrong in the first place.
  • Use Screen Real Estate wisely. Don't show too little, but don't cramp things up either. Give some space around different panels and add some borders.
  • Tools and functionality should be self evident. We don't want to rely on tool tips, gigantic instruction manuals, and word of mouth. A first time user should be able to understand how to use ScriptEase by sitting down with it for 5 minutes.
  • Don't think like a programmer when you're building this. Muggles don't understand what a variable is.

A note on Story Component Builder: Since the Story Component Builder is aimed at developers (i.e. us), we don't need to worry as much about its UI.

#WindowManager WindowManager is a facade responsible for all windows (including SEFrame), pop ups and dialogs. Other classes should be using WindowManager to spawn these instead of doing it themselves. It provides a variety of methods to create windows and pop ups used by ScriptEase.

#SEFrame SEFrame is the main application frame, and there should only exist one per instance of ScriptEase running. It is used for managing the menu bars, and the dividing between StoryFrame, GameObjectPicker and LibraryPane. It provides a few helper methods for getting the selected components, and creating StoryFrames for StoryModels.

#LibraryPane The Library Pane is the visible pane on the left used to manage, search, and filter the available patterns in ScriptEase. It was abstracted into it's own class since PaneFactory was becoming much too large.

##Components The Library Pane contains several unique components to provide complex Library management.

  • StoryComponentPanelTree - A replacement for Swing's JTree that handles displaying the library data.
  • StoryComponentPanelSetting - Configures every non-root StoryComponentPanel in the tree to be selectable, but not editable, nor removable.

#StoryComponentPanelTree This is our replacement for JTree that builds up its rows from panels, rather than using a cell renderer approach. Custom backing TreeModels allow for mapping between SETreeNodes and StoryComponents in the Tree, while extending normal JTree functionality.

##Filters Filters are used to sort / filter a collection of StoryComponents. The current implementation uses them on LibraryTreeModels to filter the libraries

Filter Type Description
CategoryFilter Filters StoryComponents by category
SeachFilter Filters StoryComponents based on the Search Text (AND search with order based on number of matching terms)
TypeFilter Filters StoryComponents by Type (as found in the Translator's APIDictionary).
BlankFilter Default Filter, which accepts all StoryComponents.

#PanelFactory Panel Factory is where all panels should be created. Although some panels may have their own classes, all creation should be from calling PanelFactory.getInstance().buildPANEL.