Class PovrayDialog

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

public class PovrayDialog extends JDialog
A dialog for controling the creation of a povray input file from a Chemframe and a display. The actual leg work of writing the file out is done by PovrayWriter.java.

Borrows code from org.openscience.jmol.Vibrate (Thanks!).

Author:
Thomas James Grey (tjg1@ch.ic.ac.uk), Matthew A. Meineke (mmeineke@nd.edu)
See Also:
  • Field Details

    • vwr

      private transient Viewer vwr
    • povrayPathButton

      protected JButton povrayPathButton
    • goButton

      protected JButton goButton
    • saveField

      protected JTextField saveField
    • savePathLabel

      protected JTextField savePathLabel
    • outputWidth

      private int outputWidth
    • outputHeight

      private int outputHeight
    • povrayPathLabel

      protected JTextField povrayPathLabel
    • runPovCheck

      protected JCheckBox runPovCheck
    • allFramesCheck

      protected JCheckBox allFramesCheck
    • antiAliasCheck

      protected JCheckBox antiAliasCheck
    • displayWhileRenderingCheck

      protected JCheckBox displayWhileRenderingCheck
    • imageSizeWidth

      private JLabel imageSizeWidth
    • imageSizeTextWidth

      private JFormattedTextField imageSizeTextWidth
    • imageSizeHeight

      private JLabel imageSizeHeight
    • imageSizeTextHeight

      private JFormattedTextField imageSizeTextHeight
    • imageSizeRatioBox

      private JCheckBox imageSizeRatioBox
    • imageSizeRatioCombo

      private JComboBox<String> imageSizeRatioCombo
    • outputFormatCheck

      private JCheckBox outputFormatCheck
    • outputFormatCombo

      private JComboBox<String> outputFormatCombo
    • outputAlphaCheck

      private JCheckBox outputAlphaCheck
    • mosaicPreviewCheck

      private JCheckBox mosaicPreviewCheck
    • mosaicPreviewStart

      private JLabel mosaicPreviewStart
    • mosaicPreviewComboStart

      private JComboBox<String> mosaicPreviewComboStart
    • mosaicPreviewEnd

      private JLabel mosaicPreviewEnd
    • mosaicPreviewComboEnd

      private JComboBox<String> mosaicPreviewComboEnd
    • outputExtension

      private String outputExtension
    • outputFileType

      private String outputFileType
  • Constructor Details

    • PovrayDialog

      public PovrayDialog(JFrame f, Viewer vwr)
      Creates a dialog for getting info related to output frames in povray format.
      Parameters:
      f - The frame assosiated with the dialog
      vwr - The interacting display we are reproducing (source of view angle info etc)
  • Method Details

    • setImageDimensions

      public void setImageDimensions(int imageWidth, int imageHeight)
      Sets the output image dimensions. Setting either to <= 0 will remove the height and width specification from the commandline- the resulting behaviour depends on povray!
      Parameters:
      imageWidth - The width of the image.
      imageHeight - The height of the image.
    • goPressed

      void goPressed()
      Save or else launch povray- ie do our thang!
    • cancelPressed

      void cancelPressed()
      Responds to cancel being press- or equivalent eg window closed.
    • showSavePathDialog

      void showSavePathDialog()
      Show a file selector when the savePath button is pressed.
    • showPovrayPathDialog

      void showPovrayPathDialog()
      Show a file selector when the savePath button is pressed.
    • imageSizeChanged

      void imageSizeChanged()
      Called when the ImageSize check box is modified
    • outputFormatChanged

      void outputFormatChanged()
      Called when the OutputFormat check box is modified
    • mosaicPreviewChanged

      void mosaicPreviewChanged()
      Called when the MosaicPreview check box is modified
    • updateScreen

      protected void updateScreen()
      Update screen informations
    • updateCommandLine

      protected void updateCommandLine()
    • getCommandLine

      protected String getCommandLine()
      Generates a commandline from the options set for povray path etc and sets in the textField.
      Returns:
      command line
    • getINI

      private String getINI()
      Save INI file
      Returns:
      INI data
    • centerDialog

      protected void centerDialog()
      Centers the dialog on the screen.
    • getPathHistory

      private void getPathHistory()
      Just recovers the path settings from last session.
    • saveHistory

      private void saveHistory()
      Just saves the path settings from this session.
    • doubleQuoteIfContainsSpace

      String doubleQuoteIfContainsSpace(String str)
    • simpleQuoteIfContainsSpace

      String simpleQuoteIfContainsSpace(String str)