Class JCustomPanel

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

public class JCustomPanel extends ControlPanel implements EditListener2
Convenience class to simplify adding image specific control panels for skins Implementors are supposed to subclass it 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. Also handles uninstalling panel when user changes skin
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • setAlbumObject

      public void setAlbumObject(AlbumObject ao)
      Description copied from interface: EditListener
      Called when user starts editing an image
      Specified by:
      setAlbumObject in interface EditListener
      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 actions 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 Automatically called when moving between album objects
    • 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