home *** CD-ROM | disk | FTP | other *** search
- import java.awt.BorderLayout;
- 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.Panel;
-
- public class JDPChoice extends Panel {
- JDPComboBox thisChoice;
- Font currentFont;
- Color fgColor;
- Color bgColor;
-
- public String getSelectedItem() {
- return this.thisChoice.getSelectedItem();
- }
-
- public int countItems() {
- return this.thisChoice.getItemCount();
- }
-
- public void sortItems() {
- if (this.thisChoice != null) {
- this.thisChoice.sortItems();
- }
-
- }
-
- public void select(int var1) {
- this.thisChoice.select(var1);
- }
-
- public void select(String var1) {
- this.thisChoice.select(var1);
- }
-
- public int getItemCount() {
- return this.thisChoice.getItemCount();
- }
-
- public void enable() {
- this.thisChoice.enable();
- }
-
- public void disable() {
- this.thisChoice.disable();
- }
-
- public void setMinimumHeight(int var1) {
- this.thisChoice.setMinimumHeight(var1);
- }
-
- public void selectKey(String var1) {
- this.thisChoice.selectKey(var1);
- }
-
- public String getItemForKey(String var1) {
- return this.thisChoice.getItemForKey(var1);
- }
-
- public Dimension preferredSize() {
- return this.thisChoice.preferredSize();
- }
-
- public int getMinimumHeight() {
- return this.thisChoice.getMinimumHeight();
- }
-
- public void setMaximumWidth(int var1) {
- this.thisChoice.setMaximumWidth(var1);
- }
-
- public int getMaximumWidth() {
- return this.thisChoice.getMaximumWidth();
- }
-
- public void remove(int var1) {
- this.thisChoice.remove(var1);
- }
-
- public void remove(String var1) {
- this.thisChoice.remove(var1);
- }
-
- public JDPChoice() {
- ((Container)this).setLayout(new BorderLayout());
- this.thisChoice = new JDPComboBox((JDPUser)null, "", 10);
- this.thisChoice.setEditable(false);
- ((Container)this).add("North", this.thisChoice);
- }
-
- public JDPChoice(JDPUser var1) {
- ((Container)this).setLayout(new BorderLayout());
- this.thisChoice = new JDPComboBox(var1, "", 10);
- this.thisChoice.setEditable(false);
- ((Container)this).add("North", this.thisChoice);
- }
-
- public void loadChoice(JDPUser var1, JDPJagg var2, String var3, String var4, String var5, String var6) {
- this.thisChoice.loadChoice(var1, var2, var3, var4, var5, var6);
- this.select(0);
- }
-
- public void loadChoice(String[] var1, String[] var2) {
- this.thisChoice.loadChoice(var1, var2);
- this.select(0);
- }
-
- public void layoutChoice() {
- if (((Component)this).getParent() != null) {
- ((Component)this).getParent().layout();
- ((Component)this).getParent().paintAll(((Component)this).getParent().getGraphics());
- } else {
- ((Container)this).layout();
- ((Component)this).paintAll(((Component)this).getGraphics());
- }
- }
-
- public void setBackground(Color var1) {
- this.bgColor = var1;
- this.thisChoice.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 this.thisChoice.getItem(var1);
- }
-
- public int getItem(String var1) {
- return this.thisChoice.getItem(var1);
- }
-
- public Dimension minimumSize() {
- return this.thisChoice.minimumSize();
- }
-
- public String getItemKey(String var1) {
- return this.thisChoice.getItemKey(var1);
- }
-
- public void setFont(Font var1) {
- this.currentFont = var1;
- this.thisChoice.setFont(var1);
- }
-
- public Font getFont() {
- if (this.currentFont != null) {
- return this.currentFont;
- } else {
- Container var1 = ((Component)this).getParent();
- return var1 != null ? ((Component)var1).getFont() : null;
- }
- }
-
- public void addItem(String var1) {
- this.thisChoice.addItem(var1);
- if (this.getItemCount() == 1) {
- this.select(0);
- }
-
- }
-
- public void addItem(String var1, String var2) {
- this.thisChoice.addItem(var1, var2);
- if (this.getItemCount() == 1) {
- this.select(0);
- }
-
- }
-
- public void setMinimumWidth(int var1) {
- this.thisChoice.setMinimumWidth(var1);
- }
-
- public int getMinimumWidth() {
- return this.thisChoice.getMinimumWidth();
- }
-
- public int getSelectedIndex() {
- return this.thisChoice.getSelectedIndex();
- }
-
- public void setMaximumHeight(int var1) {
- this.thisChoice.setMaximumHeight(var1);
- }
-
- public void clear() {
- this.thisChoice.clear();
- this.thisChoice.setText("");
- }
-
- public int getMaximumHeight() {
- return this.thisChoice.getMaximumHeight();
- }
-
- public String getSelectedKey() {
- return this.thisChoice.getSelectedKey();
- }
-
- public void setEnabled(boolean var1) {
- this.thisChoice.setEnabled(var1);
- }
-
- public boolean getEnabled() {
- return this.thisChoice.getEnabled();
- }
-
- public String[] getSelectedKeyValue() {
- return this.thisChoice.getSelectedKeyValue();
- }
-
- public void setForeground(Color var1) {
- this.fgColor = var1;
- this.thisChoice.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 boolean handleEvent(Event var1) {
- if (var1.target.equals(this.thisChoice)) {
- Event var2 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers);
- ((Component)this).postEvent(var2);
- return true;
- } else {
- return !var1.target.equals(this);
- }
- }
- }
-