List of usage examples for com.google.gwt.user.client.ui FlexTable FlexTable
public FlexTable()
From source file:com.ikon.frontend.client.widget.popup.CategoriesPopup.java
License:Open Source License
/** * CategoriesPopup/*from w ww. j a v a2 s . c o m*/ */ public CategoriesPopup() { // Establishes auto-close when click outside super(false, true); setText(Main.i18n("category.add")); // Status status = new Status(this); status.setStyleName("okm-StatusPopup"); table = new FlexTable(); tableSubscribedCategories = new FlexTable(); assignedCategories = new ArrayList<GWTFolder>(); cellFormatter = table.getCellFormatter(); // Gets the cell formatter table.setWidth("100%"); table.setCellPadding(0); table.setCellSpacing(2); // Categories vPanel = new VerticalPanel(); vPanel.setWidth("470"); vPanel.setHeight("175"); scrollDirectoryPanel = new ScrollPanel(); scrollDirectoryPanel.setSize("460", "150"); scrollDirectoryPanel.setStyleName("okm-Popup-text"); verticalDirectoryPanel = new VerticalPanel(); verticalDirectoryPanel.setSize("100%", "100%"); folderSelectTree = new FolderSelectTree(); folderSelectTree.setSize("100%", "100%"); verticalDirectoryPanel.add(folderSelectTree); scrollDirectoryPanel.add(verticalDirectoryPanel); add = new Button(Main.i18n("button.add"), new ClickHandler() { @Override public void onClick(ClickEvent event) { addCategory(folderSelectTree.getCategory()); } }); add.setEnabled(false); close = new Button(Main.i18n("button.close"), new ClickHandler() { @Override public void onClick(ClickEvent event) { if (Main.get().mainPanel.desktop.browser.fileBrowser.isMassive()) { Main.get().mainPanel.topPanel.toolBar.executeRefresh(); } hide(); } }); vPanel.add(scrollDirectoryPanel); HorizontalPanel hPanel = new HorizontalPanel(); hPanel.add(close); hPanel.add(new HTML(" ")); hPanel.add(add); vPanel.add(hPanel); vPanel.setCellHorizontalAlignment(scrollDirectoryPanel, HasAlignment.ALIGN_CENTER); vPanel.setCellHorizontalAlignment(hPanel, HasAlignment.ALIGN_CENTER); vPanel.setCellVerticalAlignment(hPanel, HasAlignment.ALIGN_MIDDLE); vPanel.setCellHeight(scrollDirectoryPanel, "150"); vPanel.setCellHeight(hPanel, "25"); table.setWidget(0, 0, vPanel); table.getFlexCellFormatter().setColSpan(1, 0, 2); cellFormatter.setHorizontalAlignment(1, 0, HasAlignment.ALIGN_CENTER); table.setHTML(1, 0, " <b>" + Main.i18n("document.categories") + "</b>"); table.getFlexCellFormatter().setColSpan(2, 0, 2); cellFormatter.setHorizontalAlignment(2, 0, HasAlignment.ALIGN_LEFT); table.setWidget(2, 0, tableSubscribedCategories); table.getFlexCellFormatter().setColSpan(3, 0, 2); cellFormatter.setHorizontalAlignment(3, 0, HasAlignment.ALIGN_LEFT); setRowWordWarp(0, 0, true, tableSubscribedCategories); table.setStyleName("okm-DisableSelect"); close.setStyleName("okm-NoButton"); add.setStyleName("okm-AddButton"); tableSubscribedCategories.setStyleName("okm-DisableSelect"); // Resets to initial tree value folderSelectTree.reset(); setWidget(table); }
From source file:com.ikon.frontend.client.widget.popup.KeywordsPopup.java
License:Open Source License
/** * KeywordsPopup/*from w ww .j a v a2s . co m*/ */ public KeywordsPopup() { // Establishes auto-close when click outside super(false, true); setText(Main.i18n("keyword.add")); // Status status = new Status(this); status.setStyleName("okm-StatusPopup"); table = new FlexTable(); table.setWidth("100%"); table.setCellPadding(0); table.setCellSpacing(2); cellFormatter = table.getCellFormatter(); // Gets the cell formatter docKeywords = new ArrayList<String>(); keywordMap = new HashMap<String, Widget>(); keyWordsListPending = new ArrayList<String>(); keywordsCloud = new TagCloud(); keywordsCloud.setWidth("350"); keywordPanel = new HorizontalPanel(); multiWordkSuggestKey = new MultiWordSuggestOracle(); keywordList = new ArrayList<String>(); suggestKey = new SuggestBox(multiWordkSuggestKey); suggestKey.setHeight("20"); suggestKey.setText(Main.i18n("dashboard.keyword.suggest")); suggestKey.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { if ((char) KeyCodes.KEY_ENTER == event.getNativeKeyCode() && keyWordsListPending.isEmpty()) { Main.get().mainPanel.enableKeyShorcuts(); // Enables general // keys // applications String keys[] = suggestKey.getText().split(" "); // Separates // keywords // by // space for (int i = 0; i < keys.length; i++) { keyWordsListPending.add(keys[i]); } addPendingKeyWordsList(); suggestKey.setText(""); } } }); suggestKey.getTextBox().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (suggestKey.getText().equals(Main.i18n("dashboard.keyword.suggest"))) { suggestKey.setText(""); } Main.get().mainPanel.disableKeyShorcuts(); // Disables key // shortcuts while // updating } }); suggestKey.getTextBox().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (suggestKey.getText().equals(Main.i18n("dashboard.keyword.suggest"))) { suggestKey.setText(""); } } }); suggestKey.getTextBox().addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { if (!keyShortcutsEnabled) { Main.get().mainPanel.enableKeyShorcuts(); // Enables general // keys // applications keyShortcutsEnabled = true; } } }); thesaurusImage = new Image(OKMBundleResources.INSTANCE.bookOpenIcon()); thesaurusImage.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Main.get().mainPanel.desktop.navigator.thesaurusTree.thesaurusSelectPopup .show(ThesaurusSelectPopup.MASSIVE); } }); VerticalPanel vPanel = new VerticalPanel(); HorizontalPanel hPanel = new HorizontalPanel(); hPanel.add(suggestKey); hPanel.add(new HTML(" ")); hPanel.add(thesaurusImage); hKeyPanel = new FlowPanel(); HTML space = new HTML(""); vPanel.add(hPanel); vPanel.add(space); vPanel.add(hKeyPanel); close = new Button(Main.i18n("button.close"), new ClickHandler() { @Override public void onClick(ClickEvent event) { if (Main.get().mainPanel.desktop.browser.fileBrowser.isMassive()) { Main.get().mainPanel.topPanel.toolBar.executeRefresh(); Main.get().mainPanel.dashboard.keyMapDashboard.refreshAll(); } Main.get().mainPanel.enableKeyShorcuts(); hide(); } }); close.setStyleName("okm-NoButton"); hKeyPanel.setWidth("250"); vPanel.setCellHeight(space, "5"); keywordPanel.add(vPanel); table.setHTML(0, 0, "<b>" + Main.i18n("document.keywords") + "</b>"); table.setWidget(0, 1, keywordPanel); cellFormatter.setVerticalAlignment(0, 0, HasAlignment.ALIGN_TOP); table.setHTML(1, 0, ""); table.getFlexCellFormatter().setHeight(1, 0, "5"); table.setHTML(2, 0, "<b>" + Main.i18n("document.keywords.cloud") + "</b>"); table.getFlexCellFormatter().setColSpan(2, 0, 2); table.setWidget(3, 0, keywordsCloud); table.getFlexCellFormatter().setColSpan(3, 0, 2); cellFormatter.setHorizontalAlignment(3, 0, HasAlignment.ALIGN_LEFT); table.setWidget(4, 0, close); table.getFlexCellFormatter().setColSpan(4, 0, 2); cellFormatter.setHorizontalAlignment(4, 0, HasAlignment.ALIGN_CENTER); table.setStyleName("okm-DisableSelect"); suggestKey.setStyleName("okm-KeyMap-Suggest"); suggestKey.addStyleName("okm-Input"); hKeyPanel.setStylePrimaryName("okm-cloudWrap"); keywordsCloud.setStylePrimaryName("okm-cloudWrap"); thesaurusImage.addStyleName("okm-Hyperlink"); setWidget(table); }
From source file:com.ikon.frontend.client.widget.popup.OmrPopup.java
License:Open Source License
/** * OmrPopup popup//w ww . jav a 2s .c o m */ public OmrPopup() { // Establishes auto-close when click outside super(false, true); setText(Main.i18n("omr.label")); table = new FlexTable(); table.setCellSpacing(0); table.setCellPadding(4); // Status status = new Status(this); status.setStyleName("okm-StatusPopup"); templateNameText = new HTML("omr.template.name"); listBox = new ListBox(); listBox.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent arg0) { if (listBox.getSelectedIndex() > 0) { executeButton.setEnabled(true); } else { executeButton.setEnabled(false); } } }); listBox.setStyleName("okm-Select"); cancelButton = new Button(Main.i18n("button.cancel"), new ClickHandler() { @Override public void onClick(ClickEvent event) { if (Main.get().mainPanel.desktop.browser.fileBrowser.isMassive()) { Main.get().mainPanel.topPanel.toolBar.executeRefresh(); } hide(); } }); cancelButton.setStyleName("okm-NoButton"); executeButton = new Button(Main.i18n("button.execute"), new ClickHandler() { @Override public void onClick(ClickEvent event) { process(); } }); executeButton.setStyleName("okm-AddButton"); HorizontalPanel hPanel = new HorizontalPanel(); hPanel.add(cancelButton); hPanel.add(Util.hSpace("5")); hPanel.add(executeButton); hPanel.setCellHorizontalAlignment(cancelButton, VerticalPanel.ALIGN_CENTER); hPanel.setCellHorizontalAlignment(executeButton, VerticalPanel.ALIGN_CENTER); table.setWidget(0, 0, templateNameText); table.setWidget(0, 1, listBox); table.setWidget(1, 0, hPanel); table.getFlexCellFormatter().setColSpan(1, 0, 2); table.getFlexCellFormatter().setHorizontalAlignment(1, 0, HasAlignment.ALIGN_CENTER); super.hide(); setWidget(table); }
From source file:com.ikon.frontend.client.widget.popup.PropertyGroupPopup.java
License:Open Source License
/** * PropertyGroupPopup popup//from w ww . ja v a 2s . c o m */ public PropertyGroupPopup() { // Establishes auto-close when click outside super(false, true); setText(Main.i18n("group.label")); // Status status = new Status(this); status.setStyleName("okm-StatusPopup"); table = new FlexTable(); table.setCellPadding(4); table.setCellSpacing(0); table.setWidth("100%"); hPanel = new HorizontalPanel(); manager = new FormManager(); propertyGroupTable = manager.getTable(); propertyGroupTable.setWidth("100%"); cancel = new Button(Main.i18n("button.cancel"), new ClickHandler() { @Override public void onClick(ClickEvent event) { if (Main.get().mainPanel.desktop.browser.fileBrowser.isMassive()) { Main.get().mainPanel.topPanel.toolBar.executeRefresh(); } groupsLoaded = false; hide(); } }); add = new Button(Main.i18n("button.add"), new ClickHandler() { @Override public void onClick(ClickEvent event) { addGroup(); } }); listBox = new ListBox(); listBox.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent arg0) { if (listBox.getSelectedIndex() > 0) { add.setEnabled(true); } else { add.setEnabled(false); } } }); listBox.setStyleName("okm-Select"); HorizontalPanel grpNamePanel = new HorizontalPanel(); propertyGroupName = new HTML(""); grpNamePanel.add(propertyGroupName); grpNamePanel.setWidth("100%"); grpNamePanel.setCellHorizontalAlignment(propertyGroupName, HasAlignment.ALIGN_CENTER); cancel.setStyleName("okm-NoButton"); add.setStyleName("okm-AddButton"); add.setEnabled(false); hPanel.add(cancel); hPanel.add(new HTML(" ")); hPanel.add(add); hPanel.setCellHorizontalAlignment(cancel, VerticalPanel.ALIGN_CENTER); hPanel.setCellHorizontalAlignment(add, VerticalPanel.ALIGN_CENTER); table.setWidget(0, 0, listBox); table.setWidget(1, 0, grpNamePanel); table.setWidget(2, 0, propertyGroupTable); table.setWidget(3, 0, hPanel); table.getCellFormatter().setStyleName(1, 0, "okm-Security-Title"); table.getCellFormatter().addStyleName(1, 0, "okm-Security-Title-RightBorder"); table.getCellFormatter().setHorizontalAlignment(0, 0, HasAlignment.ALIGN_CENTER); table.getCellFormatter().setHorizontalAlignment(1, 0, HasAlignment.ALIGN_CENTER); table.getCellFormatter().setHorizontalAlignment(2, 0, HasAlignment.ALIGN_CENTER); table.getCellFormatter().setHorizontalAlignment(3, 0, HasAlignment.ALIGN_CENTER); super.hide(); setWidget(table); }
From source file:com.ikon.frontend.client.widget.properties.CategoryManager.java
License:Open Source License
/** * CategoryManager//from ww w.j a va 2s. c o m */ public CategoryManager(int origin) { this.origin = origin; tableSubscribedCategories = new FlexTable(); hPanelCategories = new HorizontalPanel(); categoriesText = new HTML("<b>" + Main.i18n("document.categories") + "</b>"); categoriesImage = new Image(OKMBundleResources.INSTANCE.tableKeyIcon()); categoriesImage.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Main.get().mainPanel.desktop.navigator.categoriesTree.categoriesSelectPopup.show(); } }); hPanelCategories.add(categoriesText); hPanelCategories.add(new HTML(" ")); hPanelCategories.add(categoriesImage); hPanelCategories.setCellVerticalAlignment(categoriesText, HasAlignment.ALIGN_MIDDLE); setRowWordWarp(0, 0, true, tableSubscribedCategories); tableSubscribedCategories.setStyleName("okm-DisableSelect"); categoriesImage.addStyleName("okm-Hyperlink"); categoriesImage.setVisible(false); }
From source file:com.ikon.frontend.client.widget.properties.Document.java
License:Open Source License
/** * Document//from ww w. j a va2 s .c om */ public Document() { categoryManager = new CategoryManager(CategoryManager.ORIGIN_DOCUMENT); keywordManager = new KeywordManager(ThesaurusSelectPopup.DOCUMENT_PROPERTIES); document = new GWTDocument(); table = new FlexTable(); tableProperties = new FlexTable(); tableSubscribedUsers = new FlexTable(); scrollPanel = new ScrollPanel(table); addButton = new Button(Main.i18n("Set")); deleteButton = new Button(Main.i18n("Delete")); tableProperties.setHTML(0, 0, "<b>" + Main.i18n("document.uuid") + "</b>"); tableProperties.setHTML(0, 1, ""); tableProperties.setHTML(1, 0, "<b>" + Main.i18n("document.name") + "</b>"); tableProperties.setHTML(1, 1, ""); tableProperties.setHTML(2, 0, "<b>" + Main.i18n("document.folder") + "</b>"); tableProperties.setHTML(3, 1, ""); tableProperties.setHTML(3, 0, "<b>" + Main.i18n("document.size") + "</b>"); tableProperties.setHTML(4, 1, ""); tableProperties.setHTML(4, 0, "<b>" + Main.i18n("document.created") + "</b>"); tableProperties.setHTML(5, 1, ""); tableProperties.setHTML(5, 0, "<b>" + Main.i18n("document.lastmodified") + "</b>"); tableProperties.setHTML(5, 1, ""); tableProperties.setHTML(6, 0, "<b>" + Main.i18n("document.mimetype") + "</b>"); tableProperties.setHTML(6, 1, ""); tableProperties.setHTML(7, 0, "<b>" + Main.i18n("document.keywords") + "</b>"); tableProperties.setHTML(7, 1, ""); tableProperties.setHTML(8, 0, "<b>" + Main.i18n("document.status") + "</b>"); tableProperties.setHTML(8, 1, ""); tableProperties.setHTML(9, 0, "<b>" + Main.i18n("document.subscribed") + "</b>"); tableProperties.setHTML(9, 1, ""); tableProperties.setHTML(10, 0, "<b>" + Main.i18n("document.history.size") + "</b>"); tableProperties.setHTML(10, 1, ""); tableProperties.setHTML(11, 0, "<b>" + "Document Expires on" + "</b>"); tableProperties.setWidget(11, 1, addButton); tableProperties.getCellFormatter().setVerticalAlignment(7, 0, HasAlignment.ALIGN_TOP); // Sets the tagcloud keywordManager.getKeywordCloud().setWidth("350"); VerticalPanel vPanel2 = new VerticalPanel(); hPanelSubscribedUsers = new HorizontalPanel(); subcribedUsersText = new HTML("<b>" + Main.i18n("document.subscribed.users") + "<b>"); hPanelSubscribedUsers.add(subcribedUsersText); hPanelSubscribedUsers.add(new HTML(" ")); hPanelSubscribedUsers.setCellVerticalAlignment(subcribedUsersText, HasAlignment.ALIGN_MIDDLE); vPanel2.add(hPanelSubscribedUsers); vPanel2.add(tableSubscribedUsers); HTML space2 = new HTML(""); vPanel2.add(space2); vPanel2.add(keywordManager.getKeywordCloudText()); vPanel2.add(keywordManager.getKeywordCloud()); HTML space3 = new HTML(""); vPanel2.add(space3); vPanel2.add(categoryManager.getPanelCategories()); vPanel2.add(categoryManager.getSubscribedCategoriesTable()); vPanel2.setCellHeight(space2, "10"); vPanel2.setCellHeight(space3, "10"); table.setWidget(0, 0, tableProperties); table.setHTML(0, 1, ""); table.setWidget(0, 2, vPanel2); // The hidden column extends table to 100% width CellFormatter cellFormatter = table.getCellFormatter(); cellFormatter.setWidth(0, 1, "25"); cellFormatter.setVerticalAlignment(0, 0, HasAlignment.ALIGN_TOP); cellFormatter.setVerticalAlignment(0, 2, HasAlignment.ALIGN_TOP); // Sets wordWrap for al rows for (int i = 0; i < 11; i++) { setRowWordWarp(i, 0, true, tableProperties); } setRowWordWarp(0, 0, true, tableSubscribedUsers); tableProperties.setStyleName("okm-DisableSelect"); tableSubscribedUsers.setStyleName("okm-DisableSelect"); addButton.setStyleName("okm-Button"); deleteButton.setStyleName("okm-Button"); initWidget(scrollPanel); }
From source file:com.ikon.frontend.client.widget.properties.Folder.java
License:Open Source License
/** * The folder/*from w w w . j a va2 s. c o m*/ */ public Folder() { folder = new GWTFolder(); categoryManager = new CategoryManager(CategoryManager.ORIGIN_FOLDER); keywordManager = new KeywordManager(ThesaurusSelectPopup.FOLDER_PROPERTIES); table = new FlexTable(); tableProperties = new FlexTable(); tableSubscribedUsers = new FlexTable(); scrollPanel = new ScrollPanel(table); tableProperties.setWidth("100%"); tableProperties.setHTML(0, 0, "<b>" + Main.i18n("folder.uuid") + "</b>"); tableProperties.setHTML(0, 1, ""); tableProperties.setHTML(1, 0, "<b>" + Main.i18n("folder.name") + "</b>"); tableProperties.setHTML(1, 1, ""); tableProperties.setHTML(2, 0, "<b>" + Main.i18n("folder.parent") + "</b>"); tableProperties.setHTML(2, 1, ""); tableProperties.setHTML(3, 0, "<b>" + Main.i18n("folder.created") + "</b>"); tableProperties.setHTML(3, 1, ""); tableProperties.setHTML(4, 0, "<b>" + Main.i18n("folder.subscribed") + "</b>"); tableProperties.setHTML(4, 1, ""); tableProperties.setHTML(5, 0, "<b>" + Main.i18n("folder.number.folders") + "</b>"); tableProperties.setHTML(5, 1, ""); tableProperties.setHTML(6, 0, "<b>" + Main.i18n("folder.number.documents") + "</b>"); tableProperties.setHTML(6, 1, ""); tableProperties.setHTML(7, 0, "<b>" + Main.i18n("folder.number.mails") + "</b>"); tableProperties.setHTML(7, 1, ""); tableProperties.setHTML(8, 0, "<b>" + Main.i18n("folder.keywords") + "</b>"); tableProperties.setHTML(8, 1, ""); tableProperties.getCellFormatter().setVerticalAlignment(8, 0, HasAlignment.ALIGN_TOP); // Sets the tagcloud keywordManager.getKeywordCloud().setWidth("350"); VerticalPanel vPanel2 = new VerticalPanel(); hPanelSubscribedUsers = new HorizontalPanel(); subcribedUsersText = new HTML("<b>" + Main.i18n("folder.subscribed.users") + "<b>"); hPanelSubscribedUsers.add(subcribedUsersText); hPanelSubscribedUsers.add(new HTML(" ")); hPanelSubscribedUsers.setCellVerticalAlignment(subcribedUsersText, HasAlignment.ALIGN_MIDDLE); vPanel2.add(hPanelSubscribedUsers); vPanel2.add(tableSubscribedUsers); HTML space2 = new HTML(""); vPanel2.add(space2); vPanel2.add(keywordManager.getKeywordCloudText()); vPanel2.add(keywordManager.getKeywordCloud()); HTML space3 = new HTML(""); vPanel2.add(space3); vPanel2.add(categoryManager.getPanelCategories()); vPanel2.add(categoryManager.getSubscribedCategoriesTable()); vPanel2.setCellHeight(space2, "10"); vPanel2.setCellHeight(space3, "10"); table.setWidget(0, 0, tableProperties); table.setHTML(0, 1, ""); table.setWidget(0, 2, vPanel2); // The hidden column extends table to 100% width CellFormatter cellFormatter = table.getCellFormatter(); cellFormatter.setWidth(0, 1, "25"); cellFormatter.setVerticalAlignment(0, 0, HasAlignment.ALIGN_TOP); cellFormatter.setVerticalAlignment(0, 2, HasAlignment.ALIGN_TOP); // Sets wordWrap for al rows for (int i = 0; i < 11; i++) { setRowWordWarp(i, 0, true, tableProperties); } setRowWordWarp(0, 0, true, tableSubscribedUsers); tableProperties.setStyleName("okm-DisableSelect"); tableSubscribedUsers.setStyleName("okm-DisableSelect"); initWidget(scrollPanel); }
From source file:com.ikon.frontend.client.widget.properties.Mail.java
License:Open Source License
/** * Mail/*from w w w . j av a 2 s . c om*/ */ public Mail() { mail = new GWTMail(); categoryManager = new CategoryManager(CategoryManager.ORIGIN_MAIL); keywordManager = new KeywordManager(ThesaurusSelectPopup.MAIL_PROPERTIES); table = new FlexTable(); tableProperties = new FlexTable(); scrollPanel = new ScrollPanel(table); tableProperties.setHTML(0, 0, "<b>" + Main.i18n("mail.uuid") + "</b>"); tableProperties.setHTML(0, 1, ""); tableProperties.setHTML(1, 0, "<b>" + Main.i18n("mail.name") + "</b>"); tableProperties.setHTML(1, 1, ""); tableProperties.setHTML(2, 0, "<b>" + Main.i18n("mail.folder") + "</b>"); tableProperties.setHTML(3, 1, ""); tableProperties.setHTML(3, 0, "<b>" + Main.i18n("mail.size") + "</b>"); tableProperties.setHTML(4, 1, ""); tableProperties.setHTML(4, 0, "<b>" + Main.i18n("mail.created") + "</b>"); tableProperties.setHTML(5, 1, ""); tableProperties.setHTML(6, 0, "<b>" + Main.i18n("mail.mimetype") + "</b>"); tableProperties.setHTML(6, 1, ""); tableProperties.setHTML(7, 0, "<b>" + Main.i18n("mail.keywords") + "</b>"); tableProperties.setHTML(7, 1, ""); // Sets wordWrap for al rows for (int i = 0; i < 10; i++) { setRowWordWarp(i, 0, true, tableProperties); } tableProperties.getCellFormatter().setVerticalAlignment(7, 0, HasAlignment.ALIGN_TOP); tableProperties.setStyleName("okm-DisableSelect"); // Sets the tagcloud keywordManager.getKeywordCloud().setWidth("350"); VerticalPanel vPanel = new VerticalPanel(); vPanel.add(keywordManager.getKeywordCloudText()); vPanel.add(keywordManager.getKeywordCloud()); HTML space = new HTML(""); vPanel.add(space); vPanel.setCellHeight(space, "10"); vPanel.add(categoryManager.getPanelCategories()); vPanel.add(categoryManager.getSubscribedCategoriesTable()); table.setWidget(0, 0, tableProperties); table.setHTML(0, 1, ""); table.setWidget(0, 2, vPanel); table.getFlexCellFormatter().setWidth(0, 1, "25"); table.getFlexCellFormatter().setVerticalAlignment(0, 1, HasAlignment.ALIGN_TOP); table.getFlexCellFormatter().setVerticalAlignment(0, 2, HasAlignment.ALIGN_TOP); initWidget(scrollPanel); }
From source file:com.ikon.frontend.client.widget.properties.MailViewer.java
License:Open Source License
/** * MailViewer/*from w w w . j a v a 2 s.c om*/ */ public MailViewer() { table = new FlexTable(); dataTable = new FlexTable(); attachmentsTable = new ExtendedFlexTable(); contentPanel = new HorizontalPanel(); scrollPanel = new ScrollPanel(table); menuPopup = new MenuPopup(); attachmentsList = new HashMap<Integer, GWTDocument>(); table.setCellPadding(0); table.setCellSpacing(0); dataTable.setCellPadding(3); dataTable.setCellSpacing(2); dataTable.setHTML(0, 0, "<b>" + Main.i18n("mail.from") + "</b>"); dataTable.setHTML(0, 1, ""); dataTable.setHTML(0, 2, ""); dataTable.setHTML(1, 0, "<b>" + Main.i18n("mail.reply") + "</b>"); dataTable.setHTML(1, 1, ""); dataTable.setHTML(2, 0, "<b>" + Main.i18n("mail.to") + "</b>"); dataTable.setHTML(3, 1, ""); dataTable.setHTML(3, 0, "<b>" + Main.i18n("mail.subject") + "</b>"); dataTable.getCellFormatter().setWidth(0, 2, "100%"); dataTable.getCellFormatter().setVerticalAlignment(0, 0, HasAlignment.ALIGN_TOP); dataTable.getCellFormatter().setVerticalAlignment(1, 0, HasAlignment.ALIGN_TOP); dataTable.getCellFormatter().setVerticalAlignment(2, 0, HasAlignment.ALIGN_TOP); dataTable.getCellFormatter().setVerticalAlignment(3, 0, HasAlignment.ALIGN_TOP); dataTable.getCellFormatter().setVerticalAlignment(1, 1, HasAlignment.ALIGN_TOP); dataTable.getCellFormatter().setVerticalAlignment(2, 1, HasAlignment.ALIGN_TOP); // Sets wordWrap for al rows for (int i = 0; i < 4; i++) { setRowWordWarp(i, 2, false, dataTable); } HTML separatorLeft = new HTML(""); HTML separatorRight = new HTML(""); content = new HTML(""); contentPanel.add(separatorLeft); contentPanel.add(content); contentPanel.add(separatorRight); contentPanel.setCellWidth(separatorLeft, "5px"); content.setWidth("100%"); contentPanel.setCellWidth(separatorRight, "5px"); contentPanel.setWidth("100%"); attachmentText = new HTML("<b>" + Main.i18n("mail.attachment") + "</b> "); attachmentsTable.setCellPadding(3); attachmentsTable.setCellSpacing(2); VerticalPanel vRightPanel = new VerticalPanel(); vRightPanel.add(attachmentText); vRightPanel.add(attachmentsTable); table.setWidget(0, 0, dataTable); table.setWidget(0, 1, vRightPanel); table.setHTML(1, 0, ""); table.setWidget(2, 0, contentPanel); table.getCellFormatter().setVerticalAlignment(0, 0, HasAlignment.ALIGN_TOP); table.getCellFormatter().setVerticalAlignment(0, 1, HasAlignment.ALIGN_TOP); table.getCellFormatter().setHorizontalAlignment(0, 1, HasAlignment.ALIGN_RIGHT); table.getFlexCellFormatter().setHeight(1, 0, "10px"); table.getFlexCellFormatter().setColSpan(1, 0, 2); table.getFlexCellFormatter().setColSpan(2, 0, 2); table.getRowFormatter().setStyleName(1, "okm-Mail-White"); table.getRowFormatter().setStyleName(2, "okm-Mail-White"); table.setWidth("100%"); dataTable.setStyleName("okm-DisableSelect"); table.setStyleName("okm-Mail"); menuPopup.setStyleName("okm-Mail-MenuPopup"); attachmentsTable.setStyleName("okm-NoWrap"); initWidget(scrollPanel); }
From source file:com.ikon.frontend.client.widget.properties.Notes.java
License:Open Source License
/** * Notes/*w ww .j a v a 2s . c o m*/ */ public Notes(int type) { this.type = type; isChrome = (Util.getUserAgent().startsWith("safari") || Util.getUserAgent().startsWith("chrome")); tableNotes = new FlexTable(); scrollPanel = new ScrollPanel(tableNotes); newNotePanel = new VerticalPanel(); addNote = new HTML("<b>" + Main.i18n("general.menu.edit.add.note") + "</b>"); richTextArea = new RichTextArea(); richTextArea.setSize("100%", "14em"); richTextToolbar = new RichTextToolbar(richTextArea); richTextArea.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { evaluateButtons(); } }); // richTextToolbar.setWidth("100%"); gridRichText = new Grid(2, 1); gridRichText.setStyleName("RichTextToolbar"); gridRichText.addStyleName("okm-Input"); gridRichText.setWidget(0, 0, richTextToolbar); gridRichText.setWidget(1, 0, richTextArea); textArea = new TextArea(); textArea.setPixelSize(550, 160); textArea.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { evaluateButtons(); } }); textArea.setStyleName("okm-Input"); addButton = new Button(Main.i18n("button.add"), new ClickHandler() { @Override public void onClick(ClickEvent event) { addNote(); } }); addButton.setEnabled(false); updateButton = new Button(Main.i18n("button.update"), new ClickHandler() { @Override public void onClick(ClickEvent event) { setNote(editedNotePath, getTextNote(), editedNoteRow); } }); updateButton.setEnabled(false); cancelButton = new Button(Main.i18n("button.cancel"), new ClickHandler() { @Override public void onClick(ClickEvent event) { reset(); } }); updateButton.setVisible(false); cancelButton.setVisible(false); newNotePanel.add(Util.vSpace("40")); newNotePanel.add(addNote); if (isChrome) { newNotePanel.add(textArea); } else { newNotePanel.add(gridRichText); } newNotePanel.add(Util.vSpace("10")); HorizontalPanel hPanel = new HorizontalPanel(); hPanel.add(cancelButton); hPanel.add(new HTML(" ")); hPanel.add(addButton); hPanel.add(new HTML(" ")); hPanel.add(updateButton); newNotePanel.add(hPanel); newNotePanel.setCellHorizontalAlignment(addNote, HasAlignment.ALIGN_CENTER); if (isChrome) { newNotePanel.setCellHorizontalAlignment(textArea, HasAlignment.ALIGN_CENTER); } else { newNotePanel.setCellHorizontalAlignment(gridRichText, HasAlignment.ALIGN_CENTER); } newNotePanel.setCellHorizontalAlignment(hPanel, HasAlignment.ALIGN_CENTER); addButton.setStyleName("okm-AddButton"); updateButton.setStyleName("okm-YesButton"); cancelButton.setStyleName("okm-NoButton"); tableNotes.setWidth("100%"); newNotePanel.setVisible(false); initWidget(scrollPanel); }