1 package rero.dck.items; 2 3 import java.awt.*; 4 import java.awt.event.*; 5 6 import javax.swing.*; 7 import javax.swing.event.*; 8 9 import rero.dck.*; 10 11 public class NormalInput extends JPanel implements DItem 12 { 13 protected JLabel label; 14 15 public NormalInput(String text, int align) 16 { 17 setLayout(new FlowLayout(align)); 18 19 label = new JLabel(text); 20 21 add(label); 22 } 23 24 public void setEnabled(boolean b) 25 { 26 } 27 28 public void save() 29 { 30 31 } 32 33 public void refresh() 34 { 35 } 36 37 public int getEstimatedWidth() 38 { 39 return 0; 40 } 41 42 public void setAlignWidth(int width) 43 { 44 } 45 46 public void setParent(DParent parent) 47 { 48 49 } 50 51 public void setText(String text) 52 { 53 label.setText(text); 54 } 55 56 public JComponent getComponent() 57 { 58 return this; 59 } 60 } 61 62 | Popular Tags |