Project

General

Profile

« Previous | Next » 

Revision 390ef5ac

Added by Patrick Plitzner over 4 years ago

ref #8656 Update label if matrix loadiung failed

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixPart.java
107 107

  
108 108
    private StackLayout stackLayout;
109 109

  
110
    private Label label;
111

  
110 112
    @PostConstruct
111 113
    public void create(Composite parent, IEclipseContext context) {
112 114
        if(CdmStore.isActive() && conversation==null){
......
121 123
        stackLayout = new StackLayout();
122 124
        parent.setLayout(stackLayout);
123 125
        matrix = new CharacterMatrix(parent, this);
124
        Label label = new Label(parent, SWT.NONE);
126
        label = new Label(parent, SWT.NONE);
125 127
        label.setText(Messages.CharacterMatrixPart_LOADING_MATRIX);
126 128
        stackLayout.topControl = label;
127 129
        ContextInjectionFactory.inject(matrix, context);
......
134 136
                    || descriptiveDataSet.getDescriptiveSystem().getTermType()==null
135 137
                    || !descriptiveDataSet.getDescriptiveSystem().getTermType().equals(TermType.Character)){
136 138
                MessagingUtils.informationDialog(Messages.CharacterMatrixPart_COULD_NOT_OPEN, Messages.CharacterMatrixPart_COULD_NOT_OPEN_MESSAGE);
139
                loadingFailed();
137 140
                return;
138 141
            }
139 142
            matrix.initDescriptiveDataSet();
......
251 254
        return propertyMap;
252 255
    }
253 256

  
254
    public void loadingDone() {
257
    private void loadingFailed() {
258
        label.setText("Loading failed");
259
    }
260

  
261
    void loadingDone() {
255 262
        stackLayout.topControl = matrix;
256 263
        matrix.getParent().layout();
257 264
    }

Also available in: Unified diff