97 lines
2.6 KiB
Java
97 lines
2.6 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* javax.baja.sys.BComponent
|
|
* javax.baja.sys.BValue
|
|
* javax.baja.sys.Property
|
|
* javax.baja.sys.Sys
|
|
* javax.baja.sys.Type
|
|
* javax.baja.util.BFormat
|
|
*/
|
|
package com.tridium.alarm;
|
|
|
|
import com.tridium.alarm.BTextOp;
|
|
import javax.baja.sys.BComponent;
|
|
import javax.baja.sys.BValue;
|
|
import javax.baja.sys.Property;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.BFormat;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public class BTextCustomizer
|
|
extends BComponent {
|
|
public static final Property op = BTextCustomizer.newProperty((int)0, (BValue)BTextOp.useExisting, null);
|
|
public static final Property text = BTextCustomizer.newProperty((int)0, (BValue)BFormat.make((String)""), null);
|
|
public static final Type TYPE;
|
|
static /* synthetic */ Class class$com$tridium$alarm$BTextCustomizer;
|
|
|
|
public BTextOp getOp() {
|
|
return (BTextOp)this.get(op);
|
|
}
|
|
|
|
public void setOp(BTextOp bTextOp) {
|
|
this.set(op, (BValue)bTextOp, null);
|
|
}
|
|
|
|
public BFormat getText() {
|
|
return (BFormat)this.get(text);
|
|
}
|
|
|
|
public void setText(BFormat bFormat) {
|
|
this.set(text, (BValue)bFormat, null);
|
|
}
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public String customize(String string) {
|
|
switch (this.getOp().getOrdinal()) {
|
|
case 1: {
|
|
return this.getText().format((Object)this) + string;
|
|
}
|
|
case 2: {
|
|
return string + this.getText().format((Object)this);
|
|
}
|
|
case 3: {
|
|
return this.getText().format((Object)this);
|
|
}
|
|
}
|
|
return string;
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
public BTextCustomizer() {
|
|
}
|
|
|
|
public BTextCustomizer(BTextOp bTextOp, BFormat bFormat) {
|
|
this.setOp(bTextOp);
|
|
this.setText(bFormat);
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$com$tridium$alarm$BTextCustomizer;
|
|
if (clazz == null) {
|
|
clazz = class$com$tridium$alarm$BTextCustomizer = BTextCustomizer.class("[Lcom.tridium.alarm.BTextCustomizer;", false);
|
|
}
|
|
TYPE = Sys.loadType((Class)clazz);
|
|
}
|
|
}
|
|
|