lundi 15 mars 2021

Pass variables from Presentation Layer to Logic Layer

I am stuck when I try to make the Logic Layer update the Presentation Layer since I have initialized GUI variables in the Presentation Layer. Still, after that, I couldn't find a way to reach those variables from the Logic Layer. I don't believe that I should make all variables public to reach them.

I have an example here:

  • Logic Layer method that updates multiChoicePanel

    public void clearDisplay() {
              if (currentlyDisplayedQuestion.getQuestionType() == QuestionType.MULTI_CHOICE) {
                  multiChoicePanel.clearDisplay();
              } 
             else
              ...
          };
    
  • Presentation Layer where i have declared multiChoicePanel

      private JQEMultiChoiceQuestionScreen multiChoicePanel;
    

So the question here is how to pass multiChoicePanel to Logic Layer?

Aucun commentaire:

Enregistrer un commentaire