1 7 8 package org.enhydra.jawe.config; 9 10 11 12 import java.awt.*; 13 14 import javax.swing.*; 15 16 import org.enhydra.jawe.*; 17 18 19 public class CfgLDAP extends BaseConfigPane{ 20 21 private JTextField countLimitField, timeLimitField; 22 23 27 public CfgLDAP(String name){ 28 super(name); 29 30 countLimitField = new JTextField(); 31 addComponent("Config.LDAP.CountLimit.Label",countLimitField ); 32 timeLimitField = new JTextField(); 33 addComponent("Config.LDAP.TimeLimit.Label",timeLimitField ); 34 readConf(); 35 } 36 public void readConf(){ 37 countLimitField.setText( 38 Integer.toString(JaWEConfig.getInstance().getLDAPCountLimit())); 39 timeLimitField.setText( 40 Integer.toString(JaWEConfig.getInstance().getLDAPTimeLimit())); 41 } 42 43 public void save(){ 44 JaWEConfig.getInstance().setLDAPCountLimit( 45 Integer.parseInt(countLimitField.getText())); 46 JaWEConfig.getInstance().setLDAPTimeLimit( 47 Integer.parseInt(timeLimitField.getText())); 48 } 49 50 public Component getComponent(){ 51 return this; 52 } 53 54 55 } 56 57 | Popular Tags |