IDEMPIERE-166 Rebranding of logo and product name.

This commit is contained in:
Heng Sin Low 2013-03-19 17:59:29 +08:00
parent 17c3f08137
commit 7fe2047a1a
1 changed files with 27 additions and 54 deletions

View File

@ -83,8 +83,6 @@ public class AboutWindow extends Window implements EventListener<Event> {
private Button btnAdempiereLog; private Button btnAdempiereLog;
private Button btnServerLog;
private Listbox levelListBox; private Listbox levelListBox;
public AboutWindow() { public AboutWindow() {
@ -172,32 +170,6 @@ public class AboutWindow extends Window implements EventListener<Event> {
vbox.setVflex("1"); vbox.setVflex("1");
Hbox hbox = new Hbox(); Hbox hbox = new Hbox();
bErrorsOnly = new Checkbox();
bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
//default only show error
bErrorsOnly.setChecked(true);
bErrorsOnly.addEventListener(Events.ON_CHECK, this);
hbox.appendChild(bErrorsOnly);
hbox.appendChild(new Space());
btnDownload = new Button(Msg.getMsg(Env.getCtx(), "SaveFile"));
btnDownload .setTooltiptext("Download session log");
btnDownload.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnDownload);
hbox.appendChild(new Space());
btnErrorEmail = new Button(Msg.getMsg(Env.getCtx(), "SendEMail"));
btnErrorEmail.setTooltiptext("Email session log");
btnErrorEmail.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnErrorEmail);
hbox.appendChild(new Space());
btnViewLog = new Button(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "View")));
btnViewLog.setTooltiptext("View session log");
btnViewLog.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnViewLog);
hbox.setHflex("1");
hbox.setVflex("0");
vbox.appendChild(hbox);
hbox = new Hbox();
hbox.setAlign("center"); hbox.setAlign("center");
hbox.setPack("start"); hbox.setPack("start");
Label levelLabel = new Label("Trace Level:"); Label levelLabel = new Label("Trace Level:");
@ -234,14 +206,8 @@ public class AboutWindow extends Window implements EventListener<Event> {
btnAdempiereLog.setTooltiptext("Download iDempiere log file from server"); btnAdempiereLog.setTooltiptext("Download iDempiere log file from server");
btnAdempiereLog.addEventListener(Events.ON_CLICK, this); btnAdempiereLog.addEventListener(Events.ON_CLICK, this);
btnServerLog = new Button("Server Log");
btnServerLog.setTooltiptext("Download iDempiere server log file");
btnServerLog.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(new Space()); hbox.appendChild(new Space());
hbox.appendChild(btnAdempiereLog); hbox.appendChild(btnAdempiereLog);
hbox.appendChild(new Space());
hbox.appendChild(btnServerLog);
} }
} }
@ -250,6 +216,32 @@ public class AboutWindow extends Window implements EventListener<Event> {
hbox.setVflex("0"); hbox.setVflex("0");
vbox.appendChild(hbox); vbox.appendChild(hbox);
hbox = new Hbox();
bErrorsOnly = new Checkbox();
bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
//default only show error
bErrorsOnly.setChecked(true);
bErrorsOnly.addEventListener(Events.ON_CHECK, this);
hbox.appendChild(bErrorsOnly);
hbox.appendChild(new Space());
btnDownload = new Button(Msg.getMsg(Env.getCtx(), "SaveFile"));
btnDownload .setTooltiptext("Download session log");
btnDownload.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnDownload);
hbox.appendChild(new Space());
btnErrorEmail = new Button(Msg.getMsg(Env.getCtx(), "SendEMail"));
btnErrorEmail.setTooltiptext("Email session log");
btnErrorEmail.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnErrorEmail);
hbox.appendChild(new Space());
btnViewLog = new Button(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "View")));
btnViewLog.setTooltiptext("View session log");
btnViewLog.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnViewLog);
hbox.setHflex("1");
hbox.setVflex("0");
vbox.appendChild(hbox);
Vector<String> columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx()); Vector<String> columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx());
logTable = new Listbox(); logTable = new Listbox();
@ -469,8 +461,6 @@ public class AboutWindow extends Window implements EventListener<Event> {
cmd_errorEMail(); cmd_errorEMail();
else if (event.getTarget() == btnAdempiereLog) else if (event.getTarget() == btnAdempiereLog)
downloadAdempiereLogFile(); downloadAdempiereLogFile();
else if (event.getTarget() == btnServerLog)
downloadServerLogFile();
else if (event.getTarget() == levelListBox) else if (event.getTarget() == levelListBox)
setTraceLevel(); setTraceLevel();
else if (Events.ON_CLICK.equals(event.getName())) else if (Events.ON_CLICK.equals(event.getName()))
@ -487,23 +477,6 @@ public class AboutWindow extends Window implements EventListener<Event> {
} }
} }
private void downloadServerLogFile() {
String path = Ini.getAdempiereHome() + File.separator + "jboss" + File.separator
+ "server" + File.separator + "adempiere" + File.separator + "log";
FolderBrowser fileBrowser = new FolderBrowser(path, false);
String selected = fileBrowser.getPath();
if (selected != null && selected.trim().length() > 0) {
File file = new File(selected);
if (file.exists() && file.isFile() && file.canRead()) {
try {
AMedia media = new AMedia(file, "text/plain", null);
Filedownload.save(media);
} catch (FileNotFoundException e) {
}
}
}
}
private void downloadAdempiereLogFile() { private void downloadAdempiereLogFile() {
String path = Ini.getAdempiereHome() + File.separator + "log"; String path = Ini.getAdempiereHome() + File.separator + "log";
FolderBrowser fileBrowser = new FolderBrowser(path, false); FolderBrowser fileBrowser = new FolderBrowser(path, false);