Class JAlbumFrame

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, JAlbumWindow

public class JAlbumFrame extends EasyJFrame implements JAlbumWindow
Main JAlbum user interface
See Also:
  • Property Details

    • projectLoaded

      public javafx.beans.property.ReadOnlyBooleanProperty projectLoadedProperty
      Tell whether a jAlbum project is loaded (open) or not
      Since:
      13.6
      See Also:
  • Field Details

  • Constructor Details

    • JAlbumFrame

      public JAlbumFrame(File projectFile)
  • Method Details

    • projectLoadedProperty

      public javafx.beans.property.ReadOnlyBooleanProperty projectLoadedProperty()
      Tell whether a jAlbum project is loaded (open) or not
      Returns:
      Since:
      13.6
    • pack

      public void pack()
      Skins sometimes call pack() on the main Window. This was ok prior to v7, but should now be delegated to the album settings window To really pack this JFrame, use packThis() instead.
      Specified by:
      pack in interface JAlbumWindow
      Overrides:
      pack in class Window
      Since:
      7.0
    • packThis

      public void packThis()
      Skins sometimes call pack() on the main Window. This was ok prior to v7, but should now be delegated to the album settings window To really pack this JFrame, use packThis() instead.
      Since:
      7.0
    • showNotification

      public void showNotification(JNotification notification)
      Display a non-modal notification message in the bottom of jAlbum's album list The message will be revealed using a roll-up effect.
      Parameters:
      notification -
      Since:
      8.9
    • dismissNotifications

      public void dismissNotifications()
    • setTitle

      public void setTitle()
    • getCleanProjectSettings

      public ProjectSettings getCleanProjectSettings()
    • checkProjectSettings

      public boolean checkProjectSettings(ProjectSettings projectSettings) throws Exception
      Throws:
      Exception
    • removeJAlbumListener

      public void removeJAlbumListener(JAlbumListener listener)
    • addJAlbumListener

      public void addJAlbumListener(JAlbumListener listener)
      Specified by:
      addJAlbumListener in interface JAlbumWindow
    • fireSkinUIDisplayed

      protected void fireSkinUIDisplayed(JAlbumEvent e)
    • fireSkinUIHidden

      protected void fireSkinUIHidden(JAlbumEvent e)
    • fireStyleChanged

      protected void fireStyleChanged(JAlbumEvent e)
    • fireSkinChanged

      protected void fireSkinChanged(JAlbumEvent e)
    • fireAlbumCreationStarted

      protected void fireAlbumCreationStarted(JAlbumEvent e)
    • fireAlbumCreationFinished

      protected void fireAlbumCreationFinished(JAlbumEvent e)
    • initConsole

      public void initConsole()
    • initProject

      public void initProject(File inputDir)
      Parameters:
      inputDir -
      Since:
      7.0
    • doExit

      public void doExit()
    • processWindowEvent

      protected void processWindowEvent(WindowEvent e)
      Overridden so we can ask before exiting.
      Overrides:
      processWindowEvent in class JFrame
      Parameters:
      e -
    • isSkinUISelected

      public boolean isSkinUISelected()
      Is the skin user interface showing? Contract with skin developers
      Returns:
    • setSkinUI

      public void setSkinUI(ControlPanel ui)
      Installs skin's custom UI as a jAlbum settings panel This call is usually put last in an onload.bsh file of a skin Since v8.4, the installation of the UI is guaranteed to run on the event dispatch thread in order to avoid deadlocks
      Specified by:
      setSkinUI in interface JAlbumWindow
      Parameters:
      ui -
    • reloadSkin

      public void reloadSkin()
    • newProject

      public boolean newProject()
      Create a new empty project and open the new project dialog
      Returns:
      true if project was actually created and not canceled
    • newProject

      public boolean newProject(File projectFile)
    • closeProject

      public boolean closeProject()
    • scanImageDirectory

      public void scanImageDirectory()
      Search for jalbum project file in image directory and load project if found
    • renameProjectDirectory

      public boolean renameProjectDirectory(String newName) throws IOException
      Throws:
      IOException
    • renameImageDirectory

      public boolean renameImageDirectory(String newImageDirectoryName) throws IOException
      Throws:
      IOException
    • loadProject

      public boolean loadProject(File projectFile)
    • isLoadingProject

      public boolean isLoadingProject()
    • getCurrentProject

      public AlbumProject getCurrentProject()
      Shortcut to albumManager's getCurrentProject
      Returns:
      Since:
      25
    • saveProject

      public boolean saveProject(File projectFile)
    • getProjectName

      public String getProjectName()
    • getProjectDir

      public File getProjectDir()
    • getProjectSettings

      public ProjectSettings getProjectSettings()
    • engine2UI

      public void engine2UI()
      Make the user interface reflect the settings of the JAlbum engine (AlbumBean) Use with caution as users could have their own UI settings overwritten by this call. To be safe, only call this method shortly after calling ui2Engine
      Since:
      8.2 (made public)
      See Also:
    • ui2Engine

      public void ui2Engine() throws BeanBinderException
      Synchronize bean with user interface Made public from v5.2
      Specified by:
      ui2Engine in interface JAlbumWindow
      Throws:
      BeanBinderException
    • skinUI2Engine

      public void skinUI2Engine(AlbumBean engine)
      For internal use only!
      Parameters:
      engine -
    • getSkinUIVariables

      public Map getSkinUIVariables()
      For internal use only
      Returns:
    • ui2Engine

      public void ui2Engine(AlbumBean engine) throws BeanBinderException
      Throws:
      BeanBinderException
    • fixUIdisabling

      public void fixUIdisabling()
      Adjust user interface so that graphical elements are correctly disabled
    • getRoot

      public AlbumObject getRoot()
    • initView

      public void initView()
    • show

      public void show(Window win)
    • centerRelativeTo

      public static void centerRelativeTo(Component comp, Component ref)
    • getEngine

      public AlbumBean getEngine()
    • getNotificationManager

      public NotificationManager getNotificationManager()
    • getSkinUI

      public Object getSkinUI()
      Specified by:
      getSkinUI in interface JAlbumWindow
    • isExitOnClose

      public boolean isExitOnClose()
    • setExitOnClose

      public void setExitOnClose(boolean exitOnClose)
    • addFiles

      public void addFiles(List<File> files)
      Add the list of files to the current album project
      Since:
      9.4
    • openInBrowser

      public void openInBrowser(String urlString)
    • openInBrowser

      public void openInBrowser(String urlString, Boolean useInternal)
    • openInBrowser

      public void openInBrowser(URL url, Boolean useInternal)
      Main clever entry point for previews
      Parameters:
      url -
      useInternal - whether to use internal browser or not. Pass null to use preference
    • getIndexFile

      public File getIndexFile()
    • indexFileExists

      public boolean indexFileExists()
    • prepareServerBasedPreview

      public URL prepareServerBasedPreview(File indexFile) throws Exception
      Ensure that indexFile can be served using embedded web server
      Parameters:
      indexFile -
      Returns:
      local URL reference to indexFile
      Throws:
      Exception