use of org.adempiere.webui.component.WAppsAction in project adempiere by adempiere.
the class FindWindow method initSimple.
/**
* initialise lookup record tab
* @throws IOException
*
**/
private void initSimple() throws IOException {
lblDocumentNo = new Label();
lblDocumentNo.setValue(Msg.translate(Env.getCtx(), "DocumentNo").replaceAll("&", ""));
lblDescription = new Label();
lblDescription.setValue(Msg.translate(Env.getCtx(), "Description").replaceAll("&", ""));
lblName = new Label();
lblName.setValue(Msg.translate(Env.getCtx(), "Name").replaceAll("&", ""));
lblValue = new Label();
lblValue.setValue(Msg.translate(Env.getCtx(), "Value").replaceAll("&", ""));
fieldDocumentNo = new Textbox();
fieldDocumentNo.setId("fieldDocumentNo");
fieldDocumentNo.setMaxlength(40);
fieldDescription = new Textbox();
fieldDescription.setId("fieldDescription");
fieldDescription.setMaxlength(40);
fieldName = new Textbox();
fieldName.setMaxlength(40);
fieldValue = new Textbox();
fieldValue.setMaxlength(40);
// Get button from Action
WAppsAction action = new WAppsAction(ConfirmPanel.A_NEW, null, ConfirmPanel.A_NEW);
Button btnNew = action.getButton();
btnNew.setName("btnNew");
btnNew.addEventListener(Events.ON_CLICK, this);
// Get button from Action
action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
Button btnOk = action.getButton();
btnOk.setName("btnOkSimple");
btnOk.addEventListener(Events.ON_CLICK, this);
// Get from action
action = new WAppsAction(ConfirmPanel.A_CANCEL, null, ConfirmPanel.A_CANCEL);
Button btnCancel = action.getButton();
btnCancel.setName("btnCancel");
btnCancel.addEventListener(Events.ON_CLICK, this);
Panel pnlButtonRight = new Panel();
// Change to Standard button order
pnlButtonRight.appendChild(btnCancel);
pnlButtonRight.appendChild(btnOk);
pnlButtonRight.setAlign("right");
pnlButtonRight.setWidth("100%");
Panel pnlButtonLeft = new Panel();
pnlButtonLeft.appendChild(btnNew);
Hbox hboxButton = new Hbox();
hboxButton.appendChild(pnlButtonLeft);
hboxButton.appendChild(pnlButtonRight);
hboxButton.setWidth("100%");
pnlDocument = new Row();
pnlDocument.setId("pnlDocument");
pnlDocument.appendChild(LayoutUtils.makeRightAlign(lblDocumentNo));
pnlDocument.appendChild(fieldDocumentNo);
pnlDescription = new Row();
pnlDescription.appendChild(LayoutUtils.makeRightAlign(lblDescription));
pnlDescription.appendChild(fieldDescription);
pnlValue = new Row();
pnlValue.appendChild(LayoutUtils.makeRightAlign(lblValue));
pnlValue.appendChild(fieldValue);
pnlName = new Row();
pnlName.appendChild(LayoutUtils.makeRightAlign(lblName));
pnlName.appendChild(fieldName);
contentSimple = new Grid();
contentSimple.setId("contentSimple");
contentSimple.setWidth("100%");
contentSimple.makeNoStrip();
contentSimpleRows = new Rows();
contentSimple.appendChild(contentSimpleRows);
contentSimpleRows.appendChild(pnlValue);
contentSimpleRows.appendChild(pnlName);
contentSimpleRows.appendChild(pnlDocument);
contentSimpleRows.appendChild(pnlDescription);
contentSimple.setVflex(true);
Borderlayout layout = new Borderlayout();
layout.setStyle("height: 100%; width: 99%; position: relative");
winLookupRecord.appendChild(layout);
Center center = new Center();
layout.appendChild(center);
center.appendChild(contentSimple);
center.setFlex(true);
South south = new South();
layout.appendChild(south);
south.appendChild(hboxButton);
winLookupRecord.setWidth("100%");
winLookupRecord.setHeight("100%");
winLookupRecord.addEventListener(Events.ON_OK, this);
}
use of org.adempiere.webui.component.WAppsAction in project adempiere by adempiere.
the class WCreateFromPanel method zkInit.
/**
* Create UI
* @throws IOException
*/
protected void zkInit() throws IOException {
Borderlayout contentPane = new Borderlayout();
appendChild(contentPane);
North north = new North();
contentPane.appendChild(north);
north.appendChild(parameterPanel);
Center center = new Center();
contentPane.appendChild(center);
center.appendChild(dataTable);
WAppsAction selectAllAction = new WAppsAction(SELECT_ALL, null, null);
Button selectAllButton = selectAllAction.getButton();
confirmPanel.addComponentsLeft(selectAllButton);
selectAllButton.addActionListener(this);
South south = new South();
contentPane.appendChild(south);
Panel southPanel = new Panel();
south.appendChild(southPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(confirmPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
setWidth("750px");
setHeight("550px");
contentPane.setWidth("100%");
contentPane.setHeight("100%");
}
use of org.adempiere.webui.component.WAppsAction in project adempiere by adempiere.
the class WCreateFromWindow method zkInit.
protected void zkInit() throws Exception {
Borderlayout contentPane = new Borderlayout();
appendChild(contentPane);
North north = new North();
contentPane.appendChild(north);
north.appendChild(parameterPanel);
Center center = new Center();
contentPane.appendChild(center);
center.appendChild(dataTable);
WAppsAction selectAllAction = new WAppsAction(SELECT_ALL, null, null);
Button selectAllButton = selectAllAction.getButton();
confirmPanel.addComponentsLeft(selectAllButton);
selectAllButton.addActionListener(this);
South south = new South();
contentPane.appendChild(south);
Panel southPanel = new Panel();
south.appendChild(southPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(confirmPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
setWidth("750px");
setHeight("550px");
setSizable(true);
setBorder("normal");
contentPane.setWidth("100%");
contentPane.setHeight("100%");
}
use of org.adempiere.webui.component.WAppsAction in project adempiere by adempiere.
the class FindWindow method initAdvanced.
/**
* initialise Advanced Tab
* @throws IOException
*
**/
private void initAdvanced() throws IOException {
ToolBarButton btnNew = new ToolBarButton();
btnNew.setImage("/images/New24.png");
btnNew.setAttribute("name", "btnNewAdv");
btnNew.addEventListener(Events.ON_CLICK, this);
ToolBarButton btnDelete = new ToolBarButton();
btnDelete.setAttribute("name", "btnDeleteAdv");
btnDelete.setImage("/images/Delete24.png");
btnDelete.addEventListener(Events.ON_CLICK, this);
ToolBarButton btnSave = new ToolBarButton();
btnSave.setAttribute("name", "btnSaveAdv");
btnSave.setImage("/images/Save24.png");
btnSave.addEventListener(Events.ON_CLICK, this);
fQueryName = new Combobox();
fQueryName.setTooltiptext(m_sToolTipText);
fQueryName.setReadonly(false);
fQueryName.addEventListener(Events.ON_FOCUS, this);
fQueryName.addEventListener(Events.ON_BLUR, this);
fQueryName.addEventListener(Events.ON_SELECT, this);
// Get from Action
WAppsAction action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
Button btnOk = action.getButton();
btnOk.setName("btnOkAdv");
btnOk.addEventListener(Events.ON_CLICK, this);
//
action = new WAppsAction(ConfirmPanel.A_CANCEL, null, ConfirmPanel.A_CANCEL);
Button btnCancel = action.getButton();
btnCancel.setName("btnCancel");
btnCancel.addEventListener(Events.ON_CLICK, this);
Panel pnlButtonRight = new Panel();
// Change to Standard button order
pnlButtonRight.appendChild(btnCancel);
pnlButtonRight.appendChild(btnOk);
pnlButtonRight.setAlign("right");
ToolBar toolBar = new ToolBar();
toolBar.appendChild(btnNew);
toolBar.appendChild(btnDelete);
toolBar.appendChild(fQueryName);
toolBar.appendChild(btnSave);
toolBar.setWidth("100%");
fQueryName.setStyle("margin-left: 3px; margin-right: 3px; position: relative; top: 5px;");
btnSave.setDisabled(m_AD_Tab_ID <= 0);
Hbox confirmPanel = new Hbox();
confirmPanel.appendChild(pnlButtonRight);
confirmPanel.setWidth("100%");
advancedPanel = new Listbox();
ListHead listhead = new ListHead();
listhead.setSizable(true);
ListHeader lstHAndOr = new ListHeader();
lstHAndOr.setLabel(Msg.getMsg(Env.getCtx(), "And/Or"));
lstHAndOr.setWidth("40px");
ListHeader lstHLeftBracket = new ListHeader();
lstHLeftBracket.setLabel("(");
lstHLeftBracket.setWidth("20px");
ListHeader lstHColumn = new ListHeader();
lstHColumn.setLabel(Msg.translate(Env.getCtx(), "AD_Column_ID"));
lstHColumn.setWidth("100px");
ListHeader lstHOperator = new ListHeader();
lstHOperator.setLabel(Msg.getMsg(Env.getCtx(), "Operator"));
ListHeader lstHQueryValue = new ListHeader();
lstHQueryValue.setLabel(Msg.getMsg(Env.getCtx(), "QueryValue"));
lstHQueryValue.setWidth("170px");
ListHeader lstHQueryTo = new ListHeader();
lstHQueryTo.setLabel(Msg.getMsg(Env.getCtx(), "QueryValue2"));
lstHQueryTo.setWidth("170px");
ListHeader lstHRightBracket = new ListHeader();
lstHRightBracket.setLabel(")");
lstHRightBracket.setWidth("20px");
listhead.appendChild(lstHAndOr);
listhead.appendChild(lstHLeftBracket);
listhead.appendChild(lstHColumn);
listhead.appendChild(lstHOperator);
listhead.appendChild(lstHQueryValue);
listhead.appendChild(lstHQueryTo);
listhead.appendChild(lstHRightBracket);
advancedPanel.appendChild(listhead);
advancedPanel.setVflex(true);
Borderlayout layout = new Borderlayout();
layout.setStyle("height: 100%; width: 99%; position: relative;");
winAdvanced.appendChild(layout);
North north = new North();
layout.appendChild(north);
north.appendChild(toolBar);
Center center = new Center();
layout.appendChild(center);
center.appendChild(advancedPanel);
center.setFlex(true);
South south = new South();
layout.appendChild(south);
south.appendChild(confirmPanel);
winAdvanced.setHeight("100%");
winAdvanced.setWidth("100%");
winAdvanced.addEventListener(Events.ON_OK, this);
}
use of org.adempiere.webui.component.WAppsAction in project adempiere by adempiere.
the class WBrowser method setupToolBar.
/**
* Add Components to tool bar
*/
private void setupToolBar() {
try {
toolsBar = new ToolBar();
WAppsAction action = new WAppsAction(ConfirmPanel.A_REFRESH, null, ConfirmPanel.A_REFRESH);
bSearch = action.getButton();
action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
bOk = action.getButton();
action = new WAppsAction(ConfirmPanel.A_CANCEL, null, ConfirmPanel.A_CANCEL);
bCancel = action.getButton();
action = new WAppsAction(ConfirmPanel.A_ZOOM, null, ConfirmPanel.A_ZOOM);
bZoom = action.getButton();
action = new WAppsAction(ConfirmPanel.A_EXPORT, null, ConfirmPanel.A_EXPORT);
bExport = action.getButton();
action = new WAppsAction(ConfirmPanel.A_DELETE, null, ConfirmPanel.A_DELETE);
bDelete = action.getButton();
action = new WAppsAction("SelectAll", null, Msg.getMsg(Env.getCtx(), "SelectAll"));
bSelectAll = action.getButton();
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations