Class PersonSimpleDataEditPanel

All Implemented Interfaces:
IItem<PersonExt>, IItemEditor<PersonExt>, IItemPanel<PersonExt>, IEidPart, IPhotoFilePanel, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible
Direct Known Subclasses:
PersonEidSimpleDataEditPanel

public class PersonSimpleDataEditPanel extends BrolPanel implements IEidPart, IItemEditor<PersonExt>, IPhotoFilePanel
See Also:
Serialized Form
  • Field Details

    • person

      protected PersonExt person
    • birthDatePicker

      org.jdesktop.swingx.JXDatePicker birthDatePicker
    • nameTextField

      JTextField nameTextField
    • firstnameLabel

      protected JLabel firstnameLabel
    • firstnameTextField

      JTextField firstnameTextField
    • pseudoTextField

      JTextField pseudoTextField
    • sexComboBox

      JComboBox<EGender> sexComboBox
  • Constructor Details

    • PersonSimpleDataEditPanel

      public PersonSimpleDataEditPanel()
  • Method Details

    • initData

      protected void initData()
      Description copied from class: BrolPanel
      Method used to initialize certain data before building the various graphical components that will then be added to the panel, during the call to BrolPanel.initGUI().
      Overrides:
      initData in class BrolPanel
    • initListeners

      protected void initListeners()
      Description copied from class: BrolPanel
      Method that allows to initialize listeners and bind them to already built GUI components when calling initGUI, or to bind actions (initialized in BrolPanel.initData()) to components such as buttons etc.
      This is also where the different menus are attached to the components.
      Overrides:
      initListeners in class BrolPanel
    • customizeGUI

      protected void customizeGUI()
      Description copied from class: BrolPanel
      Method used to adapt the various graphical components already present in the panel, after a call to BrolPanel.initGUI().
      Overrides:
      customizeGUI in class BrolPanel
    • forcePhotoRefresh

      public void forcePhotoRefresh()
      The photo container has a bug and sometimes need to be refreshed. invalidate() and other methods doesn't work. Thus, this method affects temporary the size to refresh the photo.
    • setEidColors

      public void setEidColors(IEidDocumentType iEidDocumentType, EidDocumentVersion version)
      Specified by:
      setEidColors in interface IEidPart
    • main

      public static void main(String[] args)
      Auto-generated main method to display this JPanel inside a new JFrame.
    • clearEidPhoto

      public void clearEidPhoto()
    • getPhotoFromGUI

      protected Image getPhotoFromGUI()
    • setEidPhoto

      public void setEidPhoto(byte[] photo)
    • setIDData

      void setIDData(be.belgium.eid.objects.IDData data)
      Allow to set IDData from other classes into the package
      Parameters:
      data -
    • clearData

      public void clearData()
      Description copied from interface: IEidPart
      Clear all EID data field (set textfields empty, reset photo and certificates, etc.).
      Specified by:
      clearData in interface IEidPart
    • setPhotoFile

      public void setPhotoFile(File jpgFile)
      Specified by:
      setPhotoFile in interface IPhotoFilePanel
    • initGUI

      protected void initGUI()
      Description copied from class: BrolPanel
      Method that places the various graphical components on the panel. This method is also used by jgloo to build the view.
      Specified by:
      initGUI in class BrolPanel
    • setLanguage

      protected void setLanguage()
      Description copied from class: BrolPanel
      Method used to define the different texts or images according to a language. If this panel observes LanguageHelper, each time it changes, this method is called.
      For texts, it is possible to call the method BrolPanel.getString(String, String) to retrieve a text according to the default language
      Specified by:
      setLanguage in class BrolPanel
    • data2view

      public void data2view()
      Description copied from interface: IItemEditor
      Gets data from the item object and set the view components with it
      Specified by:
      data2view in interface IItemEditor<PersonExt>
    • saveOrUpdateItem

      public PersonExt saveOrUpdateItem()
      Description copied from interface: IItemEditor
      Calls the persistent layer to save or update the current item.
      This method may be invoked by the ManagementPanel
      Specified by:
      saveOrUpdateItem in interface IItemEditor<PersonExt>
      Returns:
      saved item (the persistent layer will probably set the id if a new item is saved)
    • view2data

      public void view2data()
      Description copied from interface: IItemEditor
      Gets data from the view, and sets the item data with it
      Specified by:
      view2data in interface IItemEditor<PersonExt>
    • getItemName

      public String getItemName()
      Specified by:
      getItemName in interface IItemPanel<PersonExt>
      Returns:
      a user readable name (ie person, actor,...)
    • getPanel

      public JPanel getPanel()
      Description copied from interface: IItemPanel
      Mostly implemented like this :
      public JPanel getPanel(){
              return this;
       }
      because we cannot inherit from JPanel for an interface, but we must insert the implemented class in a container.
      Specified by:
      getPanel in interface IEidPart
      Specified by:
      getPanel in interface IItemPanel<PersonExt>
      Returns:
      the panel
    • setItem

      public void setItem(PersonExt item)
      Description copied from interface: IItem
      Give an item to the view
      Specified by:
      setItem in interface IItem<PersonExt>