IDEMPIERE-724 Zk: Make iDempiere theme more easily customizable - Refactoring to allowing theme to change the appearance of the about window
This commit is contained in:
parent
9528b69977
commit
82ed66848d
|
@ -82,11 +82,11 @@ public class AboutWindow extends Window implements EventListener<Event> {
|
||||||
private Checkbox bErrorsOnly;
|
private Checkbox bErrorsOnly;
|
||||||
private Listbox logTable;
|
private Listbox logTable;
|
||||||
private Tabbox tabbox;
|
private Tabbox tabbox;
|
||||||
private Tabpanels tabPanels;
|
protected Tabpanels tabPanels;
|
||||||
private Button btnDownload;
|
private Button btnDownload;
|
||||||
private Button btnErrorEmail;
|
private Button btnErrorEmail;
|
||||||
private Button btnViewLog;
|
private Button btnViewLog;
|
||||||
private Tab tabLog;
|
protected Tab tabLog;
|
||||||
|
|
||||||
private Button btnAdempiereLog;
|
private Button btnAdempiereLog;
|
||||||
|
|
||||||
|
@ -119,34 +119,7 @@ public class AboutWindow extends Window implements EventListener<Event> {
|
||||||
tabPanels.setHflex("1");
|
tabPanels.setHflex("1");
|
||||||
tabPanels.setVflex("1");
|
tabPanels.setVflex("1");
|
||||||
|
|
||||||
//about
|
initTabs(tabs);
|
||||||
Tab tab = new Tab();
|
|
||||||
tab.setLabel(Msg.getMsg(Env.getCtx(), "About"));
|
|
||||||
tab.setParent(tabs);
|
|
||||||
Tabpanel tabPanel = createAbout();
|
|
||||||
tabPanel.setParent(tabPanels);
|
|
||||||
|
|
||||||
//Credit
|
|
||||||
tab = new Tab();
|
|
||||||
tab.setLabel(Msg.getMsg(Env.getCtx(), "Credits"));
|
|
||||||
tab.setParent(tabs);
|
|
||||||
tabPanel = createCredit();
|
|
||||||
tabPanel.setParent(tabPanels);
|
|
||||||
|
|
||||||
//Info
|
|
||||||
tab = new Tab();
|
|
||||||
tab.setLabel(Msg.getMsg(Env.getCtx(), "Info"));
|
|
||||||
tab.setParent(tabs);
|
|
||||||
tabPanel = createInfo();
|
|
||||||
tabPanel.setParent(tabPanels);
|
|
||||||
|
|
||||||
//Trace
|
|
||||||
tab = new Tab();
|
|
||||||
tab.setLabel("Errors");
|
|
||||||
tabLog = tab;
|
|
||||||
tab.setParent(tabs);
|
|
||||||
tabPanel = createTrace();
|
|
||||||
tabPanel.setParent(tabPanels);
|
|
||||||
|
|
||||||
Button btnOk = ButtonFactory.createNamedButton(ConfirmPanel.A_OK);
|
Button btnOk = ButtonFactory.createNamedButton(ConfirmPanel.A_OK);
|
||||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||||
|
@ -175,7 +148,38 @@ public class AboutWindow extends Window implements EventListener<Event> {
|
||||||
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
|
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tabpanel createTrace() {
|
protected void initTabs(Tabs tabs) {
|
||||||
|
//about
|
||||||
|
Tab tab = new Tab();
|
||||||
|
tab.setLabel(Msg.getMsg(Env.getCtx(), "About"));
|
||||||
|
tab.setParent(tabs);
|
||||||
|
Tabpanel tabPanel = createAbout();
|
||||||
|
tabPanel.setParent(tabPanels);
|
||||||
|
|
||||||
|
//Credit
|
||||||
|
tab = new Tab();
|
||||||
|
tab.setLabel(Msg.getMsg(Env.getCtx(), "Credits"));
|
||||||
|
tab.setParent(tabs);
|
||||||
|
tabPanel = createCredit();
|
||||||
|
tabPanel.setParent(tabPanels);
|
||||||
|
|
||||||
|
//Info
|
||||||
|
tab = new Tab();
|
||||||
|
tab.setLabel(Msg.getMsg(Env.getCtx(), "Info"));
|
||||||
|
tab.setParent(tabs);
|
||||||
|
tabPanel = createInfo();
|
||||||
|
tabPanel.setParent(tabPanels);
|
||||||
|
|
||||||
|
//Trace
|
||||||
|
tab = new Tab();
|
||||||
|
tab.setLabel("Errors");
|
||||||
|
tabLog = tab;
|
||||||
|
tab.setParent(tabs);
|
||||||
|
tabPanel = createTrace();
|
||||||
|
tabPanel.setParent(tabPanels);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Tabpanel createTrace() {
|
||||||
Tabpanel tabPanel = new Tabpanel();
|
Tabpanel tabPanel = new Tabpanel();
|
||||||
Vbox vbox = new Vbox();
|
Vbox vbox = new Vbox();
|
||||||
LayoutUtils.addSclass("about-trace-panel", vbox);
|
LayoutUtils.addSclass("about-trace-panel", vbox);
|
||||||
|
@ -293,7 +297,7 @@ public class AboutWindow extends Window implements EventListener<Event> {
|
||||||
tabLog.setLabel(Msg.getMsg(Env.getCtx(), "TraceInfo") + " (" + data.size() + ")");
|
tabLog.setLabel(Msg.getMsg(Env.getCtx(), "TraceInfo") + " (" + data.size() + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tabpanel createInfo() {
|
protected Tabpanel createInfo() {
|
||||||
Tabpanel tabPanel = new Tabpanel();
|
Tabpanel tabPanel = new Tabpanel();
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
LayoutUtils.addSclass("about-info-panel", div);
|
LayoutUtils.addSclass("about-info-panel", div);
|
||||||
|
@ -308,7 +312,7 @@ public class AboutWindow extends Window implements EventListener<Event> {
|
||||||
return tabPanel;
|
return tabPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tabpanel createCredit() {
|
protected Tabpanel createCredit() {
|
||||||
Tabpanel tabPanel = new Tabpanel();
|
Tabpanel tabPanel = new Tabpanel();
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
LayoutUtils.addSclass("about-credit-panel", div);
|
LayoutUtils.addSclass("about-credit-panel", div);
|
||||||
|
@ -428,7 +432,7 @@ public class AboutWindow extends Window implements EventListener<Event> {
|
||||||
return tabPanel;
|
return tabPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tabpanel createAbout() {
|
protected Tabpanel createAbout() {
|
||||||
Tabpanel tabPanel = new Tabpanel();
|
Tabpanel tabPanel = new Tabpanel();
|
||||||
|
|
||||||
Vbox vb = new Vbox();
|
Vbox vb = new Vbox();
|
||||||
|
|
Loading…
Reference in New Issue