List of usage examples for com.vaadin.ui Label setDescription
public void setDescription(String description)
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java
/** * ?? /* ww w .ja v a 2 s . c om*/ * @param panelContent */ private void createNoanwserTimeout(VerticalLayout panelContent) { noanswerLayout = new HorizontalLayout(); noanswerLayout.setSpacing(true); noanswerLayout.setVisible(false); panelContent.addComponent(noanswerLayout); Label freCaption = new Label("?"); freCaption.setWidth("-1px"); freCaption.setDescription( "<B>'?'??</B>"); noanswerLayout.addComponent(freCaption); noanswerTimeoutSelector = new ComboBox(); noanswerTimeoutSelector.setImmediate(true); noanswerTimeoutSelector.setWidth("50px"); noanswerTimeoutSelector.setNullSelectionAllowed(false); noanswerTimeoutSelector.setDescription( "<B>'?'??</B>"); noanswerLayout.addComponent(noanswerTimeoutSelector); for (int seconds = 3; seconds < 61; seconds++) { noanswerTimeoutSelector.addItem(seconds); } noanswerTimeoutSelector.setValue(10); noanswerTimeoutSelector.setReadOnly(true); Label postCaption = new Label(" "); postCaption.setWidth("-1px"); postCaption.setDescription( "<B>'?'??</B>"); noanswerLayout.addComponent(postCaption); }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java
/** * ???/*from w ww . j ava 2 s . c o m*/ * @param panelContent */ private void createSpecifiedPhone(VerticalLayout panelContent) { HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); panelContent.addComponent(layout); Label caption = new Label("??"); caption.setWidth("-1px"); caption.setDescription( "<B>'?'??'??'</B>"); layout.addComponent(caption); specifiedOption = new OptionGroup(); specifiedOption.addItem(false); specifiedOption.addItem(true); specifiedOption.setItemCaption(false, "?"); specifiedOption.setItemCaption(true, "??"); specifiedOption.addListener(this); specifiedOption.setImmediate(true); specifiedOption.setReadOnly(true); specifiedOption.setNullSelectionAllowed(false); specifiedOption.addStyleName("twocol200"); specifiedOption.addStyleName("myopacity"); specifiedOption.setDescription( "<B>'?'??'??'</B>"); layout.addComponent(specifiedOption); }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java
/** * ??// w w w. j a v a2s. c o m * @param panelContent */ private void createPhoneArea(VerticalLayout panelContent) { phoneAreaLayout = new HorizontalLayout(); phoneAreaLayout.setWidth("100%"); phoneAreaLayout.setVisible(false); phoneAreaLayout.setSpacing(true); panelContent.addComponent(phoneAreaLayout); Label caption = new Label(""); caption.setWidth("-1px"); caption.setDescription( "<B>'??'???</B>"); phoneAreaLayout.addComponent(caption); phoneArea = new TextArea(); phoneArea.setRows(6); phoneArea.setWidth("100%"); phoneArea.setImmediate(true); phoneArea.setReadOnly(true); phoneArea.setInputPrompt( "???, ???(,)?"); phoneArea.setDescription( "<B>'??'???</B>"); phoneAreaLayout.addComponent(phoneArea); phoneAreaLayout.setExpandRatio(phoneArea, 1.0f); }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java
/** * ????//from www. j a v a2 s . com * @param panelContent */ private void createCsrSelectTables(VerticalLayout panelContent) { csrSelectHLayout = new HorizontalLayout(); csrSelectHLayout.setSpacing(true); csrSelectHLayout.setVisible(false); csrSelectHLayout.setWidth("100%"); panelContent.addComponent(csrSelectHLayout); Label caption = new Label(""); caption.setWidth("-1px"); caption.setDescription("<B>??</B>"); csrSelectHLayout.addComponent(caption); // ??? HorizontalLayout panelLayout = new HorizontalLayout(); panelLayout.setSpacing(true); panelLayout.setMargin(false, true, false, true); panelLayout.setWidth("100%"); Panel tablePanel = new Panel(); tablePanel.setContent(panelLayout); csrSelectHLayout.addComponent(tablePanel); csrSelectHLayout.setExpandRatio(tablePanel, 1.0f); // (??) VerticalLayout leftComponents = createLeftComponents(); panelLayout.addComponent(leftComponents); panelLayout.setExpandRatio(leftComponents, 0.4f); // ??("?") VerticalLayout middleComponents = createMiddleComponents(); panelLayout.addComponent(middleComponents); panelLayout.setComponentAlignment(middleComponents, Alignment.MIDDLE_CENTER); panelLayout.setExpandRatio(middleComponents, 0.2f); // ?(????) VerticalLayout rightComponents = createRightComponents(); panelLayout.addComponent(rightComponents); panelLayout.setExpandRatio(rightComponents, 0.4f); }
From source file:com.mycollab.module.crm.ui.components.DateInfoComp.java
License:Open Source License
public void displayEntryDateTime(ValuedBean bean) { this.removeAllComponents(); this.withMargin(false); Label dateInfoHeader = new Label( FontAwesome.CALENDAR.getHtml() + " " + UserUIContext.getMessage(CrmCommonI18nEnum.SUB_INFO_DATES), ContentMode.HTML);/* ww w . jav a 2 s . com*/ dateInfoHeader.setStyleName("info-hdr"); this.addComponent(dateInfoHeader); MVerticalLayout layout = new MVerticalLayout().withMargin(new MarginInfo(false, false, false, true)) .withFullWidth(); try { Date createdDate = (Date) PropertyUtils.getProperty(bean, "createdtime"); Label createdDateLbl = new Label(UserUIContext.getMessage(CrmCommonI18nEnum.ITEM_CREATED_DATE, UserUIContext.formatPrettyTime(createdDate))); createdDateLbl.setDescription(UserUIContext.formatDateTime(createdDate)); Date updatedDate = (Date) PropertyUtils.getProperty(bean, "lastupdatedtime"); Label updatedDateLbl = new Label(UserUIContext.getMessage(CrmCommonI18nEnum.ITEM_UPDATED_DATE, UserUIContext.formatPrettyTime(updatedDate))); updatedDateLbl.setDescription(UserUIContext.formatDateTime(updatedDate)); layout.with(createdDateLbl, updatedDateLbl); this.addComponent(layout); } catch (Exception e) { LOG.error("Get date is failed {}", BeanUtility.printBeanObj(bean)); } }
From source file:de.catma.CatmaApplication.java
License:Open Source License
@Override public void init() { Properties properties = loadProperties(); backgroundService = new BackgroundService(this); final Window mainWindow = new Window("CATMA 4.1 - CLA " + VERSION); mainWindow.addParameterHandler(this); HorizontalLayout mainLayout = new HorizontalLayout(); mainLayout.setSizeUndefined();/*from w ww .ja v a2 s. c o m*/ mainLayout.setMargin(true); mainLayout.setSpacing(true); mainWindow.addStyleName("catma-mainwindow"); mainWindow.setContent(mainLayout); MenuFactory menuFactory = new MenuFactory(); try { initTempDirectory(properties); tagManager = new TagManager(); repositoryManagerView = new RepositoryManagerView(new RepositoryManager(this, tagManager, properties)); tagManagerView = new TagManagerView(tagManager); taggerManagerView = new TaggerManagerView(); analyzerManagerView = new AnalyzerManagerView(); visualizationManagerView = new VisualizationManagerView(); defaultProgressIndicator = new ProgressIndicator(); defaultProgressIndicator.setIndeterminate(true); defaultProgressIndicator.setEnabled(false); defaultProgressIndicator.setPollingInterval(500); progressWindow = new ProgressWindow(defaultProgressIndicator); menu = menuFactory.createMenu(mainLayout, new MenuFactory.MenuEntryDefinition("Repository Manager", new RepositoryManagerWindow(repositoryManagerView)), new MenuFactory.MenuEntryDefinition("Tag Manager", new TagManagerWindow(tagManagerView)), new MenuFactory.MenuEntryDefinition("Tagger", new TaggerManagerWindow(taggerManagerView)), new MenuFactory.MenuEntryDefinition("Analyzer", new AnalyzerManagerWindow(analyzerManagerView)), new MenuFactory.MenuEntryDefinition("Visualizer", new VisualizationManagerWindow(visualizationManagerView))); Link aboutLink = new Link("About", new ExternalResource("http://www.catma.de")); aboutLink.setTargetName("_blank"); mainLayout.addComponent(aboutLink); mainLayout.setComponentAlignment(aboutLink, Alignment.TOP_RIGHT); mainLayout.setExpandRatio(aboutLink, 1.0f); Link helpLink = new Link("Help", new ExternalResource(getURL() + "manual/")); helpLink.setTargetName("_blank"); mainLayout.addComponent(helpLink); mainLayout.setComponentAlignment(helpLink, Alignment.TOP_RIGHT); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", this)); helpLabel.setWidth("20px"); helpLabel.setDescription( "<h3>Hints</h3>" + "<p>Watch out for these little question mark icons while navigating " + "through CATMA. They provide useful hints for managing the first " + "steps within a CATMA component.</p>" + "<h4>Login</h4>" + "Once you're logged in, you will see the Repository Manager, " + "which will explain the first steps to you. " + "Just hover your mouse over the question mark icons!"); VerticalLayout helpWrapper = new VerticalLayout(); helpWrapper.addComponent(helpLabel); helpWrapper.setComponentAlignment(helpLabel, Alignment.TOP_RIGHT); Animator helpAnimator = new Animator(helpWrapper); helpAnimator.setFadedOut(true); mainLayout.addComponent(helpAnimator); mainLayout.setComponentAlignment(helpAnimator, Alignment.TOP_RIGHT); helpAnimator.fadeIn(2000, 300); MenuBar loginLogoutMenu = new MenuBar(); LoginLogoutCommand loginLogoutCommand = new LoginLogoutCommand(menu, repositoryManagerView, this); MenuItem loginLogoutitem = loginLogoutMenu.addItem("Login", loginLogoutCommand); loginLogoutCommand.setLoginLogoutItem(loginLogoutitem); mainLayout.addComponent(loginLogoutMenu); mainLayout.setComponentAlignment(loginLogoutMenu, Alignment.TOP_RIGHT); mainLayout.setWidth("100%"); } catch (Exception e) { showAndLogError("The system could not be initialized!", e); } setMainWindow(mainWindow); setTheme("cleatheme"); }
From source file:de.catma.ui.analyzer.MarkupResultPanel.java
License:Open Source License
private void initComponents() { setSizeFull();// w w w . j av a 2 s .c o m HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); VerticalLayout leftComponent = new VerticalLayout(); leftComponent.setSpacing(true); leftComponent.setSizeFull(); resultTable = new TreeTable(); resultTable.setSelectable(true); resultTable.setMultiSelect(true); HierarchicalContainer container = new HierarchicalContainer(); container.setItemSorter(new PropertyDependentItemSorter(TreePropertyName.caption, new PropertyToTrimmedStringCIComparator())); resultTable.setContainerDataSource(container); resultTable.addContainerProperty(TreePropertyName.caption, String.class, null); resultTable.setColumnHeader(TreePropertyName.caption, "Tag Definition"); resultTable.addContainerProperty(TreePropertyName.sourcedocument, String.class, null); resultTable.setColumnHeader(TreePropertyName.sourcedocument, "Source Document"); resultTable.addContainerProperty(TreePropertyName.markupcollection, String.class, null); resultTable.setColumnHeader(TreePropertyName.markupcollection, "Markup Collection"); resultTable.addContainerProperty(TreePropertyName.phrase, String.class, null); resultTable.setColumnHeader(TreePropertyName.phrase, "Phrase"); resultTable.addContainerProperty(TreePropertyName.propertyname, String.class, null); resultTable.setColumnHeader(TreePropertyName.propertyname, "Property"); resultTable.addContainerProperty(TreePropertyName.propertyvalue, String.class, null); resultTable.setColumnHeader(TreePropertyName.propertyvalue, "Property value"); resultTable.addContainerProperty(TreePropertyName.frequency, Integer.class, null); resultTable.setColumnHeader(TreePropertyName.frequency, "Frequency"); resultTable.addContainerProperty(TreePropertyName.visible, AbstractComponent.class, null); resultTable.setColumnHeader(TreePropertyName.visible, "Visible in Kwic"); resultTable.setItemCaptionPropertyId(TreePropertyName.caption); resultTable.setPageLength(10); //TODO: config resultTable.setSizeFull(); resultTable.setColumnCollapsingAllowed(true); resultTable.setColumnCollapsible(TreePropertyName.caption, false); resultTable.setColumnCollapsible(TreePropertyName.sourcedocument, true); resultTable.setColumnCollapsible(TreePropertyName.markupcollection, true); resultTable.setColumnCollapsible(TreePropertyName.phrase, true); resultTable.setColumnCollapsible(TreePropertyName.propertyname, true); resultTable.setColumnCollapsible(TreePropertyName.propertyvalue, true); resultTable.setColumnCollapsible(TreePropertyName.frequency, false); resultTable.setColumnCollapsible(TreePropertyName.visible, false); //TODO: a description generator that shows the version of a Tag // resultTable.setItemDescriptionGenerator(generator); leftComponent.addComponent(resultTable); leftComponent.setExpandRatio(resultTable, 1.0f); HorizontalLayout buttonPanel = new HorizontalLayout(); buttonPanel.setSpacing(true); buttonPanel.setWidth("100%"); btDist = new Button(); btDist.setIcon(new ClassResource("ui/analyzer/resources/chart.gif", getApplication())); buttonPanel.addComponent(btDist); btResultExcelExport = new Button(); btResultExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btResultExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); buttonPanel.addComponent(btResultExcelExport); cbFlatTable = new CheckBox("flat table", false); cbFlatTable.setImmediate(true); buttonPanel.addComponent(cbFlatTable); buttonPanel.setComponentAlignment(cbFlatTable, Alignment.MIDDLE_RIGHT); buttonPanel.setExpandRatio(cbFlatTable, 1f); btSelectAll = new Button("Select all for Kwic"); buttonPanel.addComponent(btSelectAll); buttonPanel.setComponentAlignment(btSelectAll, Alignment.MIDDLE_RIGHT); // buttonPanel.setExpandRatio(btSelectAll, 1f); btDeselectAll = new Button("Deselect all for Kwic"); buttonPanel.addComponent(btDeselectAll); buttonPanel.setComponentAlignment(btDeselectAll, Alignment.MIDDLE_RIGHT); leftComponent.addComponent(buttonPanel); splitPanel.addComponent(leftComponent); VerticalLayout rightComponent = new VerticalLayout(); rightComponent.setSpacing(true); rightComponent.setSizeFull(); this.kwicPanel = new KwicPanel(repository, relevantUserMarkupCollectionProvider, true); rightComponent.addComponent(kwicPanel); rightComponent.setExpandRatio(kwicPanel, 1f); HorizontalLayout kwicButtonPanel = new HorizontalLayout(); kwicButtonPanel.setSpacing(true); kwicButtonPanel.setWidth("100%"); btKwicExcelExport = new Button(); btKwicExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btKwicExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); kwicButtonPanel.addComponent(btKwicExcelExport); kwicButtonPanel.setComponentAlignment(btKwicExcelExport, Alignment.MIDDLE_LEFT); btUntagResults = new Button("Untag selected Kwics"); kwicButtonPanel.addComponent(btUntagResults); kwicButtonPanel.setComponentAlignment(btUntagResults, Alignment.MIDDLE_RIGHT); kwicButtonPanel.setExpandRatio(btUntagResults, 1f); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", getApplication())); helpLabel.setWidth("20px"); helpLabel.setDescription("<h3>Hints</h3>" + "<h4>Tagging search results</h4>" + "You can tag the search results in the Kwic-view: " + "<p>First select one or more rows and then drag the desired " + "Tag from the Tag Manager over the Kwic-results.</p>" + "<h4>Take a closer look</h4>" + "You can jump to the location in the full text by double " + "clicking on a row in the Kwic-view."); kwicButtonPanel.addComponent(helpLabel); kwicButtonPanel.setComponentAlignment(helpLabel, Alignment.MIDDLE_RIGHT); rightComponent.addComponent(kwicButtonPanel); rightComponent.setComponentAlignment(kwicButtonPanel, Alignment.MIDDLE_RIGHT); splitPanel.addComponent(rightComponent); addComponent(splitPanel); }
From source file:de.catma.ui.analyzer.PhraseResultPanel.java
License:Open Source License
private void initComponents() { setSizeFull();/* w w w . j ava 2 s . com*/ HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); VerticalLayout leftComponent = new VerticalLayout(); leftComponent.setSpacing(true); leftComponent.setSizeFull(); resultTable = new TreeTable(); resultTable.setSelectable(true); resultTable.setMultiSelect(true); HierarchicalContainer container = new HierarchicalContainer(); container.setItemSorter(new PropertyDependentItemSorter(TreePropertyName.caption, new PropertyToTrimmedStringCIComparator())); resultTable.setContainerDataSource(container); resultTable.addContainerProperty(TreePropertyName.caption, String.class, null); resultTable.setColumnHeader(TreePropertyName.caption, "Phrase"); resultTable.addContainerProperty(TreePropertyName.frequency, Integer.class, null); resultTable.setColumnHeader(TreePropertyName.frequency, "Frequency"); resultTable.addContainerProperty(TreePropertyName.visibleInKwic, AbstractComponent.class, null); resultTable.setColumnHeader(TreePropertyName.visibleInKwic, "Visible in Kwic"); resultTable.setItemCaptionPropertyId(TreePropertyName.caption); resultTable.setPageLength(10); //TODO: config resultTable.setSizeFull(); leftComponent.addComponent(resultTable); leftComponent.setExpandRatio(resultTable, 1.0f); HorizontalLayout buttonPanel = new HorizontalLayout(); buttonPanel.setSpacing(true); buttonPanel.setWidth("100%"); btDist = new Button(); btDist.setIcon(new ClassResource("ui/analyzer/resources/chart.gif", getApplication())); btDist.setDescription("Show selected phrases as a distribution trend in a " + "chart like visualization."); buttonPanel.addComponent(btDist); btDoubleTree = new Button(); btDoubleTree.setIcon(new ClassResource("ui/analyzer/resources/doubletree.gif", getApplication())); btDoubleTree.setDescription("Show a selected phrase with a doubletree kwic visualization."); buttonPanel.addComponent(btDoubleTree); btExcelExport = new Button(); btExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); buttonPanel.addComponent(btExcelExport); btSelectAll = new Button("Select all for Kwic"); buttonPanel.addComponent(btSelectAll); buttonPanel.setComponentAlignment(btSelectAll, Alignment.MIDDLE_RIGHT); buttonPanel.setExpandRatio(btSelectAll, 1f); btDeselectAll = new Button("Deselect all for Kwic"); buttonPanel.addComponent(btDeselectAll); buttonPanel.setComponentAlignment(btDeselectAll, Alignment.MIDDLE_RIGHT); leftComponent.addComponent(buttonPanel); splitPanel.addComponent(leftComponent); VerticalLayout rightComponent = new VerticalLayout(); rightComponent.setSpacing(true); rightComponent.setSizeFull(); this.kwicPanel = new KwicPanel(repository, relevantUserMarkupCollectionProvider); rightComponent.addComponent(kwicPanel); rightComponent.setExpandRatio(kwicPanel, 1f); HorizontalLayout kwicButtonPanel = new HorizontalLayout(); kwicButtonPanel.setSpacing(true); kwicButtonPanel.setWidth("100%"); btKwicExcelExport = new Button(); btKwicExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btKwicExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); kwicButtonPanel.addComponent(btKwicExcelExport); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", getApplication())); helpLabel.setDescription("<h3>Hints</h3>" + "<h4>Tagging search results</h4>" + "You can tag the search results in the Kwic-view: " + "<p>First select one or more rows and then drag the desired " + "Tag from the Tag Manager over the Kwic-results.</p>" + "<h4>Take a closer look</h4>" + "You can jump to the location in the full text by double " + "clicking on a row in the Kwic-view." + "<h4>Untag search results</h4>" + "The \"Results by markup\" tab gives you the opportunity " + "to untag markup for selected search results in the Kwic-view."); kwicButtonPanel.addComponent(helpLabel); kwicButtonPanel.setExpandRatio(helpLabel, 1f); kwicButtonPanel.setComponentAlignment(helpLabel, Alignment.MIDDLE_RIGHT); rightComponent.addComponent(kwicButtonPanel); rightComponent.setComponentAlignment(kwicButtonPanel, Alignment.MIDDLE_RIGHT); splitPanel.addComponent(rightComponent); addComponent(splitPanel); }
From source file:de.catma.ui.repository.RepositoryView.java
License:Open Source License
private Component createDocumentsLabel() { HorizontalLayout labelLayout = new HorizontalLayout(); labelLayout.setWidth("100%"); labelLayout.setSpacing(true);/*from w w w . j a v a 2 s.co m*/ Label documentsLabel = new Label("Document Manager"); documentsLabel.addStyleName("bold-label"); labelLayout.addComponent(documentsLabel); labelLayout.setExpandRatio(documentsLabel, 1.0f); btAdmin = new Button("Admin"); btAdmin.addStyleName("icon-button"); // for top-margin btAdmin.setVisible(repository.getUser().getRole().equals(Role.ADMIN)); labelLayout.addComponent(btAdmin); labelLayout.setComponentAlignment(btAdmin, Alignment.MIDDLE_RIGHT); btReload = new Button(""); btReload.setIcon(new ClassResource("ui/resources/icon-reload.gif", getApplication())); btReload.addStyleName("icon-button"); labelLayout.addComponent(btReload); labelLayout.setComponentAlignment(btReload, Alignment.MIDDLE_RIGHT); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", getApplication())); helpLabel.setWidth("20px"); helpLabel.setDescription("<h3>Hints</h3>" + "<h4>First steps</h4>" + "<h5>Adding a Source Document</h5>" + "You can add a Source Document by clicking the \"Add Source Document\"-button. " + "A Source Document can be a web resource pointed to by the URL or you can upload a document from your computer. " + "<h5>Tagging a Source Document</h5>" + "When you add your first Source Document, CATMA generates a set of example items to get you going: " + "<ul><li>A User Markup Collection to hold your markup</li><li>A Tag Library with an example Tagset that contains an example Tag</li></ul> " + "To start tagging a Source Document, just select the example User Markup Collection from the tree and click the \"Open User Markup Collection\"-button. " + "Then follow the instructions given to you by the Tagger component." + "<h5>Analyze a Source Document</h5>" + "To analyze a Source Document, just select that document from the tree and click \"Analyze Source Document\" in the \"More Actions\"-menu." + "Then follow the instructions given to you by the Analyzer component."); labelLayout.addComponent(helpLabel); labelLayout.setComponentAlignment(helpLabel, Alignment.MIDDLE_RIGHT); return labelLayout; }
From source file:de.catma.ui.tagger.MarkupPanel.java
License:Open Source License
private void initComponents(PropertyChangeListener tagDefinitionSelectionListener, PropertyChangeListener tagDefinitionsRemovedListener) { tabSheet = new TabSheet(); tabSheet.setSizeFull();//www .j a v a 2s . co m VerticalLayout tabContent = new VerticalLayout(); tabContent.setSpacing(true); tabContent.setSizeFull(); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", application)); helpLabel.setWidth("20px"); helpLabel.setDescription("<h3>Hints</h3>" + "<h4>Creating Tags</h4>" + "<ol><li>First you have to tell CATMA which Tagset you want to use. " + "Open a Tag Library from the Repository Manager and drag a Tagset to the \"Active Tagsets\" section." + " If you already have an active Tagset you want to use, you can skip this step.</li>" + "<li>Now you can select the Tagset and click the \"Create Tag\"-Button.</li></ol>" + "<h4>Tag this Source Document</h4>" + "<ol><li>First you have to tell CATMA which Tagset you want to use. " + "Open a Tag Library from the Repository Manager and drag a Tagset to the \"Active Tagsets\" section." + " If you already have an active Tagset you want to use, you can skip this step.</li>" + "<li>Now you can mark the text sequence you want to tag.</li><li>Click the colored button of the desired Tag to apply it to the marked sequence.</li></ol> " + "When you click on a tagged text, i. e. a text that is underlined with colored bars you should see " + "the available Tag Instances in the section on the lower right of this view."); tabContent.addComponent(helpLabel); tabContent.setComponentAlignment(helpLabel, Alignment.MIDDLE_RIGHT); tagsetTree = new TagsetTree(repository.getTagManager(), null, false, colorButtonListener); tabContent.addComponent(tagsetTree); tabContent.setExpandRatio(tagsetTree, 1.0f); tabSheet.addTab(tabContent, "Active Tagsets"); markupCollectionsPanel = new MarkupCollectionsPanel(repository); markupCollectionsPanel.addPropertyChangeListener(MarkupCollectionPanelEvent.tagDefinitionSelected, tagDefinitionSelectionListener); markupCollectionsPanel.addPropertyChangeListener(MarkupCollectionPanelEvent.tagDefinitionsRemoved, tagDefinitionsRemovedListener); markupCollectionsPanel.addPropertyChangeListener(MarkupCollectionPanelEvent.userMarkupCollectionSelected, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (evt.getNewValue() != null) { writableUserMarkupCollectionLabel.setValue(evt.getNewValue()); } else { writableUserMarkupCollectionLabel.setValue(""); } colorButtonListener.setEnabled(evt.getNewValue() != null); } }); tabSheet.addTab(markupCollectionsPanel, "Active Markup Collections"); addComponent(tabSheet); Component markupInfoPanel = createInfoPanel(); addComponent(markupInfoPanel); }