Module org.jpo

Class GenerateWebsiteRequest

java.lang.Object
org.jpo.eventbus.GenerateWebsiteRequest
Direct Known Subclasses:
GenerateWebsiteRequestDefaultOptions

public class GenerateWebsiteRequest extends Object
This object holds the details of how the WebsiteGenerator is supposed to generate the output pages. It simplifies the interaction between the GUI and the worker thread significantly.

This is not a record because of all the setters.

  • Constructor Details

    • GenerateWebsiteRequest

      public GenerateWebsiteRequest()
  • Method Details

    • setBackgroundColor

      public void setBackgroundColor(Color backgroundColor)
      Sets the background color for the webpage
      Parameters:
      backgroundColor - background color for the website
    • getCellspacing

      public int getCellspacing()
      returns the Cellspacing
      Returns:
      the cellspacing
    • setCellspacing

      public void setCellspacing(int cellspacing)
      sets the Cellspacing
      Parameters:
      cellspacing - Cellspacing in the output
    • isExportHighres

      public boolean isExportHighres()
      Returns if we should export highres pictures
      Returns:
      true if highres pictures are to be exported
    • setExportHighres

      public void setExportHighres(boolean exportHighres)
    • setFontColor

      public void setFontColor(Color fontColor)
    • isGenerateMidresHtml

      public boolean isGenerateMidresHtml()
      Returns:
      the generateMidresHtml
    • setGenerateMidresHtml

      public void setGenerateMidresHtml(boolean generateMidresHtml)
      Parameters:
      generateMidresHtml - the generateMidresHtml to set
    • isGenerateMap

      public boolean isGenerateMap()
    • setGenerateMap

      public void setGenerateMap(boolean generateMap)
    • isGenerateMouseover

      public boolean isGenerateMouseover()
    • setGenerateMouseover

      public void setGenerateMouseover(boolean generateDHTML)
    • isGenerateZipfile

      public boolean isGenerateZipfile()
    • setGenerateZipfile

      public void setGenerateZipfile(boolean generateZipfile)
    • getTargetDirectory

      public File getTargetDirectory()
      The directory the web pages should be written to
      Returns:
      The directory where the web pages should be written to
    • setTargetDirectory

      public void setTargetDirectory(File htmlDirectory)
    • isLinkToHighres

      public boolean isLinkToHighres()
    • setLinkToHighres

      public void setLinkToHighres(boolean linkToHighres)
    • getThumbnailHeight

      public int getThumbnailHeight()
    • setThumbnailHeight

      public void setThumbnailHeight(int thumbnailHeight)
    • getThumbnailWidth

      public int getThumbnailWidth()
    • setThumbnailWidth

      public void setThumbnailWidth(int thumbnailWidth)
    • getThumbnailDimension

      public Dimension getThumbnailDimension()
      Convenience method that returns the size of the thumbnails in a new Dimension object.
      Returns:
      The desired dimensions of the Thumbnail size and width.
    • getScalingSteps

      public int getScalingSteps()
      The number of scaling steps. Interestingly the quality gets better if scaling is done in several steps.
      Returns:
      the number of scaling steps
    • setScalingSteps

      public void setScalingSteps(int scalingSteps)
      Sets the number of scaling steps. Interestingly the quality gets better if scaling is done in several steps.
      Parameters:
      scalingSteps - the new number of scaling Steps
    • getLowresJpgQuality

      public float getLowresJpgQuality()
      Returns the lowres jpg quality factor
      Returns:
      the lowres jpg quality factor
    • getLowresJpgQualityPercent

      public int getLowresJpgQualityPercent()
      Same as
      Returns:
      the lowres quality number
      See Also:
    • setLowresJpgQuality

      public void setLowresJpgQuality(float lowresJpgQuality)
      sets the lowers quality number
      Parameters:
      lowresJpgQuality - the lowres quality
    • setLowresJpgQualityPercent

      public void setLowresJpgQualityPercent(int lowresJpgQualityPercent)
      Convenience method that allows the quality to be specified between 0 and 100 as an integer. If the value is out of bounds it is raised to 0 or lowered to 100.
      Parameters:
      lowresJpgQualityPercent - the lowres quality
    • getMidresHeight

      public int getMidresHeight()
    • setMidresHeight

      public void setMidresHeight(int midresHeight)
    • getMidresJpgQuality

      public float getMidresJpgQuality()
    • setMidresJpgQuality

      public void setMidresJpgQuality(float midresJpgQuality)
    • getMidresJpgQualityPercent

      public int getMidresJpgQualityPercent()
      Same as getMidresJpgQuality() but returned as int and multiplied by 100
      Returns:
      the midres quality number
    • setMidresJpgQualityPercent

      public void setMidresJpgQualityPercent(float midresJpgQuality)
      Convenience method that allows the quality to be specified between 0 and 100 as an integer. If the value is out of bounds it is raised to 0 or lowered to 100.
      Parameters:
      midresJpgQuality - the desired quality between 0 and 100
    • getMidresWidth

      public int getMidresWidth()
      Returns the width of the midres images
      Returns:
      the width of the midres images
    • setMidresWidth

      public void setMidresWidth(int midresWidth)
    • getMidresDimension

      public Dimension getMidresDimension()
      Convenience method the generates a new Dimension object with the Midres dimensions.
      Returns:
      A new object with the Midres dimensions.
    • getPicsPerRow

      public int getPicsPerRow()
      The number of rows that should be generated on the group overview page
      Returns:
      The number of rows that should be generated on the group overview page
    • setPicsPerRow

      public void setPicsPerRow(int picsPerRow)
    • getStartNode

      public SortableDefaultMutableTreeNode getStartNode()
      The note from which to start
      Returns:
      The node from which to start
    • setStartNode

      public void setStartNode(SortableDefaultMutableTreeNode startNode)
    • setRotateHighres

      public void setRotateHighres(boolean rotateHighres)
      Indicate that a highres image should be rotated
      Parameters:
      rotateHighres - whether to rotate highres images
    • isRotateHighres

      public boolean isRotateHighres()
      returns whether a highres image should be rotated
      Returns:
      true if the highres image should be rotated, false if not
    • isFolderIconRequired

      public boolean isFolderIconRequired()
    • setFolderIconRequired

      public void setFolderIconRequired(boolean folderIconRequired)
    • getDownloadZipFileName

      public String getDownloadZipFileName()
      Returns the name for the ZipFile containing the downloadable images
      Returns:
      The name of the file to create (no path information)
    • setDownloadZipFileName

      public void setDownloadZipFileName(String downloadZipFileName)
      Sets the name of the Zip file to be created
      Parameters:
      downloadZipFileName - the name of the zip file to create
    • getFtpTargetDir

      public String getFtpTargetDir()
      Returns:
      the ftpTargetDir
    • setFtpTargetDir

      public void setFtpTargetDir(String ftpTargetDir)
      Parameters:
      ftpTargetDir - the ftpTargetDir to set
    • getSshServer

      public String getSshServer()
      Returns:
      the sshServer
    • setSshServer

      public void setSshServer(String sshServer)
      Parameters:
      sshServer - the sshServer to set
    • getSshUser

      public String getSshUser()
      Returns:
      the sshUser
    • setSshUser

      public void setSshUser(String sshUser)
      Parameters:
      sshUser - the sshUser to set
    • getSshPassword

      public String getSshPassword()
      Returns:
      the sshPassword
    • setSshPassword

      public void setSshPassword(String sshPassword)
      Parameters:
      sshPassword - the sshPassword to set
    • getSshTargetDir

      public String getSshTargetDir()
      Returns:
      the sshTargetDir
    • setSshTargetDir

      public void setSshTargetDir(String sshTargetDir)
      Parameters:
      sshTargetDir - the sshTargetDir to set
    • getSshKeyFile

      public String getSshKeyFile()
      Returns:
      the sshKeyFile
    • setSshKeyFile

      public void setSshKeyFile(String sshKeyFile)
      Parameters:
      sshKeyFile - the sshKeyFile to set
    • getGoogleMapsApiKey

      public String getGoogleMapsApiKey()
      Returns the memorised Google Maps API key
      Returns:
      the Google Maps API key
    • setGoogleMapsApiKey

      public void setGoogleMapsApiKey(String googleMapsApiKey)
      Rememebrs the Google Maps API key
      Parameters:
      googleMapsApiKey - the key to remember
    • getPictureNaming

      public GenerateWebsiteRequest.PictureNamingType getPictureNaming()
      Returns the method for picture Naming
      Returns:
      the picture naming code
    • setPictureNaming

      public void setPictureNaming(GenerateWebsiteRequest.PictureNamingType pictureNaming)
      Sets the method for picture naming. Validates that the number is in the bounds
      Parameters:
      pictureNaming - Picture Naming Type
    • getSequentialStartNumber

      public int getSequentialStartNumber()
      Returns:
      the setSequentialStartNumber
    • setSequentialStartNumber

      public void setSequentialStartNumber(int setSequentialStartNumber)
      Parameters:
      setSequentialStartNumber - the setSequentialStartNumber to set
    • isWriteRobotsTxt

      public boolean isWriteRobotsTxt()
      Returns:
      the writeRobotsTxt
    • setWriteRobotsTxt

      public void setWriteRobotsTxt(boolean writeRobotsTxt)
      Parameters:
      writeRobotsTxt - the writeRobotsTxt to set
    • getOutputTarget

      public GenerateWebsiteRequest.OutputTarget getOutputTarget()
      Returns the output target choice
      Returns:
      the output target choice
    • setOutputTarget

      public void setOutputTarget(GenerateWebsiteRequest.OutputTarget outputTarget)
      Sets the method for output targets
      Parameters:
      outputTarget - the output target
    • getSshAuthType

      public GenerateWebsiteRequest.SshAuthType getSshAuthType()
      Returns the output target choice
      Returns:
      the output target choice
    • setSshAuthType

      public void setSshAuthType(GenerateWebsiteRequest.SshAuthType sshAuthType)
      Sets the method for output targets
      Parameters:
      sshAuthType - see the documentation of ssh
    • getFtpPort

      public int getFtpPort()
      Returns the ftp port
      Returns:
      the ftp port
    • setFtpPort

      public void setFtpPort(int ftpPort)
      Sets the ftp port
      Parameters:
      ftpPort - the ftp port
    • getSshPort

      public int getSshPort()
      Returns the ssh port
      Returns:
      the ssh port
    • setSshPort

      public void setSshPort(int sshPort)
      Sets the ssh port
      Parameters:
      sshPort - the ssh port
    • getFtpServer

      public String getFtpServer()
      Returns:
      the ftpServer
    • setFtpServer

      public void setFtpServer(String ftpServer)
      Parameters:
      ftpServer - the server address
    • getFtpUser

      public String getFtpUser()
      Returns:
      the ftpUser
    • setFtpUser

      public void setFtpUser(String ftpUser)
      Parameters:
      ftpUser - the ftpUser to set
    • setFtpPassword

      public void setFtpPassword(String ftpPassword)
      Parameters:
      ftpPassword - the ftpPassword to set
    • getFtpPassword

      public String getFtpPassword()
      Returns:
      the ftpUser
    • isOpenWebsiteAfterRendering

      public boolean isOpenWebsiteAfterRendering()
    • setOpenWebsiteAfterRendering

      public void setOpenWebsiteAfterRendering(boolean openWebsiteAfterRendering)
    • toString

      public String toString()
      Formats a neat summary of the options
      Overrides:
      toString in class Object
      Returns:
      A nicely formatted summary of the option that are set.
    • saveToSettings

      public void saveToSettings()
      This optional method saves the options into the Settings object so that they can be remembered for the next time Note: Not all of them (yet?)