138 lines
3.5 KiB
Java
138 lines
3.5 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.file;
|
|
|
|
import javax.baja.agent.AgentList;
|
|
import javax.baja.file.BAbstractFile;
|
|
import javax.baja.file.BIDirectory;
|
|
import javax.baja.file.BIFile;
|
|
import javax.baja.file.BIFileStore;
|
|
import javax.baja.nav.BINavNode;
|
|
import javax.baja.sys.BIcon;
|
|
import javax.baja.sys.Context;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.Lexicon;
|
|
import javax.baja.util.LexiconText;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public class BDirectory
|
|
extends BAbstractFile
|
|
implements BIDirectory {
|
|
private static final BIcon defaultIcon = BIcon.std("folder.png");
|
|
public static final Type TYPE;
|
|
private LexiconText lexText;
|
|
BIcon icon;
|
|
BINavNode navParent;
|
|
static /* synthetic */ Class class$javax$baja$file$BDirectory;
|
|
|
|
public BIFile[] listFiles() {
|
|
return this.getFileSpace().getChildren(this);
|
|
}
|
|
|
|
public String getMimeType() {
|
|
return "application/x-baja-directory";
|
|
}
|
|
|
|
public LexiconText getLexiconText() {
|
|
return this.lexText;
|
|
}
|
|
|
|
public void setLexiconText(LexiconText lexiconText) {
|
|
this.lexText = lexiconText;
|
|
}
|
|
|
|
public String getNavDisplayName(Context context) {
|
|
if (this.lexText != null) {
|
|
return this.lexText.getText(context);
|
|
}
|
|
return this.getNavName();
|
|
}
|
|
|
|
public String getNavDescription(Context context) {
|
|
if (this.lexText != null) {
|
|
return Lexicon.make(this.lexText.module, context).get(this.lexText.key + ".description", null);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public BINavNode getNavParent() {
|
|
if (this.navParent != null) {
|
|
return this.navParent;
|
|
}
|
|
return super.getNavParent();
|
|
}
|
|
|
|
public boolean hasNavChildren() {
|
|
return true;
|
|
}
|
|
|
|
public BINavNode getNavChild(String string) {
|
|
return this.getFileSpace().getChild(this, string);
|
|
}
|
|
|
|
public BINavNode[] getNavChildren() {
|
|
return this.getFileSpace().getChildren(this);
|
|
}
|
|
|
|
public BIcon getIcon() {
|
|
if (this.icon != null) {
|
|
return this.icon;
|
|
}
|
|
return defaultIcon;
|
|
}
|
|
|
|
public void setIcon(BIcon bIcon) {
|
|
this.icon = bIcon;
|
|
}
|
|
|
|
public AgentList getAgents(Context context) {
|
|
AgentList agentList = super.getAgents(context);
|
|
agentList.toTop("workbench:DirectoryList");
|
|
agentList.toTop("hx:HxDirectoryView");
|
|
agentList.toBottom("web:FileUploadView");
|
|
return agentList;
|
|
}
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
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 BDirectory(BIFileStore bIFileStore, LexiconText lexiconText) {
|
|
super(bIFileStore);
|
|
this.lexText = lexiconText;
|
|
}
|
|
|
|
public BDirectory(BIFileStore bIFileStore) {
|
|
super(bIFileStore);
|
|
}
|
|
|
|
public BDirectory() {
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$file$BDirectory;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$file$BDirectory = BDirectory.class("[Ljavax.baja.file.BDirectory;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
}
|
|
}
|
|
|