private Widget getHeaderWidget() { FlexTable widget = new FlexTable(); widget.setHTML(0, 0, DashboardMessages.MSG.office()); officesLB = new ListBox(); officesLB.setWidth("250px"); widget.setWidget(0, 1, officesLB); widget.setHTML(0, 2, DashboardMessages.MSG.broker()); brokersLB = new ListBox(); brokersLB.setWidth("250px"); widget.setWidget(0, 3, brokersLB); widget.setHTML(0, 4, DashboardMessages.MSG.userStatus()); estateStatusLB = new ListBox(); for (EstateStatusSearchType status : EstateStatusSearchType.values()) { estateStatusLB.addItem(status.getTitle(), "" + status.getId()); } widget.setWidget(0, 5, estateStatusLB); findButton = new Button(); findButton.setText(BaseMessages.MSG.find()); widget.setWidget(0, 6, findButton); return widget; }
private VerticalPanel createTipsItems() { VerticalPanel panel = new VerticalPanel(); panel.setSpacing(4); panel.add( createHyperlinkToUserPanel(DashboardMessages.MSG.menuTips(), TipsPresenter.PRESENTER_ID)); panel.add( createHyperlinkToUserPanel( DashboardMessages.MSG.menuTipForm(), TipFormPresenter.PRESENTER_ID)); return panel; }
private VerticalPanel createUsersItems() { VerticalPanel panel = new VerticalPanel(); panel.setSpacing(4); panel.add( createHyperlinkToUserPanel(DashboardMessages.MSG.menuUsers(), UsersPresenter.PRESENTER_ID)); panel.add( createHyperlinkToUserPanel( DashboardMessages.MSG.menuAddUser(), EditUserPresenter.PRESENTER_ID)); return panel; }
private VerticalPanel createBankerItems() { VerticalPanel panel = new VerticalPanel(); panel.setSpacing(4); panel.add( createHyperlinkToUserPanel( DashboardMessages.MSG.menuBankOffices(), BankOfficesPresenter.PRESENTER_ID)); panel.add( createHyperlinkToUserPanel( DashboardMessages.MSG.menuAddBankOffice(), EditBankOfficePresenter.PRESENTER_ID)); panel.add( createHyperlinkToUserPanel( DashboardMessages.MSG.menuBankers(), BankersPresenter.PRESENTER_ID)); panel.add( createHyperlinkToUserPanel( DashboardMessages.MSG.menuAddBanker(), EditBankerPresenter.PRESENTER_ID)); return panel; }
private VerticalPanel createSetupsItems() { VerticalPanel panel = new VerticalPanel(); panel.setSpacing(4); panel.add(createHyperlinkToUserPanel(DashboardMessages.MSG.menuSetupsMyProfile(), "")); // panel.add(createHyperlinkToUserPanel(DashboardMessages.MSG.menuMailTemplates(), // MailTemplatePresenter.PRESENTER_ID)); return panel; }
private void addEstatesMen() { String header = getHeaderString(DashboardMessages.MSG.menuEstates(), DashboardImages.IMG.home()); this.add(createEstatesItems(), header, true); }
private void addSetupsMen() { String header = getHeaderString(DashboardMessages.MSG.menuSetups(), DashboardImages.IMG.setup()); this.add(createSetupsItems(), header, true); }
// CLIENTS private void addTipsMen() { String header = getHeaderString(DashboardMessages.MSG.menuTip(), DashboardImages.IMG.editor()); this.add(createTipsItems(), header, true); }
// BANKERS private void addBankerMen() { String header = getHeaderString(DashboardMessages.MSG.menuBankers(), DashboardImages.IMG.userGreen()); this.add(createBankerItems(), header, true); }
// CLIENTS private void addClientsMen() { String header = getHeaderString(DashboardMessages.MSG.menuClients(), DashboardImages.IMG.users()); this.add(createClientsItems(), header, true); }
private void addUsersMen() { String header = getHeaderString(DashboardMessages.MSG.menuUsers(), DashboardImages.IMG.userFolder()); this.add(createUsersItems(), header, true); }
public class EstatesView extends BaseCompositeView implements EstatesPresenterDisplay { public static String VIEW_TITLE = DashboardMessages.MSG.menuEstatesList(); public static String VIEW_WIDTH = "800px"; public static String VIEW_PORT_HEIGHT = "400px"; // private Button addNewButton; private Button findButton; private ListBox officesLB; private ListBox brokersLB; private ListBox estateStatusLB; private GwtTable table; private AbstractMetaGwtTableModel<EstateDTO> tableModel; public EstatesView() { super(VIEW_TITLE, "BookingPoView"); } @Override protected Widget createContent() { FlexTable layout = new FlexTable(); layout.setWidth("100%"); layout.setWidget(0, 0, getHeaderWidget()); layout.setWidget(1, 0, getLineTableRowWidget()); layout.setWidget(2, 0, getBottomWidget()); return layout; } private Widget getHeaderWidget() { FlexTable widget = new FlexTable(); widget.setHTML(0, 0, DashboardMessages.MSG.office()); officesLB = new ListBox(); officesLB.setWidth("250px"); widget.setWidget(0, 1, officesLB); widget.setHTML(0, 2, DashboardMessages.MSG.broker()); brokersLB = new ListBox(); brokersLB.setWidth("250px"); widget.setWidget(0, 3, brokersLB); widget.setHTML(0, 4, DashboardMessages.MSG.userStatus()); estateStatusLB = new ListBox(); for (EstateStatusSearchType status : EstateStatusSearchType.values()) { estateStatusLB.addItem(status.getTitle(), "" + status.getId()); } widget.setWidget(0, 5, estateStatusLB); findButton = new Button(); findButton.setText(BaseMessages.MSG.find()); widget.setWidget(0, 6, findButton); return widget; } private Widget getLineTableRowWidget() { EstateDTO example = new EstateDTO(); IGwtEntityCM META = new EstateCM(); tableModel = new AbstractMetaGwtTableModel<EstateDTO>(example, META); table = new GwtTable(tableModel, false, true, "yyy"); // TODO WTF - a 4o na zction table.addEnumRenderer(4, new EstateStatusTypeRenderer()); table.addEntityListRenderer(12, new ViewingListRenderer()); table.setEditImageResource(BaseImages.IMG.editSmall()); table.setViewPortHeight(VIEW_PORT_HEIGHT); return table; } @Override protected String getPrefferedWidth() { return VIEW_WIDTH; } private Widget getBottomWidget() { FlexTable widget = new FlexTable(); // addNewButton = new Button(); // addNewButton.setText(DashboardTRL.msg.menuAddUser()); // TODO // widget.setWidget(0, 0, addNewButton); return widget; } @Override public void setDataRequested() { tableModel.setRequesting(); } @Override public void setData(ArrayList<EstateDTO> data) { tableModel.setObjects(data); } @Override public HasClickHandlers getFindButton() { return findButton; } @Override public EstateSearchWrapper getEstateSearchWrapper() { EstateSearchWrapper wrapper = new EstateSearchWrapper(); wrapper.setStatusSearchTypeId(BaseListBoxUtils.getSelectedValueAsInteger(estateStatusLB)); Integer oId = BaseListBoxUtils.getSelectedValueAsInteger(officesLB); if (oId != null && oId > 0) wrapper.setOfficeId(oId); Integer bId = BaseListBoxUtils.getSelectedValueAsInteger(brokersLB); if (bId != null && bId > 0) wrapper.setBrokerId(bId); return wrapper; } @Override public void setEstateSearchWrapper(EstateSearchWrapper wrapper) { if (wrapper.getStatusSearchTypeId() != null) BaseListBoxUtils.setSelectedItemByValue(estateStatusLB, "" + wrapper.getStatusSearchTypeId()); } @Override public void setOfficesData(ArrayList<ListBoxDTO> data) { BaseListBoxUtils.setItemsToLB(officesLB, data); } @Override public void setOfficesNA() { BaseListBoxUtils.setItemsNAToLB(officesLB); } @Override public HasChangeHandlers getOfficesChange() { return officesLB; } @Override public void setBrokersNA() { BaseListBoxUtils.setItemsNAToLB(brokersLB); } @Override public HasChangeHandlers getBrokerChange() { return brokersLB; } @Override public HasChangeHandlers getStatusChange() { return estateStatusLB; } @Override public void setBrokersData(ArrayList<ListBoxDTO> data) { BaseListBoxUtils.setItemsToLB(brokersLB, data); } }