/* * Decompiled with CFR 0.152. * * Could not load the following classes: * javax.baja.gx.BImage * javax.baja.sys.Action * javax.baja.sys.BComponent * javax.baja.ui.BDialog * javax.baja.ui.BWidget * javax.baja.ui.Command * javax.baja.ui.CommandArtifact * javax.baja.workbench.view.BWbView */ package com.tridium.platform.ui; import com.tridium.platform.ui.util.CommandUtil; import javax.baja.gx.BImage; import javax.baja.sys.Action; import javax.baja.sys.BComponent; import javax.baja.ui.BDialog; import javax.baja.ui.BWidget; import javax.baja.ui.Command; import javax.baja.ui.CommandArtifact; import javax.baja.workbench.view.BWbView; public class ConfirmedActionCommand extends Command { private String title; private String message; private Action action; private int buttons; public ConfirmedActionCommand(BWbView bWbView, Action action, String string) { this(bWbView, action, string, 12); } public ConfirmedActionCommand(BWbView bWbView, Action action, String string, int n) { super((BWidget)bWbView, bWbView.getType().getModule(), string + "." + action.getName()); this.title = bWbView.getLexicon().getText(string + "." + action.getName() + ".confirmTitle"); this.message = bWbView.getLexicon().getText(string + "." + action.getName() + ".confirmMessage"); this.buttons = n; this.action = action; } public CommandArtifact doInvoke() { try { ConfirmedActionCommand.doConfirmedAction((BWidget)((BWbView)this.getOwner()), (BComponent)((BWbView)this.getOwner()).getCurrentValue(), this.title, this.message, this.action, this.buttons); } catch (Throwable throwable) { CommandUtil.error(this, throwable); } return null; } public static void doConfirmedAction(BWbView bWbView, Action action, String string) { ConfirmedActionCommand.doConfirmedAction(bWbView, action, string, 12); } public static void doConfirmedAction(BWbView bWbView, Action action, String string, int n) { ConfirmedActionCommand.doConfirmedAction((BWidget)bWbView, (BComponent)bWbView.getCurrentValue(), action, string, n); } public static void doConfirmedAction(BWidget bWidget, BComponent bComponent, Action action, String string) { ConfirmedActionCommand.doConfirmedAction(bWidget, bComponent, action, string, 12); } public static void doConfirmedAction(BWidget bWidget, BComponent bComponent, Action action, String string, int n) { ConfirmedActionCommand.doConfirmedAction(bWidget, bComponent, bComponent.getLexicon().getText(string + "." + action.getName() + ".confirmTitle"), bComponent.getLexicon().getText(string + "." + action.getName() + ".confirmMessage"), action, n); } private static void doConfirmedAction(BWidget bWidget, BComponent bComponent, String string, String string2, Action action, int n) { if (BDialog.open((BWidget)bWidget, (String)string, (Object)string2, (int)n, (BImage)BDialog.WARNING_ICON, (String)null) == (n & 5)) { bComponent.invoke(action, null, null); } } }