/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.tridium.ui.BOptionDialog * javax.baja.naming.SlotPath * javax.baja.sys.BValue * javax.baja.sys.Sys * javax.baja.sys.Type * javax.baja.ui.BCheckBox * javax.baja.ui.BDialog * javax.baja.ui.BLabel * javax.baja.ui.BNullWidget * javax.baja.ui.BTextField * javax.baja.ui.BWidget * javax.baja.ui.pane.BBorderPane * javax.baja.ui.pane.BGridPane * javax.baja.util.Lexicon */ package com.tridium.program.ui.batch; import com.tridium.program.ui.batch.BBatchEditor; import com.tridium.ui.BOptionDialog; import javax.baja.naming.SlotPath; import javax.baja.sys.BValue; import javax.baja.sys.Sys; import javax.baja.sys.Type; import javax.baja.ui.BCheckBox; import javax.baja.ui.BDialog; import javax.baja.ui.BLabel; import javax.baja.ui.BNullWidget; import javax.baja.ui.BTextField; import javax.baja.ui.BWidget; import javax.baja.ui.pane.BBorderPane; import javax.baja.ui.pane.BGridPane; import javax.baja.util.Lexicon; public class BRenameDialog extends BOptionDialog { public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$program$ui$batch$BRenameDialog == null ? (class$com$tridium$program$ui$batch$BRenameDialog = BRenameDialog.class$("com.tridium.program.ui.batch.BRenameDialog")) : class$com$tridium$program$ui$batch$BRenameDialog)); private static Lexicon lex = Lexicon.make((String)"program"); private BTextField find = new BTextField("", 30); private BTextField replace = new BTextField("", 30); private BCheckBox matchCase = new BCheckBox(lex.getText("batchEditor.matchCase")); private BCheckBox matchWord = new BCheckBox(lex.getText("batchEditor.matchWord")); static /* synthetic */ Class class$com$tridium$program$ui$batch$BRenameDialog; public Type getType() { return TYPE; } public static String open(BBatchEditor bBatchEditor, boolean bl) { BRenameDialog bRenameDialog = new BRenameDialog(bBatchEditor, bl); bRenameDialog.setBoundsCenteredOnOwner(); bRenameDialog.open(); if (bRenameDialog.getResult() == 1) { try { String string = SlotPath.escape((String)bRenameDialog.find.getText()); String string2 = SlotPath.escape((String)bRenameDialog.replace.getText()); StringBuffer stringBuffer = new StringBuffer(bl ? "rename" : "componentRename"); stringBuffer.append("(ord, "); stringBuffer.append("\"").append(string).append("\", "); stringBuffer.append("\"").append(string2).append("\", "); stringBuffer.append(bRenameDialog.matchCase.isSelected() ? "true" : "false").append(", "); stringBuffer.append(bRenameDialog.matchWord.isSelected() ? "true" : "false").append(");"); return stringBuffer.toString(); } catch (Exception exception) { BDialog.error((BWidget)bBatchEditor, (String)"Error", (Object)"Failed", (Throwable)exception); } } return null; } private BRenameDialog(BBatchEditor bBatchEditor, boolean bl) { super((BWidget)bBatchEditor, lex.getText(bl ? "batchEditor.commands.slotRename.label" : "batchEditor.commands.rename.label"), (BWidget)new BNullWidget(), 3, null, null); BGridPane bGridPane = new BGridPane(2); bGridPane.add(null, (BValue)new BLabel(lex.getText("batchEditor.find"))); bGridPane.add(null, (BValue)this.find); bGridPane.add(null, (BValue)new BLabel(lex.getText("batchEditor.replace"))); bGridPane.add(null, (BValue)this.replace); BGridPane bGridPane2 = new BGridPane(1); bGridPane2.add(null, (BValue)this.matchCase); bGridPane2.add(null, (BValue)this.matchWord); BGridPane bGridPane3 = new BGridPane(1); bGridPane3.add(null, (BValue)bGridPane); bGridPane3.add(null, (BValue)bGridPane2); this.setContent((BWidget)new BBorderPane((BWidget)bGridPane3, 10.0, 10.0, 10.0, 10.0)); } static /* synthetic */ Class class$(String string) { try { return Class.forName(string); } catch (ClassNotFoundException classNotFoundException) { throw new NoClassDefFoundError(classNotFoundException.getMessage()); } } }