Class AtomChainDialog

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

public class AtomChainDialog
extends JDialog
AtomChainDialog.
Author:
Harald Barsnes, Marc Vaudel
See Also:
Serialized Form
  • Constructor Details

    • AtomChainDialog

      public AtomChainDialog​(JDialog parent, AtomChain atomChainAdded, AtomChain atomChainRemoved, boolean onlyAddition)
      Creates a new dialog.
      Parameters:
      parent - the parent dialog
      atomChainAdded - the added atom chain to edit
      atomChainRemoved - the removed atom chain to edit
      onlyAddition - if true, atoms can only be added and not removed
    • AtomChainDialog

      public AtomChainDialog​(Frame parent, AtomChain atomChainAdded, AtomChain atomChainRemoved, boolean onlyAddition)
      Creates a new dialog.
      Parameters:
      parent - the parent frame
      atomChainAdded - the added atom chain to edit
      atomChainRemoved - the removed atom chain to edit
      onlyAddition - if true, atoms can only be added and not removed
  • Method Details

    • addElementsPanel

      public void addElementsPanel()
      Add a new atom panel.
    • removeElementsPanel

      public void removeElementsPanel​(int panelIndex)
      Remove the given elements panel.
      Parameters:
      panelIndex - the index of the panel to remove
    • updateAtomComposition

      public void updateAtomComposition()
      Updates the atom composition panel.
    • isCanceled

      public boolean isCanceled()
      Indicates whether the edition has been canceled by the user.
      Returns:
      a boolean indicating whether the edition has been canceled by the user
    • getAtomChainAdded

      public AtomChain getAtomChainAdded()
      Returns the added atom chain as edited by the user.
      Returns:
      the atom chain as edited by the user
    • getAtomChainRemoved

      public AtomChain getAtomChainRemoved()
      Returns the removed atom chain as edited by the user.
      Returns:
      the atom chain as edited by the user
    • main

      public static void main​(String[] args)
      Main method for testing purposes.
      Parameters:
      args - the command line arguments