Class EidSwingHelper

java.lang.Object
be.gaudry.swing.eid.EidSwingHelper

public class EidSwingHelper extends Object
Since:
1.0 Jun 12, 2009
Author:
Steph GAUDRY
  • Field Details

  • Method Details

    • setPhotoMenu

      public static void setPhotoMenu(ScaledImageLabel imageView, IPhotoFilePanel photoPanel)
    • getEidPreferredDirectory

      public static File getEidPreferredDirectory()
    • saveEidPreferredDirectory

      public static void saveEidPreferredDirectory(File prefDir)
    • formatCardNumber

      public static String formatCardNumber(String cardNumber)
    • formatNationalRegisterNumber

      public static String formatNationalRegisterNumber(String number)
      Parameters:
      number -
      Returns:
      TODO : use stringbuilder
    • formatCardValidity

      public static String formatCardValidity(Date from, Date to)
    • fixPhotoRefresh

      public static void fixPhotoRefresh(JPanel p)
      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. Do not use ComponentListener for notification of "showing". That's left-over from AWT-age. Do use AncestorListener. That seems to be the Swing replacement, slightly misnomed notification of "added" which actually means "showing" Do use HierarchyListener only if really interested in fine-grained state changes
      Parameters:
      p -
    • customizeEIDComponent

      public static void customizeEIDComponent(Component component, IEidDocumentType docType)
    • customizeEIDComponents

      public static void customizeEIDComponents(Container cont, IEidDocumentType docType)
    • clearEIDComponents

      public static void clearEIDComponents(Container panel)
    • getEidType

      public static IEidDocumentType getEidType(IEidDocumentType docType)
      Parameters:
      docType -
      Returns:
      safe elements to get colors depending on the current LAF
    • customizeEIDTitledBorder

      public static void customizeEIDTitledBorder(TitledBorder border, IEidDocumentType iEidDocumentType)