1 package org.catacomb.druid.gui.edit; 2 3 import org.catacomb.druid.event.LabelActor; 4 import org.catacomb.druid.swing.DBorderLayout; 5 import org.catacomb.druid.swing.DDropTextField; 6 7 import java.awt.Color; 8 9 10 public class DruDropBox extends DruGCPanel implements LabelActor { 11 static final long serialVersionUID = 1001; 12 13 DDropTextField textField; 14 15 16 public DruDropBox() { 17 setBorderLayout(0, 0); 18 19 20 textField = new DDropTextField("", 30); 21 textField.setLabelActor(this); 22 addDComponent(textField, DBorderLayout.CENTER); 23 24 } 25 26 public void setBg(Color c) { 27 textField.setBackground(c.brighter()); 28 super.setBg(c); 29 } 30 31 public void labelAction(String s, boolean b) { 32 valueChange(s); 33 } 34 35 public DDropTextField getDropField() { 36 return textField; 37 } 38 39 public void clear() { 40 textField.setText(""); 41 } 42 43 public void druDisable() { 44 } 45 46 public void setText(String s) { 47 textField.setText(s); 48 } 49 50 public void druEnable() { 51 } 52 53 public String getText() { 54 return textField.getText(); 55 } 56 57 public Object getDropee() { 58 return textField.getDropee(); 59 } 60 61 }