Java Code Examples for com.smartgwt.client.widgets.layout.HLayout#setWidth100()
The following examples show how to use
com.smartgwt.client.widgets.layout.HLayout#setWidth100() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StatusBar.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public StatusBar(boolean includeIcons) { setHeight(20); setWidth100(); setMembersMargin(2); setStyleName("footer"); HLayout events = EventPanel.get(); events.setWidth100(); addMember(events); if (includeIcons) addMember(StatusBarIcons.get()); }
Example 2
Source File: ArchiveDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public ArchiveDetailsPanel(ExportArchivesList list, long archiveId, boolean readonly) { super(); this.archiveId = archiveId; this.readonly = readonly; this.archivesList = list; setHeight100(); setWidth100(); setMembersMargin(10); tabSet = new TabSet(); tabSet.setTabBarPosition(Side.TOP); tabSet.setTabBarAlign(Side.LEFT); tabSet.setWidth100(); tabSet.setHeight100(); Tab versionsTab = new Tab(I18N.message("documents")); versionsTabPanel = new HLayout(); versionsTabPanel.setWidth100(); versionsTabPanel.setHeight100(); versionsTab.setPane(versionsTabPanel); tabSet.addTab(versionsTab); addMember(tabSet); refresh(); }
Example 3
Source File: UpdatePanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
protected void prepareTabs() { propertiesTab = new Tab(I18N.message("properties")); propertiesTabPanel = new HLayout(); propertiesTabPanel.setWidth100(); propertiesTabPanel.setHeight100(); propertiesTab.setPane(propertiesTabPanel); extendedPropertiesTab = new Tab(I18N.message("propertiesext")); extendedPropertiesTabPanel = new HLayout(); extendedPropertiesTabPanel.setWidth100(); extendedPropertiesTabPanel.setHeight100(); extendedPropertiesTab.setPane(extendedPropertiesTabPanel); ocrTab = new Tab(I18N.message("ocr")); ocrTabPanel = new HLayout(); ocrTabPanel.setWidth100(); ocrTabPanel.setHeight100(); ocrTab.setPane(ocrTabPanel); retentionPoliciesTab = new Tab(I18N.message("publishing")); retentionPoliciesTabPanel = new HLayout(); retentionPoliciesTabPanel.setWidth100(); retentionPoliciesTabPanel.setHeight100(); retentionPoliciesTab.setPane(retentionPoliciesTabPanel); notificationTab = new Tab(I18N.message("notifyusers")); notificationTabPanel = new HLayout(); notificationTabPanel.setWidth100(); notificationTabPanel.setHeight100(); notificationTab.setPane(notificationTabPanel); }
Example 4
Source File: FillForm.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public FillForm(GUIDocument frm) { setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("form") + " - " + Util.getBaseName(frm.getFileName())); setWidth(500); setHeight(400); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); IButton save = new IButton(); save.setTitle(I18N.message("save")); save.setAutoFit(true); save.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { onSave(); } }); HLayout buttonsBar = new HLayout(); buttonsBar.setWidth100(); buttonsBar.setHeight(25); buttonsBar.setMembers(save); propertiesPanel = new ExtendedPropertiesPanel(frm, null, true, true, false); VLayout layout = new VLayout(); layout.setMargin(3); layout.setMembersMargin(3); layout.setMembers(propertiesPanel, buttonsBar); addItem(layout); }
Example 5
Source File: DigitalObjectEditor.java From proarc with GNU General Public License v3.0 | 5 votes |
public DigitalObjectEditor(ClientMessages i18n, PlaceController places, boolean embedded) { this.i18n = i18n; this.places = places; this.editorCache = new EnumMap<DatastreamEditorType, EditorDescriptor>(DatastreamEditorType.class); this.widget = new VLayout(); this.lblHeader = new Label(); lblHeader.setAutoHeight(); lblHeader.setPadding(4); lblHeader.setStyleName(Editor.CSS_PANEL_DESCRIPTION_TITLE); this.actionSource = new ActionSource(this); this.embeddedView = embedded; this.toolbar = Actions.createToolStrip(); this.editorContainer = new VLayout(); editorContainer.setLayoutMargin(4); editorContainer.setWidth100(); editorContainer.setHeight100(); widget.addMember(lblHeader); widget.addMember(toolbar); if (embedded) { widget.addMember(editorContainer); } else { editorContainer.setResizeBarTarget("next"); HLayout multiView = new HLayout(); multiView.setWidth100(); multiView.setHeight100(); multiView.setLayoutMargin(4); multiView.addMember(editorContainer); initOptionalEditor(multiView); widget.addMember(multiView); } }
Example 6
Source File: SyndicationDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public SyndicationDetailsPanel(SyndicationsPanel syndicationsPanel) { super(); this.syndicationsPanel = syndicationsPanel; setHeight100(); setWidth100(); setMembersMargin(10); tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { if (syndication.getId() != 0) { SyndicationService.Instance.get().getSyndication(syndication.getId(), new AsyncCallback<GUISyndication>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUISyndication share) { setSyndication(share); } }); } else { GUISyndication newSyndication = new GUISyndication(); setSyndication(newSyndication); } tabSet.hideSave(); } }); Tab propertiesTab = new Tab(I18N.message("properties")); standardTabPanel = new HLayout(); standardTabPanel.setWidth100(); standardTabPanel.setHeight100(); propertiesTab.setPane(standardTabPanel); tabSet.addTab(propertiesTab); addMember(tabSet); }
Example 7
Source File: ImportFolderDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public ImportFolderDetailsPanel(ImportFoldersPanel foldersPanel) { super(); this.foldersPanel = foldersPanel; setHeight100(); setWidth100(); setMembersMargin(10); tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { if (importFolder.getId() != 0) { ImportFolderService.Instance.get().getImportFolder(importFolder.getId(), new AsyncCallback<GUIImportFolder>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIImportFolder share) { setShare(share); } }); } else { GUIImportFolder newshare = new GUIImportFolder(); newshare.setProvider(importFolder.getProvider()); setShare(newshare); } tabSet.hideSave(); } } ); Tab propertiesTab = new Tab(I18N.message("properties")); standardTabPanel = new HLayout(); standardTabPanel.setWidth100(); standardTabPanel.setHeight100(); propertiesTab.setPane(standardTabPanel); tabSet.addTab(propertiesTab); Tab extendedPropertiesTab = new Tab(I18N.message("propertiesext")); advancedTabPanel = new HLayout(); advancedTabPanel.setWidth100(); advancedTabPanel.setHeight100(); extendedPropertiesTab.setPane(advancedTabPanel); tabSet.addTab(extendedPropertiesTab); addMember(tabSet); }
Example 8
Source File: ImportDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public ImportDetailsPanel(GUIArchive archive, ImportArchivesList listPanel) { super(); this.listPanel = listPanel; this.archive = archive; setHeight100(); setWidth100(); setMembersMargin(10); tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { ImpexService.Instance.get().load(getArchive().getId(), new AsyncCallback<GUIArchive>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIArchive archive) { setArchive(archive); tabSet.hideSave(); } }); } }); Tab versionsTab = new Tab(I18N.message("settings")); settingsTabPanel = new HLayout(); settingsTabPanel.setWidth100(); settingsTabPanel.setHeight100(); versionsTab.setPane(settingsTabPanel); tabSet.addTab(versionsTab); addMember(tabSet); refresh(); }
Example 9
Source File: DocumentDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
protected void prepareTabs() { propertiesTab = new Tab(I18N.message("properties")); propertiesTabPanel = new HLayout(); propertiesTabPanel.setWidth100(); propertiesTabPanel.setHeight100(); propertiesTab.setPane(propertiesTabPanel); extendedPropertiesTab = new Tab(I18N.message("propertiesext")); extendedPropertiesTabPanel = new HLayout(); extendedPropertiesTabPanel.setWidth100(); extendedPropertiesTabPanel.setHeight100(); extendedPropertiesTab.setPane(extendedPropertiesTabPanel); linksTab = new Tab(I18N.message("links")); linksTabPanel = new HLayout(); linksTabPanel.setWidth100(); linksTabPanel.setHeight100(); linksTab.setPane(linksTabPanel); notesTab = new Tab(I18N.message("notes")); notesTabPanel = new HLayout(); notesTabPanel.setWidth100(); notesTabPanel.setHeight100(); notesTab.setPane(notesTabPanel); versionsTab = new Tab(I18N.message("versions")); versionsTabPanel = new HLayout(); versionsTabPanel.setWidth100(); versionsTabPanel.setHeight100(); versionsTab.setPane(versionsTabPanel); historyTab = new Tab(I18N.message("history")); historyTabPanel = new HLayout(); historyTabPanel.setWidth100(); historyTabPanel.setHeight100(); historyTab.setPane(historyTabPanel); signatureTab = new Tab(I18N.message("signature")); signatureTabPanel = new HLayout(); signatureTabPanel.setWidth100(); signatureTabPanel.setHeight100(); signatureTab.setPane(signatureTabPanel); aliasesTab = new Tab(I18N.message("aliases")); aliasesTab.setID(ID_TAB_ALIASES); aliasesTabPanel = new HLayout(); aliasesTabPanel.setWidth100(); aliasesTabPanel.setHeight100(); aliasesTab.setPane(aliasesTabPanel); previewTab = new Tab(I18N.message("preview")); previewTabPanel = new HLayout(); previewTabPanel.setWidth100(); previewTabPanel.setHeight100(); previewTab.setPane(previewTabPanel); retentionPoliciesTab = new Tab(I18N.message("publishing")); retentionPoliciesTabPanel = new HLayout(); retentionPoliciesTabPanel.setWidth100(); retentionPoliciesTabPanel.setHeight100(); retentionPoliciesTab.setPane(retentionPoliciesTabPanel); ocrTab = new Tab(I18N.message("ocr")); ocrTabPanel = new HLayout(); ocrTabPanel.setWidth100(); ocrTabPanel.setHeight100(); ocrTab.setPane(ocrTabPanel); calendarTab = new Tab(I18N.message("calendar")); calendarTabPanel = new HLayout(); calendarTabPanel.setWidth100(); calendarTabPanel.setHeight100(); calendarTab.setPane(calendarTabPanel); subscriptionsTab = new Tab(I18N.message("subscriptions")); subscriptionsTab.setID(ID_TAB_SUBSCRIPTIONS); subscriptionsTabPanel = new HLayout(); subscriptionsTabPanel.setWidth100(); subscriptionsTabPanel.setHeight100(); subscriptionsTab.setPane(subscriptionsTabPanel); }
Example 10
Source File: DocumentsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void onDraw() { if (initialized) return; // Register to folders events FolderController.get().addObserver(this); // Register to documents events DocumentController.get().addObserver(this); // Initialize the listing panel as placeholder listingPanel = new Label(" " + I18N.message("selectfolder")); listing.setAlign(Alignment.CENTER); listing.setHeight("51%"); listing.setShowResizeBar(true); listing.addMember(listingPanel); // Add a details panel under the listing one detailPanel = new Label(" " + I18N.message("selectfolderordoc")); details.setAlign(Alignment.CENTER); details.addMember(detailPanel); // The two rows: listing and details VLayout listingAndDetails = new VLayout(); listingAndDetails.setMembers(listing, details); listingAndDetails.setShowResizeBar(true); listingAndDetails.setResizeBarTarget("next"); previewPanel = new DocumentsPreviewPanel(); // The listing plus the preview HLayout bodyPanel = new HLayout(); bodyPanel.setWidth100(); bodyPanel.setMembers(listingAndDetails, previewPanel); body.setMembers(DocumentToolbar.get(), bodyPanel); documentsMenu = new DocumentsMenu(); setMembers(documentsMenu, body); previewPanel.addVisibilityChangedHandler(new VisibilityChangedHandler() { @Override public void onVisibilityChanged(VisibilityChangedEvent event) { if (detailPanel instanceof DocumentDetailsPanel) previewPanel.setDocument(((DocumentDetailsPanel) detailPanel).getDocument()); } }); initialized = true; }
Example 11
Source File: EmailAccountDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public EmailAccountDetailsPanel(EmailAccountsPanel accountsPanel) { super(); this.accountsPanel = accountsPanel; setHeight100(); setWidth100(); setMembersMargin(10); tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { if (account.getId() != 0) { EmailAccountService.Instance.get().get(account.getId(), new AsyncCallback<GUIEmailAccount>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIEmailAccount account) { setAccount(account); } }); } else { setAccount(new GUIEmailAccount()); } tabSet.hideSave(); } }); Tab propertiesTab = new Tab(I18N.message("properties")); standardTabPanel = new HLayout(); standardTabPanel.setWidth100(); standardTabPanel.setHeight100(); propertiesTab.setPane(standardTabPanel); tabSet.addTab(propertiesTab); Tab extendedPropertiesTab = new Tab(I18N.message("propertiesext")); advancedTabPanel = new HLayout(); advancedTabPanel.setWidth100(); advancedTabPanel.setHeight100(); extendedPropertiesTab.setPane(advancedTabPanel); tabSet.addTab(extendedPropertiesTab); Tab filtersTab = new Tab(I18N.message("filters")); filtersTabPanel = new HLayout(); filtersTabPanel.setWidth100(); filtersTabPanel.setHeight100(); filtersTab.setPane(filtersTabPanel); tabSet.addTab(filtersTab); Tab automationTab = new Tab(I18N.message("automation")); automationTabPanel = new HLayout(); automationTabPanel.setWidth100(); automationTabPanel.setHeight100(); automationTab.setPane(automationTabPanel); tabSet.addTab(automationTab); addMember(tabSet); }
Example 12
Source File: AutomationTriggerDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public AutomationTriggerDetailsPanel(AutomationTriggersPanel foldersPanel) { super(); this.triggersPanel = foldersPanel; setHeight100(); setWidth100(); setMembersMargin(10); tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { if (trigger.getId() != 0) { AutomationService.Instance.get().getTrigger(trigger.getId(), new AsyncCallback<GUIAutomationTrigger>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIAutomationTrigger trigger) { setTrigger(trigger); } }); } else { GUIAutomationTrigger newTrigger = new GUIAutomationTrigger(); setTrigger(newTrigger); } tabSet.hideSave(); } }); Tab propertiesTab = new Tab(I18N.message("properties")); standardTabPanel = new HLayout(); standardTabPanel.setWidth100(); standardTabPanel.setHeight100(); propertiesTab.setPane(standardTabPanel); tabSet.addTab(propertiesTab); addMember(tabSet); }
Example 13
Source File: ReportDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public ReportDetailsPanel(CustomReportsPanel reportsPanel) { super(); this.reportsPanel = reportsPanel; setHeight100(); setWidth100(); setMembersMargin(10); tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { if (report.getId() != 0) { ReportService.Instance.get().getReport(report.getId(), true, new AsyncCallback<GUIReport>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIReport report) { setReport(report); } }); } else { GUIReport newreport = new GUIReport(); setReport(newreport); } tabSet.hideSave(); } }); Tab propertiesTab = new Tab(I18N.message("properties")); standardTabPanel = new HLayout(); standardTabPanel.setWidth100(); standardTabPanel.setHeight100(); propertiesTab.setPane(standardTabPanel); tabSet.addTab(propertiesTab); Tab logTab = new Tab(I18N.message("log")); logTabPanel = new HLayout(); logTabPanel.setWidth100(); logTabPanel.setHeight100(); logTab.setPane(logTabPanel); tabSet.addTab(logTab); addMember(tabSet); }
Example 14
Source File: TaskDetailPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void onDraw() { tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { SystemService.Instance.get().getTaskByName(task.getName(), I18N.getLocale(), new AsyncCallback<GUITask>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUITask task) { setTask(task); tabSet.hideSave(); } }); } } ); Tab schedulingTab = new Tab(I18N.message("scheduling")); schedulingTabPanel = new HLayout(); schedulingTabPanel.setWidth100(); schedulingTabPanel.setHeight100(); schedulingTab.setPane(schedulingTabPanel); Tab notificationTab = new Tab(I18N.message("notifications")); notificationTabPanel = new HLayout(); notificationTabPanel.setWidth100(); notificationTabPanel.setHeight100(); if (Feature.enabled(Feature.TASK_REPORT_NOTIFICATION)) notificationTab.setPane(notificationTabPanel); else notificationTab.setPane(new FeatureDisabled()); Tab logTab = new Tab(I18N.message("log")); logTabPanel = new HLayout(); logTabPanel.setWidth100(); logTabPanel.setHeight100(); logTab.setPane(logTabPanel); if (Session.get().isDefaultTenant()) { if (Feature.visible(Feature.TASK_REPORT_NOTIFICATION)) tabSet.setTabs(schedulingTab, notificationTab, logTab); else tabSet.setTabs(schedulingTab, logTab); } else { tabSet.setTabs(logTab); } addMember(tabSet); refresh(); }
Example 15
Source File: CreateAliasDialog.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public CreateAliasDialog() { super(); setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("createalias")); setWidth(470); setHeight(280); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); setPadding(3); VLayout content = new VLayout(); content.setTop(10); content.setWidth100(); content.setHeight100(); content.setMembersMargin(3); final TreeGrid folders = new FolderTree(); folders.setWidth100(); folders.setHeight100(); HLayout buttons = new HLayout(); buttons.setWidth100(); buttons.setHeight(30); Button create = new Button(I18N.message("create")); create.setAutoFit(true); create.setMargin(1); create.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { FolderNavigator.get().createAlias( Long.parseLong(folders.getSelectedRecord().getAttributeAsString("folderId"))); destroy(); } }); buttons.setMembers(create); content.setMembers(folders, buttons); addItem(content); }
Example 16
Source File: RetentionPolicyDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
private void refresh() { /* * Prepare the standard properties tab */ if (tabSet != null) { tabSet.hideSave(); removeMember(tabSet); } tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { if (policy.getId() != 0) { RetentionPoliciesService.Instance.get().getPolicy(policy.getId(), new AsyncCallback<GUIRetentionPolicy>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIRetentionPolicy policy) { setPolicy(policy); } }); } else { GUIRetentionPolicy newsPolicy = new GUIRetentionPolicy(); setPolicy(newsPolicy); } tabSet.hideSave(); } }); Tab propertiesTab = new Tab(I18N.message("properties")); propertiesTabPanel = new HLayout(); propertiesTabPanel.setWidth100(); propertiesTabPanel.setHeight100(); propertiesTab.setPane(propertiesTabPanel); tabSet.addTab(propertiesTab); addMember(tabSet); ChangedHandler changedHandler = new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { onModified(); } }; form = new DynamicForm(); form.setNumCols(2); form.setTitleOrientation(TitleOrientation.TOP); TextItem name = ItemFactory.newSimpleTextItem("name", "name", policy.getName()); name.addChangedHandler(changedHandler); name.setWidth(200); name.setRequired(true); IntegerItem days = ItemFactory.newIntegerItem("days", "retentiondays", policy.getRetentionDays()); days.addChangedHandler(changedHandler); days.setWidth(100); days.setRequired(true); SelectItem dateOption = ItemFactory.newRetentionDateOption(policy.getDateOption()); dateOption.addChangedHandler(changedHandler); SelectItem template = ItemFactory.newTemplateSelector(true, policy.getTemplateId()); template.addChangedHandler(changedHandler); folder = new FolderSelector(null, true); folder.setFolder(policy.getFolderId(), policy.getFolderName()); folder.addFolderChangeListener(RetentionPolicyDetailsPanel.this); SelectItem action = ItemFactory.newRetentionAction(policy.getAction()); action.addChangedHandler(changedHandler); form.setItems(name, days, dateOption, template, action, folder); propertiesTab.setPane(form); }
Example 17
Source File: Editor.java From proarc with GNU General Public License v3.0 | 4 votes |
@Override public void onModuleLoad() { INSTANCE = this; initLogging(); ClientUtils.info(LOG, "onModuleLoad:\n module page: %s\n host page: %s" + "\n getModuleName: %s\n getPermutationStrongName: %s\n version: %s" + "\n Page.getAppDir: %s, \n Locale: %s", GWT.getModuleBaseURL(), GWT.getHostPageBaseURL(), GWT.getModuleName(), GWT.getPermutationStrongName(), GWT.getVersion(), Page.getAppDir(), LanguagesDataSource.activeLocale() ); // remove the loading wrapper. See index.html DOM.getElementById("loadingWrapper").removeFromParent(); I18nUtil.initMessages(ClientUtils.createSmartGwtMessages()); i18n = GWT.create(ClientMessages.class); errorHandler = new ErrorHandler(); errorHandler.initTransportErrorHandler(); LoginWindow.login(); presenterFactory = new PresenterFactory(i18n); editorWorkFlow = new EditorWorkFlow(getDisplay(), presenterFactory, i18n); presenterFactory.setPlaceController(editorWorkFlow.getPlaceController()); final TreeGrid menu = createMenu(); sweepTask = new SweepTask() { @Override public void processing() { SC.clearPrompt(); TreeNode[] menuContent = createMenuContent(); Tree tree = menu.getTree(); TreeNode root = tree.getRoot(); tree.addList(menuContent, root); tree.openAll(); editorWorkFlow.init(); } }; final HLayout mainLayout = new HLayout(); // mainLayout.setLayoutMargin(5); mainLayout.setWidth100(); mainLayout.setHeight100(); mainLayout.setMembers(getDisplay()); Canvas mainHeader = createMainHeader(menu); VLayout desktop = new VLayout(0); desktop.setWidth100(); desktop.setHeight100(); desktop.setMembers(mainHeader, mainLayout); desktop.draw(); SC.showPrompt(i18n.Editor_InitialLoading_Msg()); LocalizationDataSource.getInstance().initOnStart(sweepTask.expect()); ValueMapDataSource.getInstance().initOnStart(sweepTask.expect()); loadPermissions(); }
Example 18
Source File: TemplateDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public TemplateDetailsPanel(TemplatesPanel panel) { super(); this.templatesPanel = panel; setHeight100(); setWidth100(); setMembersMargin(10); Button saveButton = new Button(I18N.message("save")); saveButton.setAutoFit(true); saveButton.setMargin(2); saveButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }); saveButton.setLayoutAlign(VerticalAlignment.CENTER); HTMLPane spacer = new HTMLPane(); spacer.setContents("<div> </div>"); spacer.setWidth("70%"); spacer.setOverflow(Overflow.HIDDEN); tabSet = new EditingTabSet(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { if (template.getId() != 0) { TemplateService.Instance.get().getTemplate(template.getId(), new AsyncCallback<GUITemplate>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUITemplate template) { setTemplate(template); } }); } else { setTemplate(new GUITemplate()); } } }); tabSet.setTabBarPosition(Side.TOP); tabSet.setTabBarAlign(Side.LEFT); tabSet.setWidth100(); tabSet.setHeight100(); Tab propertiesTab = new Tab(I18N.message("properties")); propertiesTabPanel = new HLayout(); propertiesTabPanel.setWidth100(); propertiesTabPanel.setHeight100(); propertiesTab.setPane(propertiesTabPanel); tabSet.addTab(propertiesTab); addMember(tabSet); }
Example 19
Source File: TaskDetailsDialog.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public TaskDetailsDialog(final WorkflowDashboard dashboard, GUIWorkflow wfl, boolean readOnly) { this.workflow = wfl; this.workflowDashboard = dashboard; this.readOnly = readOnly; setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("workflow")); setWidth(700); setHeight(420); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); addCloseClickHandler(new CloseClickHandler() { @Override public void onCloseClick(CloseClickEvent event) { workflowDashboard.refresh(); destroy(); } }); tabs = new TabSet(); tabs.setWidth100(); tabs.setHeight100(); workflowTab = new Tab(I18N.message("workflow")); tabs.addTab(workflowTab, 0); buttonsPanel = new VLayout(); mainPanel = new HLayout(); mainPanel.setMembersMargin(5); mainPanel.setMembers(tabs, buttonsPanel); addItem(mainPanel); form = new HLayout(25); form.setMargin(20); form.setWidth100(); form.setHeight100(); sxLayout = new VLayout(10); appendedDocsPanel = new VLayout(5); appendedDocsPanel.setMargin(5); notesPanel = new VLayout(5); notesPanel.setMargin(5); reload(wfl); }
Example 20
Source File: SearchPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void onDraw() { if (drawn) return; drawn = true; // Prepare the collapsable menu SearchMenu searchMenu = SearchMenu.get(); searchMenu.setWidth(350); searchMenu.setShowResizeBar(true); // Initialize the listing panel as placeholder listingPanel = new HitsListPanel(); listing.setAlign(Alignment.CENTER); listing.setHeight("51%"); listing.setShowResizeBar(true); listing.addMember(listingPanel); // Add a details panel under the listing one detailPanel = new Label(" " + I18N.message("selectahit")); details.setAlign(Alignment.CENTER); details.addMember(detailPanel); // The two rows: listing and details VLayout listingAndDetails = new VLayout(); listingAndDetails.setMembers(listing, details); listingAndDetails.setShowResizeBar(true); listingAndDetails.setResizeBarTarget("next"); previewPanel = new SearchPreviewPanel(); previewPanel.addVisibilityChangedHandler(new VisibilityChangedHandler() { @Override public void onVisibilityChanged(VisibilityChangedEvent event) { if (detailPanel instanceof DocumentDetailsPanel) previewPanel.setDocument(((DocumentDetailsPanel) detailPanel).getDocument()); } }); // The listing plus the preview HLayout bodyPanel = new HLayout(); bodyPanel.setWidth100(); bodyPanel.setMembers(listingAndDetails, previewPanel); body.setMembers(new SearchToolbar(listingPanel), bodyPanel); setMembers(searchMenu, body); }