コード例 #1
0
 @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() + "%"));
   }
 }
コード例 #2
0
 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));
 }
コード例 #3
0
 public void searchByField(String string) {
   searchingModel.setElements(modelBreeds.searchAllBreedsByName("%" + string + "%"));
 }
コード例 #4
0
 public void searchByField(String string) {
   modelSearching.setElements(mdlEmployees.searchAllEmployeeByName("%" + string + "%"));
 }
コード例 #5
0
 @Override
 public void windowGainedFocus(WindowEvent e) {
   modelSearching.setElements(
       mdlCustomers.searchAllCustomerByName(
           "%" + home.getSearching().getTxtSearch().getText().toLowerCase() + "%"));
 }