Class InputSaveVerifier

java.lang.Object
fr.ifremer.isisfish.ui.input.InputSaveVerifier
All Implemented Interfaces:
SaveVerifier
Direct Known Subclasses:
SensitivitySaveVerifier

public class InputSaveVerifier extends Object implements SaveVerifier
InputSaveVerifier.
Version:
$Revision$ Last update: $Date$ by : $Author$
Author:
letellier
  • Field Details

    • changed

      protected boolean changed
      Current entity modification state (modifier by PCL).
    • inputContentUI

      protected InputContentUI<?> inputContentUI
      L'ui en cours d'edition (au plus bas niveau des tabPane).
    • currentEntities

      protected HashMap<String,org.nuiton.topia.persistence.TopiaEntityContextable> currentEntities
      Map entity key to TopiaEntity.
    • entityPCL

      protected PropertyChangeListener entityPCL
      Intance unique de PCL pour pouvoir être ajouter et supprimé au bon moment.
  • Constructor Details

    • InputSaveVerifier

      public InputSaveVerifier()
  • Method Details

    • getInputContentUI

      public InputContentUI<?> getInputContentUI()
    • setInputContentUI

      public void setInputContentUI(InputContentUI<?> inputContentUI)
    • checkEdit

      public int checkEdit()
      Tell verifier to check for unsaved modification. Then return user choice (JOptionPane type).
      Specified by:
      checkEdit in interface SaveVerifier
      Returns:
      user JOptionPane response
      See Also:
    • topiaChanged

      protected void topiaChanged()
    • noModif

      protected void noModif()
      Called by this class when entity modification state has been reset. (cancel, save...)
    • delete

      public void delete()
      Delete one entity and commit the change, try to selected intelligently other node in tree.

      Refresh all ui component where name match "input<entity type without package >.*"

    • toString

      protected String toString(org.nuiton.topia.persistence.TopiaEntity e)
      Try to get toString value from entity using entity name (or toString if name is not defined).
      Parameters:
      e - entity
      Returns:
    • create

      public void create(Class<? extends org.nuiton.topia.persistence.TopiaEntityContextable> type)
      Create new type entity.
      Parameters:
      type -
    • save

      public void save()
      Save all non saved entities. Change registered button states. Commit opened topia context.
    • cancel

      public void cancel()
      Cancel all modification on entity (rollback), and force reload it.
    • showTextAreaConfirmationMessage

      protected int showTextAreaConfirmationMessage(Component parent, String labelMessage, String textMessage, String title, int option)
      Display a JOptionPane with a JTextArea as main component.
      Parameters:
      parent - parent
      labelMessage - label message
      textMessage - text message into area
      title -
      option -
      Returns:
      user response
    • addCurrentEntity

      public void addCurrentEntity(org.nuiton.topia.persistence.TopiaEntityContextable currentEntity, String key)
      Add entity to check for modification. The verifier register to entity using TopiaEntity.addPropertyChangeListener(PropertyChangeListener). So modification have to be done on current entity. To check for embedded entity, add it too. Remove all entity with key
      Parameters:
      currentEntity - entity to check
      key - specific key (default to topiaId)
    • addCurrentEntity

      public void addCurrentEntity(org.nuiton.topia.persistence.TopiaEntityContextable currentEntity)
      Add entity to check for modification. The verifier register to entity using TopiaEntity.addPropertyChangeListener(PropertyChangeListener). So modification have to be done on current entity. To check for embedded entity, add it too. Remove all entity with key
      Parameters:
      currentEntity - entity to check
    • removeCurrentEntity

      public void removeCurrentEntity(String key)
      Remove monitored entities.
      Parameters:
      key - entity key to remove
    • reset

      public void reset()
      Reset state.
    • getEntity

      public <E extends org.nuiton.topia.persistence.TopiaEntityContextable> E getEntity(Class<E> clazz, String key)
    • getEntity

      public <E extends org.nuiton.topia.persistence.TopiaEntityContextable> E getEntity(Class<E> clazz)