From 8430392ab12c3a0a2e2eb034a05b31c6c9390e55 Mon Sep 17 00:00:00 2001 From: Abraham Wolk Date: Tue, 27 Aug 2024 09:52:08 +0200 Subject: [PATCH] CSSTUDIO-2371 Restrict access to GoBackAndGoForwardActions and its methods. --- .../logbook/olog/ui/LogEntryTable.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/LogEntryTable.java b/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/LogEntryTable.java index 06b4c2f60..99c2b2c2d 100644 --- a/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/LogEntryTable.java +++ b/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/LogEntryTable.java @@ -126,19 +126,19 @@ public void logEntryChanged(LogEntry logEntry){ controller.logEntryChanged(logEntry); } - public class GoBackAndGoForwardActions { + protected class GoBackAndGoForwardActions { - public GoBackAndGoForwardActions() { + private GoBackAndGoForwardActions() { goBackActions = FXCollections.observableArrayList(); goForwardActions = FXCollections.observableArrayList(); } - public ObservableList goBackActions; - public ObservableList goForwardActions; + protected ObservableList goBackActions; + protected ObservableList goForwardActions; private boolean isRecordingHistoryDisabled = false; // Used to not add go-back actions when clicking "back". - public boolean getIsRecordingHistoryDisabled() { + protected boolean getIsRecordingHistoryDisabled() { return isRecordingHistoryDisabled; } public void setIsRecordingHistoryDisabled(boolean isRecordingHistoryDisabled) { @@ -155,7 +155,7 @@ private void gotoLogEntry(LogEntry logEntry) { isRecordingHistoryDisabled = false; } - public void addGoBackAction() { + protected void addGoBackAction() { LogEntry currentLogEntry = controller.getLogEntry(); if (currentLogEntry != null) { @@ -163,7 +163,7 @@ public void addGoBackAction() { } } - public void addGoForwardAction() { + private void addGoForwardAction() { LogEntry currentLogEntry = controller.getLogEntry(); if (currentLogEntry != null) { @@ -171,7 +171,7 @@ public void addGoForwardAction() { } } - public void loadLogEntryWithID(Long id) { + private void loadLogEntryWithID(Long id) { goForwardActions.clear(); addGoBackAction(); @@ -179,7 +179,7 @@ public void loadLogEntryWithID(Long id) { gotoLogEntry(logEntry); } - public void goBack() { + protected void goBack() { if (goBackActions.size() > 0) { addGoForwardAction(); Runnable goBackAction = goBackActions.get(0); @@ -188,7 +188,7 @@ public void goBack() { } } - public void goForward() { + protected void goForward() { if (goForwardActions.size() > 0) { addGoBackAction(); Runnable goForwardAction = goForwardActions.get(0);