IPatch myPatch = myModel.getPatchAt(table.getSelectedRow()); IBankDriver myDriver = (IBankDriver) myPatch.getDriver(); for (int i = 0; i < myDriver.getNumPatches(); i++) if (myDriver.getPatch(myPatch, i) != null) myModel.addPatch(myDriver.getPatch(myPatch, i));
IBankPatch myPatch = (IBankPatch) myModel.getPatchAt(table.getSelectedRow()); for (int i = 0; i < myPatch.getNumPatches(); i++){ ISinglePatch p = myPatch.get(i); if (p != null) myModel.addPatch(p); }
    void extractSelectedPatch() {        if (table.getSelectedRowCount() == 0) {            ErrorMsg.reportError("Error", "No Patch Selected.");            return;        }        IPatch myPatch = myModel.getPatchAt(table.getSelectedRow());        IBankDriver myDriver = (IBankDriver) myPatch.getDriver();        for (int i = 0; i < myDriver.getNumPatches(); i++)            if (myDriver.getPatch(myPatch, i) != null)                myModel.addPatch(myDriver.getPatch(myPatch, i));        myModel.fireTableDataChanged();        changed = true;        //statusBar.setText(myModel.getRowCount() + " Patches");    }