Package org.zanata.webtrans.client.view

Examples of org.zanata.webtrans.client.view.SourceContentsDisplay


    public void showData(List<TransUnit> transUnits) {
        selectedSource = null; // clear cache
        ImmutableList.Builder<SourceContentsDisplay> builder =
                ImmutableList.builder();
        for (TransUnit transUnit : transUnits) {
            SourceContentsDisplay display = displayProvider.get();
            display.setValue(transUnit);
            display.setSourceSelectionHandler(this);
            builder.add(display);
        }
        displayList = builder.build();
        if (isReferenceShowing) {
            showReference();
View Full Code Here


                targetContentsPresenter.getDisplays();
        List<SourceContentsDisplay> sourceContentsDisplays =
                sourceContentsPresenter.getDisplays();
        for (int i = 0; i < targetContentsDisplays.size(); i++) {
            TargetContentsDisplay targetDisplay = targetContentsDisplays.get(i);
            SourceContentsDisplay sourceDisplay = sourceContentsDisplays.get(i);
            targetDisplay.refresh();
            sourceDisplay.refresh();
            if (!Strings.isNullOrEmpty(findMessage)) {
                targetDisplay.highlightSearch(findMessage);
                sourceDisplay.highlightSearch(findMessage);
            }
        }
    }
View Full Code Here

                sourceContentsPresenter.getDisplays();
        List<TargetContentsDisplay> targetDisplays =
                targetContentsPresenter.getDisplays();

        for (int i = 0; i < sourceContentsPresenter.getDisplays().size(); i++) {
            SourceContentsDisplay sourceDisplay = sourceDisplays.get(i);
            TargetContentsDisplay targetDisplay = targetDisplays.get(i);

            String source =
                    sourceDisplay.getSourcePanelList().get(0).getSource();
            String target = targetDisplay.getEditors().get(0).getText();

            RunValidationEvent runValidationEvent =
                    new RunValidationEvent(source, target, false);
View Full Code Here

    @Test
    public void canRefreshViewWithSearch() {
        // Given: presenter has highlight search term
        presenter.highlightSearch("blah");
        TargetContentsDisplay targetDisplay = mock(TargetContentsDisplay.class);
        SourceContentsDisplay sourceDisplay = mock(SourceContentsDisplay.class);
        // assuming two displays in the list
        List<TargetContentsDisplay> targetContentsDisplays =
                Lists.newArrayList(targetDisplay, targetDisplay);
        List<SourceContentsDisplay> sourceContentsDisplays =
                Lists.newArrayList(sourceDisplay, sourceDisplay);
View Full Code Here

    @Test
    public void canRefreshViewWithNoSearch() {
        // Given: presenter has no highlight search term
        TargetContentsDisplay targetDisplay = mock(TargetContentsDisplay.class);
        SourceContentsDisplay sourceDisplay = mock(SourceContentsDisplay.class);
        // assuming two displays in the list
        List<TargetContentsDisplay> targetContentsDisplays =
                Lists.newArrayList(targetDisplay, targetDisplay);
        List<SourceContentsDisplay> sourceContentsDisplays =
                Lists.newArrayList(sourceDisplay, sourceDisplay);
View Full Code Here

TOP

Related Classes of org.zanata.webtrans.client.view.SourceContentsDisplay

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.