Class JWebPageUI

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, EditListener, EditListener2, JAlbumPlugin, JComponentHolder, ManagesImport

public class JWebPageUI extends ControlPanel implements EditListener2, JAlbumPlugin
Convenience class to simplify adding image specific control panels for web pages (.htt files) Implementors are supposed to subclass it inside a <ja:ui> tag and add their custom UI controls as member variables of the subclass. Handles updating UI controls with current values from the current album object and saving changes.
Since:
11.3
See Also:
  • Field Details

  • Constructor Details

    • JWebPageUI

      public JWebPageUI()
  • Method Details

    • init

      public void init(PluginContext context)
      Description copied from interface: JAlbumPlugin
      Allow a plugin to plug itself into the jAlbum framework. Called when all critical JAlbum objects are created, but before the window is opened.
      Specified by:
      init in interface JAlbumPlugin
      Parameters:
      context - allows you to plug yourself into the jAlbum UI.
    • setAlbumObject

      public void setAlbumObject(AlbumObject ao)
      Description copied from interface: EditListener
      Called when user starts editing an image
      Specified by:
      setAlbumObject in interface EditListener
      Parameters:
      ao - the AlbumObject representing the image
    • isLoadingUI

      protected boolean isLoadingUI()
      Check to see if UI is currently being loaded/initialized During loading, calls to saveUI are ignored This helps avoiding indirect calls to saveUI during component initialization when having attached change listeners to UI components (Some UI components don't have ActionListeners and therefore can't tell user actions from programmatic ations apart)
    • loadUI

      protected void loadUI()
      Load UI controls with values from current album object Automatically called when moving between album objects
    • init

      protected void init()
      Subclasses should call this method after all UI components are installed and set to proper initial values
    • saveUI

      protected void saveUI()
      Save values from UI controls to current album object Automatially called when moving between album objects
    • onExit

      public boolean onExit()
      Description copied from interface: JAlbumPlugin
      Called when jAlbum is about to exit. Allows for cleanup
      Specified by:
      onExit in interface JAlbumPlugin
      Returns:
      true if ok for jAlbum process to exit. false if the jAlbum process is to be kept running
    • saveState

      public void saveState()
      Description copied from interface: EditListener2
      Called upon "make album" so the implementing class can ensure that the current state is persisted
      Specified by:
      saveState in interface EditListener2