home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Java / JDesignerPro / Jdp3_0.exe / data1.cab / Program_Files / JDPWhereClause.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-09  |  10.6 KB  |  628 lines

  1. import java.awt.BorderLayout;
  2. import java.awt.Button;
  3. import java.awt.Color;
  4. import java.awt.Component;
  5. import java.awt.Container;
  6. import java.awt.Event;
  7. import java.awt.Font;
  8. import java.awt.GridLayout;
  9. import java.awt.List;
  10. import java.awt.Panel;
  11. import java.awt.Rectangle;
  12. import java.awt.TextField;
  13. import java.util.Vector;
  14.  
  15. public class JDPWhereClause extends Panel {
  16.    JDPUser user;
  17.    JDPComboBox chooseFrom;
  18.    JDPComboBox matchUsing;
  19.    JDPComboBox matchTo;
  20.    TextField matchConstant;
  21.    List whereClauses;
  22.    String whereClauseName;
  23.    String fromWhereClause;
  24.    boolean smallConfig;
  25.    String[] pchooseFrom;
  26.    String[][] pmatchUsing;
  27.    String[][] pmatchTo;
  28.    String[] pactualchooseFrom;
  29.    String[][] pactualmatchUsing;
  30.    String[][] pactualmatchTo;
  31.    int[] dataType;
  32.    String dsnType = "";
  33.    int currentChooseFrom;
  34.    int[] constantLength;
  35.    boolean[] constantIsString;
  36.    Vector vmatchUsing;
  37.    Vector vactualmatchUsing;
  38.    String whereClause;
  39.    // $FF: renamed from: p1 java.awt.Panel
  40.    Panel field_0;
  41.    // $FF: renamed from: p2 java.awt.Panel
  42.    Panel field_1;
  43.    // $FF: renamed from: p3 java.awt.Panel
  44.    Panel field_2;
  45.    // $FF: renamed from: p4 java.awt.Panel
  46.    Panel field_3;
  47.    Panel mainPanel;
  48.    Panel topPanel;
  49.    JDPPopupMessage popuppanel;
  50.    Panel targetPanel;
  51.    // $FF: renamed from: b1 JDPButton
  52.    JDPButton field_4;
  53.    // $FF: renamed from: b2 JDPButton
  54.    JDPButton field_5;
  55.    // $FF: renamed from: b3 JDPButton
  56.    JDPButton field_6;
  57.    int numpanels = 1;
  58.    boolean upperCaseEntry;
  59.    Font currentFont;
  60.  
  61.    public void setDataType(int var1, int var2) {
  62.       this.dataType[var1] = var2;
  63.    }
  64.  
  65.    public void setHorizontalLayout(boolean var1) {
  66.       this.smallConfig = !var1;
  67.       this.layoutPanel();
  68.       ((Container)this).layout();
  69.       ((Component)this).paintAll(((Component)this).getGraphics());
  70.    }
  71.  
  72.    public boolean getHorizontalLayout() {
  73.       return !this.smallConfig;
  74.    }
  75.  
  76.    String getQuote(int var1) {
  77.       return JDPUtils.getFieldQuote(var1, this.dsnType);
  78.    }
  79.  
  80.    public void setMatchConstant(String var1) {
  81.       this.matchConstant.setText(var1);
  82.    }
  83.  
  84.    public String getMatchConstant() {
  85.       return this.matchConstant.getText();
  86.    }
  87.  
  88.    public void setBackground(Color var1) {
  89.       if (this.chooseFrom != null) {
  90.          this.chooseFrom.setBackground(var1);
  91.       }
  92.  
  93.       if (this.matchUsing != null) {
  94.          this.matchUsing.setBackground(var1);
  95.       }
  96.  
  97.       if (this.matchTo != null) {
  98.          this.matchTo.setBackground(var1);
  99.       }
  100.  
  101.       if (this.matchConstant != null) {
  102.          this.matchConstant.setBackground(var1);
  103.       }
  104.  
  105.       if (this.field_4 != null) {
  106.          this.field_4.setBackground(var1);
  107.       }
  108.  
  109.       if (this.field_5 != null) {
  110.          this.field_5.setBackground(var1);
  111.       }
  112.  
  113.       if (this.field_6 != null) {
  114.          this.field_6.setBackground(var1);
  115.       }
  116.  
  117.    }
  118.  
  119.    void reloadMatchChoices() {
  120.       this.currentChooseFrom = this.chooseFrom.getSelectedIndex();
  121.       if (this.field_1 != null) {
  122.          this.matchUsing.clear();
  123.          if (this.pmatchUsing != null && this.pmatchUsing[this.currentChooseFrom][0] != null) {
  124.             for(int var1 = 0; var1 < this.pmatchUsing[this.currentChooseFrom].length; ++var1) {
  125.                if (this.pmatchUsing[this.currentChooseFrom][var1] != null) {
  126.                   this.matchUsing.addItem(this.pmatchUsing[this.currentChooseFrom][var1]);
  127.                   this.matchUsing.select(0);
  128.                }
  129.             }
  130.          }
  131.  
  132.          if (this.vmatchUsing != null && this.vmatchUsing.elementAt(this.currentChooseFrom) != null) {
  133.             Vector var3 = (Vector)this.vmatchUsing.elementAt(this.currentChooseFrom);
  134.  
  135.             for(int var2 = 0; var2 < var3.size(); ++var2) {
  136.                if (var3.elementAt(var2) != null) {
  137.                   this.matchUsing.addItem((String)var3.elementAt(var2));
  138.                   this.matchUsing.select(0);
  139.                }
  140.             }
  141.          }
  142.       }
  143.  
  144.       if (this.field_2 != null) {
  145.          this.matchTo.clear();
  146.          if (this.pmatchTo[this.currentChooseFrom][0] != null) {
  147.             for(int var4 = 0; var4 < this.pmatchTo[this.currentChooseFrom].length; ++var4) {
  148.                if (this.pmatchTo[this.currentChooseFrom][var4] != null) {
  149.                   this.matchTo.addItem(this.pmatchTo[this.currentChooseFrom][var4]);
  150.                   this.matchTo.select(0);
  151.                }
  152.             }
  153.          }
  154.       }
  155.  
  156.       if (this.field_3 != null) {
  157.          if (this.constantLength[this.currentChooseFrom] > 0) {
  158.             this.field_3.show();
  159.          } else {
  160.             this.field_3.hide();
  161.          }
  162.       }
  163.  
  164.       if (this.topPanel != null) {
  165.          this.topPanel.layout();
  166.          this.topPanel.paintAll(this.topPanel.getGraphics());
  167.       }
  168.  
  169.       if (this.mainPanel != null) {
  170.          this.mainPanel.layout();
  171.          this.mainPanel.paintAll(this.mainPanel.getGraphics());
  172.       }
  173.  
  174.       if (this.targetPanel != null) {
  175.          this.targetPanel.layout();
  176.          this.targetPanel.paintAll(this.targetPanel.getGraphics());
  177.       }
  178.  
  179.       ((Container)this).layout();
  180.       ((Component)this).paintAll(((Component)this).getGraphics());
  181.       this.matchUsing.layoutChoice();
  182.    }
  183.  
  184.    public JDPWhereClause(JDPUser var1, Panel var2, String var3, boolean var4, String var5, String[] var6, String[] var7, Vector var8, Vector var9, String[][] var10, String[][] var11, int[] var12, boolean[] var13, String var14) {
  185.       this.showWhereClause(var1, var2, var3, var4, var5, var6, var7, (String[][])null, (String[][])null, var10, var11, var12, var13, var8, var9, var14);
  186.    }
  187.  
  188.    public JDPWhereClause(JDPUser var1, Panel var2, String var3, boolean var4, String var5, String[] var6, String[] var7, Vector var8, Vector var9, String[][] var10, String[][] var11, int[] var12, boolean[] var13) {
  189.       this.showWhereClause(var1, var2, var3, var4, var5, var6, var7, (String[][])null, (String[][])null, var10, var11, var12, var13, var8, var9, (String)null);
  190.    }
  191.  
  192.    public JDPWhereClause(JDPUser var1, Panel var2, String var3, boolean var4, String var5, String[] var6, String[] var7, String[][] var8, String[][] var9, String[][] var10, String[][] var11, int[] var12, boolean[] var13) {
  193.       this.showWhereClause(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, (Vector)null, (Vector)null, (String)null);
  194.    }
  195.  
  196.    public JDPWhereClause(JDPUser var1, String var2, boolean var3, String var4, String[] var5, String[] var6, String[][] var7, String[][] var8, String[][] var9, String[][] var10, int[] var11, boolean[] var12) {
  197.       this.showWhereClause(var1, (Panel)null, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, (Vector)null, (Vector)null, (String)null);
  198.    }
  199.  
  200.    public JDPWhereClause(JDPUser var1) {
  201.       this.currentFont = var1.plainFont;
  202.    }
  203.  
  204.    void showWhereClause(JDPUser var1, Panel var2, String var3, boolean var4, String var5, String[] var6, String[] var7, String[][] var8, String[][] var9, String[][] var10, String[][] var11, int[] var12, boolean[] var13, Vector var14, Vector var15, String var16) {
  205.       this.user = var1;
  206.       this.targetPanel = var2;
  207.       this.whereClauseName = var3;
  208.       this.smallConfig = var4;
  209.       this.pchooseFrom = var6;
  210.       this.pmatchUsing = var8;
  211.       this.pmatchTo = var10;
  212.       this.pactualchooseFrom = var7;
  213.       this.pactualmatchUsing = var9;
  214.       this.pactualmatchTo = var11;
  215.       this.constantLength = var12;
  216.       this.constantIsString = var13;
  217.       this.vmatchUsing = var14;
  218.       this.vactualmatchUsing = var15;
  219.       this.fromWhereClause = var16;
  220.       ((Container)this).setLayout(new BorderLayout());
  221.       this.currentFont = var1.plainFont;
  222.       this.dataType = new int[var7.length];
  223.       this.field_1 = null;
  224.       this.field_2 = null;
  225.       this.field_3 = null;
  226.       this.popuppanel = new JDPPopupMessage(var1, var2);
  227.       this.chooseFrom = new JDPComboBox(var1, "", 20);
  228.       this.chooseFrom.setEditable(false);
  229.  
  230.       for(int var17 = 0; var17 < var6.length; ++var17) {
  231.          this.chooseFrom.addItem(var6[var17]);
  232.          this.chooseFrom.select(var5);
  233.       }
  234.  
  235.       this.currentChooseFrom = this.chooseFrom.getSelectedIndex();
  236.       this.field_0 = new Panel();
  237.       this.field_0.setLayout(new BorderLayout());
  238.       this.field_0.add("Center", this.chooseFrom);
  239.       this.popuppanel.addComponent(this.chooseFrom, "Search by", "Search for entries with a set value");
  240.       if (var8 != null && var8[this.currentChooseFrom][0] != null) {
  241.          this.matchUsing = new JDPComboBox(var1, "", 20);
  242.          this.matchUsing.setEditable(false);
  243.  
  244.          for(int var19 = 0; var19 < var8[this.currentChooseFrom].length; ++var19) {
  245.             if (var8[this.currentChooseFrom][var19] != null) {
  246.                this.matchUsing.addItem(var8[this.currentChooseFrom][var19]);
  247.             }
  248.  
  249.             this.matchUsing.select(0);
  250.          }
  251.  
  252.          this.field_1 = new Panel();
  253.          this.field_1.setLayout(new BorderLayout());
  254.          this.field_1.add("Center", this.matchUsing);
  255.          ++this.numpanels;
  256.          this.popuppanel.addComponent(this.matchUsing, "Match using", "Find entries with this criteria");
  257.       }
  258.  
  259.       if (var14 != null && var14.elementAt(this.currentChooseFrom) != null) {
  260.          this.matchUsing = new JDPComboBox(var1, "", 20);
  261.          this.matchUsing.setEditable(false);
  262.          Vector var20 = (Vector)var14.elementAt(this.currentChooseFrom);
  263.  
  264.          for(int var18 = 0; var18 < var20.size(); ++var18) {
  265.             if (var20.elementAt(var18) != null) {
  266.                this.matchUsing.addItem((String)var20.elementAt(var18));
  267.                this.matchUsing.select(0);
  268.             }
  269.          }
  270.  
  271.          this.field_1 = new Panel();
  272.          this.field_1.setLayout(new BorderLayout());
  273.          this.field_1.add("Center", this.matchUsing);
  274.          ++this.numpanels;
  275.          this.popuppanel.addComponent(this.matchUsing, "Match using", "Find entries with this criteria");
  276.       }
  277.  
  278.       if (var10 != null && var10[this.currentChooseFrom][0] != null) {
  279.          this.matchTo = new JDPComboBox(var1, "", 20);
  280.          this.matchTo.setEditable(false);
  281.  
  282.          for(int var21 = 0; var21 < var10[this.currentChooseFrom].length; ++var21) {
  283.             if (var10[this.currentChooseFrom][var21] != null) {
  284.                this.matchTo.addItem(var10[this.currentChooseFrom][var21]);
  285.                this.matchTo.select(0);
  286.             }
  287.          }
  288.  
  289.          this.field_2 = new Panel();
  290.          this.field_2.setLayout(new BorderLayout());
  291.          this.field_2.add("Center", this.matchTo);
  292.          ++this.numpanels;
  293.       }
  294.  
  295.       this.matchConstant = new TextField("", 20);
  296.       this.field_3 = new Panel();
  297.       this.field_3.setLayout(new BorderLayout());
  298.       this.field_3.add("Center", this.matchConstant);
  299.       ++this.numpanels;
  300.       this.popuppanel.addComponent(this.matchConstant, "Enter a value", "Entries with this value will be selected");
  301.       this.field_4 = new JDPButton(4, "Search", 0);
  302.       this.field_5 = new JDPButton("And", 4, 0);
  303.       this.field_6 = new JDPButton("Or", 4, 0);
  304.       ((Container)this).setLayout(new BorderLayout());
  305.       this.layoutPanel();
  306.       this.popuppanel.addComponent(this.field_4, "Search", "Search for entries matching this criteria");
  307.       this.popuppanel.addComponent(this.field_5, "And", "Continue the search for entries that also match this criteria");
  308.       this.popuppanel.addComponent(this.field_6, "Or", "Continue the search for entries that match prior search OR this search");
  309.       if (var2 != null) {
  310.          ((Container)var2).add(this.popuppanel);
  311.       }
  312.  
  313.       this.buildWhereClause();
  314.       if (var12[this.currentChooseFrom] == 0) {
  315.          this.field_3.hide();
  316.       }
  317.  
  318.       ((Component)this).paintAll(((Component)this).getGraphics());
  319.    }
  320.  
  321.    public void buildWhereClause() {
  322.       if (this.upperCaseEntry) {
  323.          this.matchConstant.setText(this.matchConstant.getText().toUpperCase());
  324.       }
  325.  
  326.       this.currentChooseFrom = this.chooseFrom.getSelectedIndex();
  327.       this.whereClause = this.pactualchooseFrom[this.currentChooseFrom];
  328.       if (this.matchUsing != null) {
  329.          if (this.pactualmatchUsing != null) {
  330.             this.whereClause = this.whereClause + " " + this.pactualmatchUsing[this.currentChooseFrom][this.matchUsing.getSelectedIndex()];
  331.          } else if (this.vactualmatchUsing != null && this.vactualmatchUsing.size() > 0 && this.currentChooseFrom >= 0 && this.matchUsing.getSelectedIndex() >= 0) {
  332.             this.whereClause = this.whereClause + " " + (String)((Vector)this.vactualmatchUsing.elementAt(this.currentChooseFrom)).elementAt(this.matchUsing.getSelectedIndex());
  333.          }
  334.       }
  335.  
  336.       if (this.matchTo != null) {
  337.          this.whereClause = this.whereClause + " " + this.pactualmatchTo[this.currentChooseFrom][this.matchTo.getSelectedIndex()];
  338.       }
  339.  
  340.       if (this.constantLength[this.currentChooseFrom] > 0) {
  341.          String var1 = this.user.u.replace(this.matchConstant.getText(), "'", "''");
  342.          if (this.constantIsString[this.chooseFrom.getSelectedIndex()]) {
  343.             String var2 = "";
  344.             if (this.pmatchUsing != null) {
  345.                var2 = this.pmatchUsing[this.currentChooseFrom][this.matchUsing.getSelectedIndex()];
  346.             }
  347.  
  348.             if (this.vmatchUsing != null && this.currentChooseFrom >= 0 && this.matchUsing.getSelectedIndex() >= 0) {
  349.                var2 = (String)((Vector)this.vmatchUsing.elementAt(this.currentChooseFrom)).elementAt(this.matchUsing.getSelectedIndex());
  350.             }
  351.  
  352.             var1 = this.cvtConstant(var1, this.dataType[this.currentChooseFrom]);
  353.             if (var2.indexOf("ontains") > 0) {
  354.                this.whereClause = this.whereClause + " '%" + var1 + "%'";
  355.             } else if (var2.indexOf("egins") > 0) {
  356.                this.whereClause = this.whereClause + " '" + var1 + "%'";
  357.             } else {
  358.                String var3 = this.getQuote(this.dataType[this.currentChooseFrom]);
  359.                this.whereClause = this.whereClause + " " + var3 + var1 + var3;
  360.             }
  361.          } else if (this.matchConstant.getText().length() == 0) {
  362.             this.whereClause = this.whereClause + " 0";
  363.          } else {
  364.             this.whereClause = this.whereClause + " " + var1;
  365.          }
  366.       }
  367.  
  368.       if (this.user.DEBUG) {
  369.          System.out.println("JDPWhereClause/buildWhereClause whereClause: " + this.whereClause);
  370.       }
  371.  
  372.    }
  373.  
  374.    String cvtConstant(String var1, int var2) {
  375.       return JDPUtils.isOdbcDate(var2) ? JDPDate.format(var1) : var1;
  376.    }
  377.  
  378.    void layoutPanel() {
  379.       ((Container)this).removeAll();
  380.       if (this.smallConfig) {
  381.          this.topPanel = new Panel();
  382.          this.topPanel.setLayout(new GridLayout(this.numpanels + 1, 1));
  383.          this.topPanel.add(this.field_0);
  384.          if (this.field_1 != null) {
  385.             this.topPanel.add(this.field_1);
  386.          }
  387.  
  388.          if (this.field_2 != null) {
  389.             this.topPanel.add(this.field_2);
  390.          }
  391.  
  392.          if (this.field_3 != null) {
  393.             this.topPanel.add(this.field_3);
  394.          }
  395.  
  396.          Panel var2 = new Panel();
  397.          ((Container)var2).setLayout(new GridLayout(1, 3));
  398.          if (this.field_4 != null) {
  399.             ((Container)var2).add(this.field_4);
  400.          }
  401.  
  402.          if (this.field_5 != null) {
  403.             ((Container)var2).add(this.field_5);
  404.          }
  405.  
  406.          if (this.field_6 != null) {
  407.             ((Container)var2).add(this.field_6);
  408.          }
  409.  
  410.          this.topPanel.add(var2);
  411.          ((Container)this).add("North", this.topPanel);
  412.       } else {
  413.          this.mainPanel = new Panel();
  414.          this.mainPanel.setLayout(new JDPLineLayout(1));
  415.          if (this.field_0 != null) {
  416.             this.mainPanel.add("Left", this.field_0);
  417.          }
  418.  
  419.          if (this.field_1 != null) {
  420.             this.mainPanel.add("Left", this.field_1);
  421.          }
  422.  
  423.          if (this.field_3 != null) {
  424.             this.mainPanel.add("Left", this.field_3);
  425.          }
  426.  
  427.          Panel var1 = new Panel();
  428.          ((Container)var1).setLayout(new GridLayout(1, 3));
  429.          if (this.field_4 != null) {
  430.             ((Container)var1).add(this.field_4);
  431.          }
  432.  
  433.          if (this.field_5 != null) {
  434.             ((Container)var1).add(this.field_5);
  435.          }
  436.  
  437.          if (this.field_6 != null) {
  438.             ((Container)var1).add(this.field_6);
  439.          }
  440.  
  441.          this.mainPanel.add("Left", var1);
  442.          ((Container)this).add("North", this.mainPanel);
  443.       }
  444.    }
  445.  
  446.    public void setChooseFrom(String var1) {
  447.       this.chooseFrom.select(var1);
  448.       this.reloadMatchChoices();
  449.    }
  450.  
  451.    public String getChooseFrom() {
  452.       return this.chooseFrom.getSelectedItem();
  453.    }
  454.  
  455.    public String getFromWhereClause() {
  456.       return this.fromWhereClause + " AND " + this.whereClause;
  457.    }
  458.  
  459.    public void setFont(Font var1) {
  460.       if (this.chooseFrom != null) {
  461.          this.chooseFrom.setFont(var1);
  462.       }
  463.  
  464.       if (this.matchUsing != null) {
  465.          this.matchUsing.setFont(var1);
  466.       }
  467.  
  468.       if (this.matchTo != null) {
  469.          this.matchTo.setFont(var1);
  470.       }
  471.  
  472.       if (this.matchConstant != null) {
  473.          this.matchConstant.setFont(var1);
  474.       }
  475.  
  476.       if (this.field_4 != null) {
  477.          this.field_4.setFont(var1);
  478.       }
  479.  
  480.       if (this.field_5 != null) {
  481.          this.field_5.setFont(var1);
  482.       }
  483.  
  484.       if (this.field_6 != null) {
  485.          this.field_6.setFont(var1);
  486.       }
  487.  
  488.       this.currentFont = var1;
  489.    }
  490.  
  491.    public Font getFont() {
  492.       return this.currentFont;
  493.    }
  494.  
  495.    public boolean handleEvent(Event var1) {
  496.       switch (var1.id) {
  497.          case 503:
  498.          case 504:
  499.          case 505:
  500.             if (this.targetPanel == null && ((Component)this).getParent() instanceof Panel) {
  501.                for(this.targetPanel = (Panel)((Component)this).getParent(); !(this.targetPanel instanceof JDPPanelLoader) && this.targetPanel.getParent() instanceof Panel; this.targetPanel = (Panel)this.targetPanel.getParent()) {
  502.                }
  503.  
  504.                if (this.popuppanel != null && this.targetPanel != null) {
  505.                   this.popuppanel.setTarget(this.targetPanel);
  506.                   if (this.targetPanel != null) {
  507.                      this.targetPanel.add(this.popuppanel);
  508.                   }
  509.                }
  510.             }
  511.  
  512.             Object var5 = this;
  513.             if (this != null) {
  514.                Rectangle var8 = ((Component)this).bounds();
  515.  
  516.                while(var5 != null && !var5.equals(this.targetPanel)) {
  517.                   var1.x += var8.x;
  518.                   var1.y += var8.y;
  519.                   var5 = ((Component)var5).getParent();
  520.                   if (var5 != null) {
  521.                      var8 = ((Component)var5).bounds();
  522.                   }
  523.                }
  524.             }
  525.  
  526.             if (this.popuppanel != null) {
  527.                this.popuppanel.postEvent(var1);
  528.             }
  529.  
  530.             return false;
  531.          case 1001:
  532.             if (var1.target instanceof JDPComboBox) {
  533.                if (var1.target.equals(this.chooseFrom)) {
  534.                   this.reloadMatchChoices();
  535.                }
  536.  
  537.                return false;
  538.             }
  539.  
  540.             if (var1.target instanceof Button) {
  541.                String var2 = (String)var1.arg;
  542.                if (var2.trim().compareTo("Search") == 0) {
  543.                   this.buildWhereClause();
  544.                }
  545.  
  546.                if (var2.trim().compareTo("And") == 0) {
  547.                   String var3 = this.whereClause;
  548.                   this.buildWhereClause();
  549.                   this.whereClause = this.whereClause + " AND " + var3;
  550.                   var1.arg = "Search";
  551.                }
  552.  
  553.                if (var2.trim().compareTo("Or") == 0) {
  554.                   String var6 = this.whereClause;
  555.                   this.buildWhereClause();
  556.                   this.whereClause = "(" + this.whereClause + " OR " + var6 + ")";
  557.                   var1.arg = "Search";
  558.                }
  559.  
  560.                Event var7 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers);
  561.                super.postEvent(var7);
  562.             }
  563.  
  564.             if (var1.target instanceof TextField) {
  565.                this.buildWhereClause();
  566.                var1.arg = "Search";
  567.                Event var4 = new Event(this, var1.when, var1.id, var1.x, var1.y, var1.key, var1.modifiers);
  568.                super.postEvent(var4);
  569.             }
  570.  
  571.             return false;
  572.          default:
  573.             return false;
  574.       }
  575.    }
  576.  
  577.    public void setForeground(Color var1) {
  578.       if (this.chooseFrom != null) {
  579.          this.chooseFrom.setForeground(var1);
  580.       }
  581.  
  582.       if (this.matchUsing != null) {
  583.          this.matchUsing.setForeground(var1);
  584.       }
  585.  
  586.       if (this.matchTo != null) {
  587.          this.matchTo.setForeground(var1);
  588.       }
  589.  
  590.       if (this.matchConstant != null) {
  591.          this.matchConstant.setForeground(var1);
  592.       }
  593.  
  594.       if (this.field_4 != null) {
  595.          this.field_4.setForeground(var1);
  596.       }
  597.  
  598.       if (this.field_5 != null) {
  599.          this.field_5.setForeground(var1);
  600.       }
  601.  
  602.       if (this.field_6 != null) {
  603.          this.field_6.setForeground(var1);
  604.       }
  605.  
  606.    }
  607.  
  608.    public void setMatchUsing(String var1) {
  609.       this.matchUsing.select(var1);
  610.    }
  611.  
  612.    public String getMatchUsing() {
  613.       return this.matchUsing.getSelectedItem();
  614.    }
  615.  
  616.    public void setUpperCaseEntry(boolean var1) {
  617.       this.upperCaseEntry = var1;
  618.    }
  619.  
  620.    public boolean getUpperCaseEntry() {
  621.       return this.upperCaseEntry;
  622.    }
  623.  
  624.    public void setDSNType(String var1) {
  625.       this.dsnType = var1;
  626.    }
  627. }
  628.