s1=PatchEdit.getDriver (((Patch)a1).deviceNum,((Patch)a1).driverNum).getPatchName ((Patch)a1).toLowerCase (); s2=PatchEdit.getDriver (((Patch)a2).deviceNum,((Patch)a2).driverNum).getPatchName ((Patch)a2).toLowerCase ();
s1=((Patch) a1).getDriver().getPatchName((Patch) a1).toLowerCase(); s2=((Patch) a2).getDriver().getPatchName((Patch) a2).toLowerCase();
        public int compare (Object a1,Object a2)        {            String s1; String s2;            if (field==0)            {                s1=PatchEdit.getDriver (((Patch)a1).deviceNum,((Patch)a1).driverNum).getPatchName ((Patch)a1).toLowerCase ();                s2=PatchEdit.getDriver (((Patch)a2).deviceNum,((Patch)a2).driverNum).getPatchName ((Patch)a2).toLowerCase ();                //((Driver)(PatchEdit.DriverList.get(((Patch)a1).driverNum))).getPatchName((Patch)a1).toLowerCase();                // s2=((Driver)(PatchEdit.DriverList.get(((Patch)a2).driverNum))).getPatchName((Patch)a2).toLowerCase();            }            else if (field==1)            {                s1=((Patch)a1).date.toString ().toLowerCase ();                s2=((Patch)a2).date.toString ().toLowerCase ();            }            else if (field==2)            {                s1=((Patch)a1).author.toString ().toLowerCase ();                s2=((Patch)a2).author.toString ().toLowerCase ();            }            else if (field==3)            {                   s1=((Device)(PatchEdit.appConfig.getDevice(((Patch)a1).deviceNum))).getSynthName();                   s2=((Device)(PatchEdit.appConfig.getDevice(((Patch)a2).deviceNum))).getSynthName();//                ((Driver)(PatchEdit.DriverList.get (((Patch)a1).driverNum))).getSynthName ();//                s2=((Driver)(PatchEdit.DriverList.get (((Patch)a2).driverNum))).getSynthName ();            }            else            {                s1=PatchEdit.getDriver (((Patch)a1).deviceNum,((Patch)a1).driverNum).getPatchType ();                s2=PatchEdit.getDriver (((Patch)a2).deviceNum,((Patch)a2).driverNum).getPatchType ();            }                                    return s1.compareTo (s2);        }