01: package com.teamkonzept.field;
02:
03: import com.teamkonzept.lib.*;
04: import com.teamkonzept.international.LanguageManager;
05:
06: public class TKPasswordField extends TKInputField {
07: // $Id: TKPasswordField.java,v 1.15 2001/09/21 14:22:07 uli Exp $
08:
09: public static final String CLASS_ID = "PASSWORD";
10:
11: public TKPasswordField() {
12: };
13:
14: public TKPasswordField(String name, int size) {
15: this (name, size, size, null);
16: }
17:
18: public TKPasswordField(String name, int size, String showName) {
19: this (name, size, size, showName);
20: }
21:
22: public TKPasswordField(String name, int size, int length,
23: String showName) {
24: initPasswordField(CLASS_ID, name, size, length, showName);
25: }
26:
27: public final void initPasswordField(String type, String name,
28: int size, int length, String showName) {
29: initInputField(type, name, size, length, showName, CHECK_STRING);
30: }
31:
32: //***************************************************************************
33: /**
34: * Methode zur Dedinition eines Passwortfeldes
35: */
36: public TKFieldGroup getDefGroup(TKFieldSwitch allSwitch,
37: TKFieldSwitchList allSwitchList) {
38:
39: TKBaseField[] inputArray = {
40: new TKInputField(TKInputField.NAME_KEY, 16, 80,
41: LanguageManager.getText(LANGUAGE_CONTEXT,
42: "INPUT_NAME"),
43: TKInputField.CHECK_STRING),
44: new TKInputField(TKInputField.SHOW_NAME_KEY, 50, 254,
45: LanguageManager.getText(LANGUAGE_CONTEXT,
46: "INPUT_SHOWNAME"),
47: TKInputField.CHECK_STRING),
48: new TKInputField(TKInputField.SIZE_KEY, 3, 3,
49: LanguageManager.getText(LANGUAGE_CONTEXT,
50: "INPUT_SIZE"),
51: TKInputField.CHECK_INTEGER),
52: new TKInputField(TKInputField.LENGTH_KEY, 3, 3,
53: LanguageManager.getText(LANGUAGE_CONTEXT,
54: "INPUT_MAXLENGTH")) };
55:
56: TKFieldGroup passwordGroup = new TKFieldGroup(
57: TKPasswordField.CLASS_ID, new TKVector(inputArray),
58: LanguageManager.getText(LANGUAGE_CONTEXT,
59: TKPasswordField.CLASS_ID));
60:
61: return passwordGroup;
62: }
63:
64: }
|