- java.lang.Object
-
- com.iamsoft.util.ui.javafx.StatusMonitor
-
public class StatusMonitor extends Object
A helper class which can be used to automatically determine what status to show depending on the priority of the added statuses. A status is considered active if the status message is non-empty. If two statuses have the same priority, with higher priority is considered the one which most recently changed state from inactive to active (i.e. the one which most recently changed the status message from empty string to non-empty string).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StatusMonitor.ProgressUpdate<T>
-
Constructor Summary
Constructors Constructor Description StatusMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStatus(int pPriority, javafx.beans.value.ObservableValue<String> pStatus)
javafx.beans.property.ReadOnlyBooleanProperty
emptyStatusProperty()
String
getStatus()
boolean
isEmptyStatus()
boolean
removeStatus(int pPriority, javafx.beans.value.ObservableValue<String> pStatus)
javafx.beans.property.ReadOnlyObjectProperty<String>
statusProperty()
-
-
-
Method Detail
-
statusProperty
public javafx.beans.property.ReadOnlyObjectProperty<String> statusProperty()
-
getStatus
public String getStatus()
-
emptyStatusProperty
public javafx.beans.property.ReadOnlyBooleanProperty emptyStatusProperty()
-
isEmptyStatus
public boolean isEmptyStatus()
-
addStatus
public void addStatus(int pPriority, javafx.beans.value.ObservableValue<String> pStatus)
- Parameters:
pPriority
- the lower the number the higher the prioritypStatus
- status message
-
removeStatus
public boolean removeStatus(int pPriority, javafx.beans.value.ObservableValue<String> pStatus)
-
-