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
FieldsModifier and TypeFieldDescriptionstatic MaskFormatterstatic SimpleDateFormatColor of the info values backgroundstatic Stringstatic String -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearEIDComponents(Container panel)static voidcustomizeEIDComponent(Component component, IEidDocumentType docType)static voidcustomizeEIDComponents(Container cont, IEidDocumentType docType)static voidcustomizeEIDTitledBorder(TitledBorder border, IEidDocumentType iEidDocumentType)static voidThe photo container has a bug and sometimes need to be refreshed.static StringformatCardNumber(String cardNumber)static StringformatCardValidity(Date from, Date to)static StringformatNationalRegisterNumber(String number)static Filestatic IEidDocumentTypegetEidType(IEidDocumentType docType)static voidsaveEidPreferredDirectory(File prefDir)static voidsetPhotoMenu(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)
-