Package be.gaudry.swing.eid
Class EidSwingHelper
java.lang.Object
be.gaudry.swing.eid.EidSwingHelper
- Since:
- 1.0 Jun 12, 2009
- Author:
- Steph GAUDRY
-
Field Summary
Modifier and TypeFieldDescriptionstatic MaskFormatter
static SimpleDateFormat
Color of the info values backgroundstatic String
static String
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clearEIDComponents(Container panel)
static void
customizeEIDComponent(Component component, IEidDocumentType docType)
static void
customizeEIDComponents(Container cont, IEidDocumentType docType)
static void
customizeEIDTitledBorder(TitledBorder border, IEidDocumentType iEidDocumentType)
static void
The photo container has a bug and sometimes need to be refreshed.static String
formatCardNumber(String cardNumber)
static String
formatCardValidity(Date from, Date to)
static String
formatNationalRegisterNumber(String number)
static File
static IEidDocumentType
getEidType(IEidDocumentType docType)
static void
saveEidPreferredDirectory(File prefDir)
static void
setPhotoMenu(ScaledImageLabel imageView, IPhotoFilePanel photoPanel)
-
Field Details
-
CARD_VALIDITY_DATE_FORMAT
Color of the info values background -
CARD_NUMBER_FORMATTER
-
EID_RESOURCE_PATH
- See Also:
- Constant Field Values
-
EID_PERSON_RESOURCE_PATH
- See Also:
- Constant Field Values
-
-
Method Details
-
setPhotoMenu
-
getEidPreferredDirectory
-
saveEidPreferredDirectory
-
formatCardNumber
-
formatNationalRegisterNumber
- Parameters:
number
-- Returns:
- TODO : use stringbuilder
-
formatCardValidity
-
fixPhotoRefresh
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
-
customizeEIDComponents
-
clearEIDComponents
-
getEidType
- Parameters:
docType
-- Returns:
- safe elements to get colors depending on the current LAF
-
customizeEIDTitledBorder
public static void customizeEIDTitledBorder(TitledBorder border, IEidDocumentType iEidDocumentType)
-