Class ReadWriteOptionDialog
java.lang.Object
com.inductiveautomation.ignition.client.util.gui.ReadWriteOptionDialog
Options dialog used to allow users to immediately (or temporarily) elevate their comm mode for a particular operation
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
E extends Exception>
TrunReadProtectedAction
(FragileSupplier<T, E> action) From the EDT, runs an action that may require the designer's "comm mode" setting to be read-only.static <T,
E extends Exception>
TrunWriteProtectedAction
(FragileSupplier<T, E> action) From the EDT, runs an action that may require the designer's "comm mode" setting to be read/write.static int
showOptionDialog
(int mode) Show the dialog to the user, asking them to elevate their comm mode.
-
Field Details
-
CANCEL
public static final int CANCEL- See Also:
-
ELEVATE
public static final int ELEVATE- See Also:
-
ONE_TIME
public static final int ONE_TIME- See Also:
-
-
Method Details
-
runWriteProtectedAction
public static <T,E extends Exception> T runWriteProtectedAction(FragileSupplier<T, E> action) throws RpcException, EFrom the EDT, runs an action that may require the designer's "comm mode" setting to be read/write. If it is not, the user is show an option to enable read/write mode, or enable read/write mode for one action - if so, when this function returns the comm mode will have returned to what it was before.- Parameters:
action
- Some action to take, which can throw an exception. That exception will be thrown directly.- Returns:
- The successful result of the provided lambda, if the user was already in read/write or accepted elevation to read/write.
- Throws:
RpcException
E extends Exception
-
runReadProtectedAction
public static <T,E extends Exception> T runReadProtectedAction(FragileSupplier<T, E> action) throws RpcException, EFrom the EDT, runs an action that may require the designer's "comm mode" setting to be read-only. If it is not, the user is show an option to enable read-only mode, or enable read-only mode for one action - if so, when this function returns the comm mode will have returned to what it was before.- Parameters:
action
- Some action to take, which can throw an exception. That exception will be thrown directly.- Returns:
- The successful result of the provided lambda, if the user was already in read-only or accepted elevation to read-only.
- Throws:
RpcException
E extends Exception
-
showOptionDialog
public static int showOptionDialog(int mode) Show the dialog to the user, asking them to elevate their comm mode. Blocking! and must be called from the EDT.
-