home *** CD-ROM | disk | FTP | other *** search
- import java.awt.BorderLayout;
- import java.awt.Button;
- import java.awt.Choice;
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dimension;
- import java.awt.Event;
- import java.awt.Font;
- import java.awt.FontMetrics;
- import java.awt.Graphics;
- import java.awt.Panel;
- import java.awt.Rectangle;
- import java.awt.TextField;
- import java.awt.Window;
- import java.util.Date;
- import java.util.Vector;
-
- public class JDPComboBox extends Panel {
- JDPButton downButton;
- TextField text;
- Choice thisChoice;
- JDPList list;
- Vector displayVector;
- Vector actualVector;
- JDPUser user;
- JDPPopupComponent popup;
- JDPPopupWindow popupw;
- int totalHeight;
- long lastEventTime;
- long popupHiddenTime;
- Font currentFont;
- Color fgColor;
- Color bgColor;
- boolean usePopup;
- Container parent;
- boolean popupShowing;
- int minimumWidth = 30;
- int minimumHeight = 10;
- int maximumWidth = 250;
- int maximumHeight = 60;
-
- void selectPopupType() {
- if (this.parent == null) {
- this.parent = super.getParent();
- if (this.parent != null) {
- for(; !(this.parent instanceof Window); this.parent = this.parent.getParent()) {
- if (this.parent instanceof JDesignerPro) {
- this.usePopup = true;
- }
- }
-
- if (this.parent instanceof JDPMainWindow) {
- this.usePopup = true;
- }
-
- if (this.parent instanceof JDPSetup) {
- this.usePopup = true;
- }
- }
- }
-
- }
-
- void initCombo(JDPUser var1, String var2, int var3) {
- this.usePopup = false;
- this.user = var1;
- this.setUser(var1);
- if (var1 != null) {
- this.list = new JDPList(var1);
- this.list.setScrollSouthDisabled(true);
- }
-
- this.downButton = new JDPButton(5);
- this.text = new TextField(var2, var3);
- ((Container)this).setLayout(new BorderLayout());
- this.displayVector = new Vector();
- this.actualVector = new Vector();
- this.initChoice();
- Panel var4 = new Panel();
- ((Container)var4).setLayout(new BorderLayout());
- ((Container)var4).add("East", this.downButton);
- ((Container)var4).add("Center", this.text);
- ((Container)this).add("North", var4);
- this.layoutChoice();
- this.lastEventTime = -1L;
- }
-
- public String getSelectedItem() {
- return this.thisChoice.getSelectedItem();
- }
-
- public int countItems() {
- return this.getItemCount();
- }
-
- public void sortItems() {
- this.sortItems(false, true);
- }
-
- public void sortItems(boolean var1, boolean var2) {
- String var3 = null;
- int var4 = 0;
- int var7 = this.countItems();
-
- for(int var8 = 0; var8 < var7; ++var8) {
- for(int var9 = var8; var9 < var7; ++var9) {
- String var6 = (String)this.displayVector.elementAt(var9);
- if (var1) {
- var6 = var6.toLowerCase();
- }
-
- if (var3 == null || var2 && var6.compareTo(var3) < 0 || !var2 && var6.compareTo(var3) > 0) {
- var3 = var6;
- var4 = var9;
- }
- }
-
- if (var8 < var4 || var4 != 0) {
- String var5 = (String)this.displayVector.elementAt(var8);
- this.displayVector.setElementAt(this.displayVector.elementAt(var4), var8);
- this.displayVector.setElementAt(var5, var4);
- var5 = (String)this.actualVector.elementAt(var8);
- this.actualVector.setElementAt(this.actualVector.elementAt(var4), var8);
- this.actualVector.setElementAt(var5, var4);
- }
-
- var3 = null;
- var4 = 0;
- }
-
- this.reloadChoice();
- }
-
- void setUser(JDPUser var1) {
- this.user = var1;
- if (var1 != null) {
- this.popupw = new JDPPopupWindow(var1, this);
- if (var1.popup != null) {
- this.popup = var1.popup;
- }
- }
- }
-
- void getUser() {
- if (this.user == null && ((Component)this).getParent() != null) {
- Container var1;
- for(var1 = ((Component)this).getParent(); var1 != null && !(var1 instanceof JDPMainWindow) && !(var1 instanceof JDPSingle) && !(var1 instanceof JDesignerPro) && !(var1 instanceof JDPDialog); var1 = ((Component)var1).getParent()) {
- }
-
- if (var1 != null) {
- if (var1 instanceof JDPMainWindow) {
- this.user = ((JDPMainWindow)var1).user;
- }
-
- if (var1 instanceof JDPSingle) {
- this.user = ((JDPSingle)var1).user[0];
- }
-
- if (var1 instanceof JDesignerPro) {
- this.user = ((JDesignerPro)var1).user[0];
- }
-
- if (var1 instanceof JDPDialog) {
- this.user = ((JDPDialog)var1).user;
- }
-
- this.setUser(this.user);
- }
- }
-
- }
-
- public void select(int var1) {
- if (var1 >= 0 && var1 < this.thisChoice.countItems()) {
- this.thisChoice.select(var1);
- this.text.setText(this.thisChoice.getSelectedItem());
- }
-
- }
-
- public void select(String var1) {
- this.thisChoice.select(var1);
- if (this.thisChoice.getSelectedItem() != null) {
- this.text.setText(this.thisChoice.getSelectedItem());
- } else {
- this.text.setText("");
- }
- }
-
- void displayPulldown() {
- if (this.popup == null) {
- this.getUser();
- }
-
- this.selectPopupType();
- if (!this.usePopup || !this.popupShowing && this.thisChoice.countItems() != 0) {
- if (this.usePopup || !this.popupShowing && this.thisChoice.countItems() != 0) {
- this.popupShowing = true;
- int var1 = ((Component)this).bounds().x;
- int var2 = ((Component)this).bounds().y;
- Container var3 = ((Component)this).getParent();
- if (this.usePopup) {
- while(var3 != null && !var3.equals(this.popup.getParent())) {
- Rectangle var5 = ((Component)var3).bounds();
- var1 += var5.x;
- var2 += var5.y;
- var3 = ((Component)var3).getParent();
- }
- } else {
- while(var3 != null && !var3.equals(this.popupw.getParent())) {
- Rectangle var4 = ((Component)var3).bounds();
- var1 += var4.x;
- var2 += var4.y;
- var3 = ((Component)var3).getParent();
- }
- }
-
- this.loadPulldown();
- if (this.usePopup) {
- this.popup.display(var1 + 1, var2 + this.text.bounds().height, var2);
- this.popup.setEventListener(this);
- } else {
- this.popupw.display(var1 + 1, var2 + this.text.bounds().height, var2);
- this.popupw.setEventListener(this);
- }
-
- this.list.requestFocus();
- } else {
- if (this.popupw.getEventListener() != null && this.popupw.getEventListener().equals(this)) {
- this.popupw.hide();
- }
-
- this.popupShowing = false;
- }
- } else {
- if (this.popup.getEventListener() != null && this.popup.getEventListener().equals(this)) {
- this.popup.hide();
- }
-
- this.popupShowing = false;
- }
- }
-
- void loadPulldown() {
- if (this.user != null && this.list == null) {
- this.list = new JDPList(this.user);
- this.list.setScrollSouthDisabled(true);
- }
-
- this.list.setFont(this.text.getFont());
- this.list.setForeground(this.text.getForeground());
- if (!this.text.getBackground().equals(Color.lightGray)) {
- this.list.setBackground(this.text.getBackground());
- }
-
- FontMetrics var1 = this.downButton.getGraphics().getFontMetrics();
- int var2 = var1.getHeight() + 2;
- this.totalHeight = this.thisChoice.countItems() * var2 + 5;
- if (this.usePopup) {
- this.popup.removeAll();
- this.popup.setFont(this.getFont());
- this.popup.setForeground(this.getForeground());
- this.popup.setBackground(this.getBackground());
- this.popup.add("Center", this.list);
- } else {
- this.popupw.removeAll();
- this.popupw.setFont(this.getFont());
- this.popupw.setForeground(this.getForeground());
- this.popupw.setBackground(this.getBackground());
- this.popupw.add("Center", this.list);
- }
-
- this.list.setMinWidth(((Component)this).bounds().width - 2);
- this.list.setMinHeight(this.totalHeight);
- this.list.threeDBorder = false;
- this.list.clear();
-
- for(int var3 = 0; var3 < this.thisChoice.countItems(); ++var3) {
- this.list.addItem(this.thisChoice.getItem(var3));
- }
-
- this.list.select(this.text.getText());
- this.list.makeVisible(this.list.getSelectedIndex());
- }
-
- public int getItemCount() {
- return this.displayVector.size();
- }
-
- public void enable() {
- this.text.enable();
- this.downButton.enable();
- }
-
- public void disable() {
- this.text.disable();
- this.downButton.disable();
- }
-
- public void setMinimumHeight(int var1) {
- this.minimumHeight = var1;
- }
-
- void selectKey(String var1) {
- int var2;
- if ((var2 = this.actualVector.indexOf(var1)) >= 0) {
- this.select(var2);
- }
-
- }
-
- String getItemForKey(String var1) {
- int var2;
- return (var2 = this.actualVector.indexOf(var1)) >= 0 ? (String)this.displayVector.elementAt(var2) : null;
- }
-
- public Dimension preferredSize() {
- return this.minimumSize();
- }
-
- public int getMinimumHeight() {
- return this.minimumHeight;
- }
-
- public void setMaximumWidth(int var1) {
- this.maximumWidth = var1;
- }
-
- public int getMaximumWidth() {
- return this.maximumWidth;
- }
-
- public void remove(int var1) {
- if (this.displayVector != null) {
- if (var1 < this.displayVector.size()) {
- this.displayVector.removeElementAt(var1);
- this.actualVector.removeElementAt(var1);
- this.reloadChoice();
- }
-
- }
- }
-
- public void remove(String var1) {
- for(int var2 = 0; var2 < this.displayVector.size(); ++var2) {
- if (((String)this.displayVector.elementAt(var2)).equals(var1)) {
- this.remove(var2);
- return;
- }
- }
-
- }
-
- public void loadChoice(JDPUser var1, JDPJagg var2, String var3, String var4, String var5, String var6) {
- this.initChoice();
- this.displayVector = new Vector();
- this.actualVector = new Vector();
- new JDPLoadChoice(var1, var2, this.thisChoice, var3, var4, var5, var6, this.actualVector);
-
- for(int var7 = 0; var7 < this.thisChoice.countItems(); ++var7) {
- this.displayVector.addElement(this.thisChoice.getItem(var7));
- }
-
- this.layoutChoice();
- }
-
- public void loadChoice(JDPUser var1, JDPJagg var2, String var3, String var4, String var5) {
- this.initChoice();
- this.displayVector = new Vector();
- this.actualVector = new Vector();
- new JDPLoadChoice(var1, var2, this.thisChoice, var3, var4, var5);
-
- for(int var6 = 0; var6 < this.thisChoice.countItems(); ++var6) {
- this.displayVector.addElement(this.thisChoice.getItem(var6));
- this.actualVector.addElement(this.thisChoice.getItem(var6));
- }
-
- this.layoutChoice();
- }
-
- public void loadChoice(String[] var1) {
- this.initChoice();
- this.displayVector = new Vector();
- this.actualVector = new Vector();
- if (var1 != null) {
- for(int var2 = 0; var2 < var1.length; ++var2) {
- if (var1[var2] != null && var1[var2].length() > 0) {
- this.addItem(var1[var2]);
- }
- }
-
- this.layoutChoice();
- }
- }
-
- public void loadChoice(String[] var1, String[] var2) {
- this.initChoice();
- this.displayVector = new Vector();
- this.actualVector = new Vector();
- if (var1 != null && var2 != null && var1.length == var2.length) {
- for(int var3 = 0; var3 < var1.length; ++var3) {
- if (var1[var3] != null && var1[var3].length() > 0 && var2[var3] != null && var2[var3].length() > 0) {
- this.addItem(var1[var3], var2[var3]);
- }
- }
-
- this.layoutChoice();
- }
- }
-
- void initChoice() {
- this.thisChoice = null;
- this.thisChoice = new Choice();
- }
-
- public void layoutChoice() {
- ((Container)this).layout();
- ((Component)this).paintAll(((Component)this).getGraphics());
- if (((Component)this).getParent() != null) {
- ((Component)this).getParent().layout();
- ((Component)this).getParent().paintAll(((Component)this).getParent().getGraphics());
- }
-
- }
-
- public void setBackground(Color var1) {
- this.bgColor = var1;
- this.text.setBackground(var1);
- if (this.list != null && !var1.equals(Color.lightGray)) {
- this.list.setBackground(var1);
- }
-
- if (!var1.equals(Color.white)) {
- this.downButton.setBackground(var1);
- }
-
- }
-
- public Color getBackground() {
- if (this.bgColor != null) {
- return this.bgColor;
- } else {
- Container var1 = ((Component)this).getParent();
- return var1 != null ? ((Component)var1).getBackground() : null;
- }
- }
-
- public String getItem(int var1) {
- return var1 >= 0 && var1 < this.thisChoice.countItems() ? this.thisChoice.getItem(var1) : null;
- }
-
- public int getItem(String var1) {
- for(int var2 = 0; var2 < this.displayVector.size(); ++var2) {
- if (((String)this.displayVector.elementAt(var2)).equals(var1)) {
- return var2;
- }
- }
-
- return -1;
- }
-
- void reloadChoice() {
- this.initChoice();
-
- for(int var1 = 0; var1 < this.displayVector.size(); ++var1) {
- this.thisChoice.addItem((String)this.displayVector.elementAt(var1));
- }
-
- this.layoutChoice();
- }
-
- public void setEditable(boolean var1) {
- if (this.text != null) {
- this.text.setEditable(var1);
- }
-
- }
-
- public boolean getEditable() {
- return this.text.isEditable();
- }
-
- public Dimension minimumSize() {
- Dimension var1 = new Dimension(20, 12);
- if (this.text != null) {
- var1 = ((Component)this.text).minimumSize();
- int var2 = 0;
- Graphics var3 = ((Component)this).getGraphics();
- if (this.user == null) {
- this.getUser();
- }
-
- if (this.thisChoice != null && this.downButton != null && this.user != null) {
- for(int var4 = 0; var4 < this.thisChoice.countItems(); ++var4) {
- int var5 = this.user.u.StringWidth(var3, this.thisChoice.getItem(var4));
- if (var5 > var2) {
- var2 = var5;
- }
- }
-
- if (var2 > 0) {
- var1.width = var2 + 30;
- }
- }
- }
-
- if (var1.width < this.minimumWidth) {
- var1.width = this.minimumWidth;
- }
-
- if (var1.width > this.maximumWidth) {
- var1.width = this.maximumWidth;
- }
-
- if (var1.height < this.minimumHeight) {
- var1.height = this.minimumHeight;
- }
-
- if (var1.height > this.maximumHeight) {
- var1.height = this.maximumHeight;
- }
-
- return var1;
- }
-
- String getItemKey(String var1) {
- for(int var2 = 0; var2 < this.displayVector.size(); ++var2) {
- if (((String)this.displayVector.elementAt(var2)).equals(var1)) {
- return (String)this.actualVector.elementAt(var2);
- }
- }
-
- return null;
- }
-
- public void setFont(Font var1) {
- this.currentFont = var1;
- this.text.setFont(var1);
- if (this.list != null) {
- this.list.setFont(var1);
- }
-
- this.downButton.setFont(var1);
- }
-
- public Font getFont() {
- if (this.currentFont == null && ((Component)this).getParent() != null) {
- this.currentFont = ((Component)this).getParent().getFont();
- }
-
- return this.currentFont;
- }
-
- public JDPComboBox(JDPUser var1) {
- this.initCombo(var1, "", 20);
- }
-
- public JDPComboBox(JDPUser var1, int var2) {
- this.initCombo(var1, "", var2);
- }
-
- public JDPComboBox(JDPUser var1, String var2, int var3) {
- this.initCombo(var1, var2, var3);
- }
-
- public void addItem(String var1) {
- this.thisChoice.addItem(var1);
- this.displayVector.addElement(var1);
- this.actualVector.addElement(var1);
- this.text.setText(this.thisChoice.getSelectedItem());
- }
-
- public void addItem(String var1, String var2) {
- this.thisChoice.addItem(var1);
- this.displayVector.addElement(var1);
- this.actualVector.addElement(var2);
- this.text.setText(this.thisChoice.getSelectedItem());
- }
-
- public void setMinimumWidth(int var1) {
- this.minimumWidth = var1;
- }
-
- public int getMinimumWidth() {
- return this.minimumWidth;
- }
-
- public int getSelectedIndex() {
- return this.thisChoice.getSelectedIndex();
- }
-
- public void setMaximumHeight(int var1) {
- this.maximumHeight = var1;
- }
-
- public void clear() {
- this.initChoice();
- this.displayVector = new Vector();
- this.actualVector = new Vector();
- this.layoutChoice();
- }
-
- public int getMaximumHeight() {
- return this.maximumHeight;
- }
-
- String getSelectedKey() {
- String var1 = "";
- if (this.thisChoice.getSelectedIndex() >= 0 && this.thisChoice.getSelectedIndex() < this.actualVector.size()) {
- var1 = (String)this.actualVector.elementAt(this.thisChoice.getSelectedIndex());
- }
-
- return var1;
- }
-
- String[] getSelectedKeyValue() {
- if (this.thisChoice.getSelectedIndex() >= 0 && this.thisChoice.getSelectedIndex() < this.actualVector.size()) {
- String[] var1 = new String[]{(String)this.actualVector.elementAt(this.thisChoice.getSelectedIndex())};
- return var1;
- } else {
- return null;
- }
- }
-
- public void setForeground(Color var1) {
- this.fgColor = var1;
- this.text.setForeground(var1);
- if (this.list != null) {
- this.list.setForeground(var1);
- }
-
- this.downButton.setForeground(var1);
- }
-
- public Color getForeground() {
- if (this.fgColor != null) {
- return this.fgColor;
- } else {
- Container var1 = ((Component)this).getParent();
- return var1 != null ? ((Component)var1).getForeground() : null;
- }
- }
-
- public void setEnabled(boolean var1) {
- if (var1) {
- this.text.enable();
- this.downButton.enable();
- } else {
- this.text.disable();
- this.downButton.disable();
- }
- }
-
- public boolean getEnabled() {
- return this.text.isEnabled();
- }
-
- public boolean handleEvent(Event var1) {
- switch (var1.id) {
- case 401:
- if (var1.key == 9) {
- if (var1.target.equals(this.downButton) || var1.target.equals(this.text)) {
- this.lastEventTime = (new Date()).getTime();
- Event var12 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers);
- ((Component)this).postEvent(var12);
- }
-
- if (var1.target.equals(this.list)) {
- if (this.usePopup) {
- if (this.popup.getEventListener().equals(this)) {
- this.popup.hide();
- }
- } else if (this.popupw.getEventListener().equals(this)) {
- this.popupw.hide();
- }
- }
- }
-
- return false;
- case 403:
- switch (var1.key) {
- case 1003:
- if (var1.when > 0L && var1.when - this.popupHiddenTime < 200L) {
- this.popupShowing = true;
- }
-
- this.displayPulldown();
- return true;
- case 1004:
- if (this.list != null && this.list.getSelectedIndex() - 1 >= 0) {
- this.list.select(this.list.getSelectedIndex() - 1);
- this.thisChoice.select(this.list.getSelectedItem());
- this.text.setText(this.thisChoice.getSelectedItem());
- return true;
- }
-
- this.displayPulldown();
- return true;
- case 1005:
- if (this.list != null && this.list.getSelectedIndex() + 1 < this.list.countItems()) {
- this.list.select(this.list.getSelectedIndex() + 1);
- this.thisChoice.select(this.list.getSelectedItem());
- this.text.setText(this.thisChoice.getSelectedItem());
- return true;
- }
-
- this.displayPulldown();
- return true;
- default:
- return false;
- }
- case 701:
- if (!var1.target.equals(this.list)) {
- return true;
- }
-
- this.text.setText(this.list.getSelectedItem());
- this.thisChoice.select(this.list.getSelectedItem());
- this.displayPulldown();
- Event var11 = new Event(this, var1.when, 1001, var1.x, var1.y, var1.key, var1.modifiers, this.list.getSelectedItem());
- ((Component)this).getParent().postEvent(var11);
- if (this.text.isEnabled() && this.text.isEditable()) {
- this.text.requestFocus();
- } else if (this.popupShowing) {
- this.list.requestFocus();
- } else {
- this.downButton.requestFocus();
- }
-
- this.lastEventTime = (new Date()).getTime();
- return true;
- case 1001:
- if (var1.target.equals(this.text)) {
- Event var10 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers, this.text.getText());
- super.postEvent(var10);
- return true;
- } else if (var1.target.equals(this.list)) {
- this.text.setText(this.list.getSelectedItem());
- this.thisChoice.select(this.list.getSelectedItem());
- this.displayPulldown();
- Event var9 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers, this.list.getSelectedItem());
- super.postEvent(var9);
- return true;
- } else if (var1.target.equals(this.downButton)) {
- long var8 = (new Date()).getTime();
- if (var8 - this.lastEventTime < 100L) {
- if (this.popupShowing) {
- this.list.requestFocus();
- } else {
- this.downButton.requestFocus();
- }
-
- this.lastEventTime = (new Date()).getTime();
- return false;
- }
-
- this.lastEventTime = (new Date()).getTime();
- this.displayPulldown();
- if (this.popupShowing) {
- this.list.requestFocus();
- } else {
- this.downButton.requestFocus();
- }
-
- return true;
- } else {
- if (var1.target instanceof Button) {
- return true;
- }
-
- return false;
- }
- case 1004:
- if (!var1.target.equals(this.downButton) && !var1.target.equals(this) && !var1.target.equals(this.list)) {
- long var6 = (new Date()).getTime();
- if (var6 - this.lastEventTime >= 100L && this.lastEventTime >= 0L) {
- if (!var1.target.equals(this.text) || this.text.isEnabled() && this.text.isEditable()) {
- if (!var1.target.equals(this.text) && !var1.target.equals(this.list)) {
- return true;
- }
-
- Event var16 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers, (Object)null);
- super.deliverEvent(var16);
- return true;
- }
-
- var6 = (new Date()).getTime();
- if (var6 - this.lastEventTime < 100L) {
- if (this.popupShowing) {
- this.list.requestFocus();
- } else {
- this.downButton.requestFocus();
- }
-
- this.lastEventTime = (new Date()).getTime();
- return false;
- }
-
- this.lastEventTime = (new Date()).getTime();
- if (this.text.getSelectionEnd() > 0) {
- this.displayPulldown();
- }
-
- if (this.popupShowing) {
- this.list.requestFocus();
- } else {
- this.downButton.requestFocus();
- }
-
- Event var15 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers, (Object)null);
- super.deliverEvent(var15);
- return false;
- }
-
- this.lastEventTime = (new Date()).getTime();
- if (!this.text.isEnabled() || !this.text.isEditable()) {
- if (this.popupShowing) {
- this.list.requestFocus();
- } else {
- this.downButton.requestFocus();
- }
- }
-
- return true;
- }
-
- if (var1.target.equals(this.list)) {
- this.lastEventTime = (new Date()).getTime();
- }
-
- return false;
- case 1005:
- long var2 = (new Date()).getTime();
- if (var2 - this.lastEventTime < 100L) {
- return true;
- } else if (var1.target.equals(this)) {
- return false;
- } else if (var1.target.equals(this.downButton)) {
- return true;
- } else {
- var2 = (new Date()).getTime();
- this.text.select(0, 0);
- if (var2 - this.lastEventTime < 200L) {
- return true;
- } else if (this.usePopup && var1.target.equals(this.list) && this.popupShowing) {
- this.lastEventTime = (new Date()).getTime();
- if (this.popup.getEventListener().equals(this)) {
- this.popup.hide();
- }
-
- this.popupShowing = false;
- this.popupHiddenTime = (new Date()).getTime();
- Event var14 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers, (Object)null);
- super.deliverEvent(var14);
- return true;
- } else if (!this.usePopup && var1.target.equals(this.list) && this.popupShowing) {
- this.lastEventTime = (new Date()).getTime();
- if (this.popupw.getEventListener().equals(this)) {
- this.popupw.hide();
- }
-
- this.popupShowing = false;
- this.popupHiddenTime = (new Date()).getTime();
- Event var13 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers, (Object)null);
- super.deliverEvent(var13);
- return true;
- } else {
- if (!var1.target.equals(this.list) && !var1.target.equals(this.text)) {
- return true;
- }
-
- Event var4 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers, (Object)null);
- super.deliverEvent(var4);
- return true;
- }
- }
- default:
- if (!var1.target.equals(this.text) && !var1.target.equals(this.list)) {
- return false;
- } else {
- Event var17 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers, (Object)null);
- super.deliverEvent(var17);
- return false;
- }
- }
- }
-
- public void setText(String var1) {
- if (var1 != null) {
- this.text.setText(var1);
- this.thisChoice.select(var1);
- } else {
- this.text.setText("");
- this.thisChoice.select(0);
- }
- }
-
- public String getText() {
- return this.text.getText();
- }
- }
-