@Override public void keyReleased(KeyEvent e) { javax.swing.JTextField txtSearch = home.getSearching().getTxtSearch(); if (e.getSource().equals(txtSearch)) { modelSearching.setElements( mdlCustomers.searchAllCustomerByName("%" + txtSearch.getText().toLowerCase() + "%")); } }
public ControllerHome(HomeFrame home) { this.home = home; modelSearching = new SearchingModel<Customers>( new String[] {"ID", "NOMBRE", "APELLIDOS", "CIUDAD"}, new SearchingCtrlCustomers()); mdlCustomers = new ModelCustomers(); modelSearching.setElements(mdlCustomers.searchAllCustomerByName("%%")); home.setSearching(new JSearching(modelSearching)); }
public void searchByField(String string) { searchingModel.setElements(modelBreeds.searchAllBreedsByName("%" + string + "%")); }
public void searchByField(String string) { modelSearching.setElements(mdlEmployees.searchAllEmployeeByName("%" + string + "%")); }
@Override public void windowGainedFocus(WindowEvent e) { modelSearching.setElements( mdlCustomers.searchAllCustomerByName( "%" + home.getSearching().getTxtSearch().getText().toLowerCase() + "%")); }