protected AbstractAuthorizationUI getCurrentAuthorisationUI() { switch ((AuthorizationProcedure) cbAuthorisationProcedure.getSelectedItem()) { case FULLY_AUTOMATIC: return pnlFullyAutomaticAuthorisationUI; case MANUALLY: return pnlManualAuthorisationUI; case SEMI_AUTOMATIC: return pnlSemiAutomaticAuthorisationUI; default: return null; } }
/** * Refreshes the view of the authorisation panel, depending on the authorisation procedure * currently selected */ protected void refreshAuthorisationProcedurePanel() { AuthorizationProcedure procedure = (AuthorizationProcedure) cbAuthorisationProcedure.getSelectedItem(); switch (procedure) { case FULLY_AUTOMATIC: spAuthorisationProcedureUI.getViewport().setView(pnlFullyAutomaticAuthorisationUI); pnlFullyAutomaticAuthorisationUI.revalidate(); break; case SEMI_AUTOMATIC: spAuthorisationProcedureUI.getViewport().setView(pnlSemiAutomaticAuthorisationUI); pnlSemiAutomaticAuthorisationUI.revalidate(); break; case MANUALLY: spAuthorisationProcedureUI.getViewport().setView(pnlManualAuthorisationUI); pnlManualAuthorisationUI.revalidate(); break; } validate(); repaint(); }