Skip to content

Commit

Permalink
Applying suggestion to change
Browse files Browse the repository at this point in the history
  • Loading branch information
JantBogard committed Nov 25, 2024
1 parent 65d64e8 commit 2febb59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ private boolean existInInventorySearchList(MedicalInventoryRow inventoryRow) {

private JRadioButton getSpecificRadio() {
if (specificRadio == null) {
specificRadio = new JRadioButton(MessageBundle.getMessage("angal.inventory.specificproduct.radio"));
specificRadio = new JRadioButton(MessageBundle.getMessage("angal.inventory.specificproduct.btn"));
specificRadio.addActionListener(actionEvent -> {
if (specificRadio.isSelected()) {
codeTextField.setEnabled(true);
Expand All @@ -1055,7 +1055,7 @@ private JRadioButton getSpecificRadio() {

private JRadioButton getAllRadio() {
if (allRadio == null) {
allRadio = new JRadioButton(MessageBundle.getMessage("angal.inventory.allproduct.radio"));
allRadio = new JRadioButton(MessageBundle.getMessage("angal.inventory.allproduct.btn"));
allRadio.setSelected(inventory != null);
specificRadio.setSelected(inventory == null);
allRadio.addActionListener(actionEvent -> {
Expand Down Expand Up @@ -1198,7 +1198,7 @@ private Medical chooseMedical(String text) throws OHServiceException {
key = med.getCode().toString().toLowerCase();
medicalMap.put(key, med);
}
ArrayList<Medical> medList = new ArrayList<>();
List<Medical> medList = new ArrayList<>();
for (Medical aMed : medicalMap.values()) {
if (NormalizeString.normalizeContains(aMed.getDescription().toLowerCase(), text)) {
medList.add(aMed);
Expand Down Expand Up @@ -1341,7 +1341,7 @@ private JComboBox<Ward> getWardComboBox() {
}

if (medicalWardInventoryDraft.isEmpty() && medicalWardInventoryValidated.isEmpty()) {
activedSomeComponents();
activateSomeComponents();
} else {
MessageDialog.error(this,
"angal.inventory.cannotcreateanotherinventorywithotherinprogressinthisward.msg");
Expand Down Expand Up @@ -1402,7 +1402,7 @@ private void disabledSomeComponents() {
deleteButton.setEnabled(false);
}

private void activedSomeComponents() {
private void activateSomeComponents() {
jCalendarInventory.setEnabled(true);
specificRadio.setEnabled(true);
codeTextField.setEnabled(true);
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/isf/medicalinventory/gui/StockMedModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import javax.swing.table.DefaultTableModel;

Expand All @@ -33,10 +34,10 @@
public class StockMedModel extends DefaultTableModel {

private static final long serialVersionUID = 1L;
private ArrayList<Medical> medList;
private ArrayList<Medical> initList = new ArrayList<Medical>();
private List<Medical> medList;
private List<Medical> initList = new ArrayList<Medical>();

public StockMedModel(ArrayList<Medical> meds) {
public StockMedModel(List<Medical> meds) {
medList = meds;
initList.addAll(medList);
}
Expand Down

0 comments on commit 2febb59

Please sign in to comment.