Project

General

Profile

« Previous | Next » 

Revision 49df31fc

Added by Patrick Plitzner almost 6 years ago

Add loading label to character matrix

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixPart.java
25 25
import javax.inject.Inject;
26 26

  
27 27
import org.eclipse.core.runtime.IProgressMonitor;
28
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
29
import org.eclipse.e4.core.contexts.IEclipseContext;
28 30
import org.eclipse.e4.ui.di.Focus;
29 31
import org.eclipse.e4.ui.di.Persist;
30 32
import org.eclipse.e4.ui.model.application.ui.MDirtyable;
31 33
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
32 34
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
33 35
import org.eclipse.nebula.widgets.nattable.NatTable;
36
import org.eclipse.swt.SWT;
37
import org.eclipse.swt.custom.StackLayout;
34 38
import org.eclipse.swt.widgets.Composite;
39
import org.eclipse.swt.widgets.Label;
35 40

  
36 41
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
37 42
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
......
105 110

  
106 111
    private CharacterMatrix matrix;
107 112

  
113
    private StackLayout stackLayout;
114

  
108 115
    @PostConstruct
109
    public void create(Composite parent) {
116
    public void create(Composite parent, IEclipseContext context) {
110 117
        if(CdmStore.isActive() && conversation==null){
111 118
            conversation = CdmStore.createConversation();
112 119
        }
......
116 123
        else{
117 124
            return;
118 125
        }
126
        stackLayout = new StackLayout();
127
        parent.setLayout(stackLayout);
119 128
        matrix = new CharacterMatrix(parent, this);
129
        Label label = new Label(parent, SWT.NONE);
130
        label.setText("Loading matrix...");
131
        stackLayout.topControl = label;
132
        ContextInjectionFactory.inject(matrix, context);
120 133
    }
121 134

  
122 135
    public void init(UUID descriptiveDataSetUuid, boolean treeView) {
......
253 266
        updateResults.add(result);
254 267
    }
255 268

  
269
    public void loadingDone() {
270
        stackLayout.topControl = matrix;
271
        matrix.getParent().layout();
272
    }
273

  
256 274
}

Also available in: Unified diff