import javax.inject.Inject;
import org.apache.commons.collections4.map.LinkedMap;
+import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.ICoreRunnable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.nebula.widgets.nattable.freeze.FreezeHelper;
import org.eclipse.nebula.widgets.nattable.freeze.FreezeLayer;
import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
-import org.eclipse.nebula.widgets.nattable.grid.command.ClientAreaResizeCommand;
import org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider;
import org.eclipse.nebula.widgets.nattable.grid.data.DefaultCornerDataProvider;
import org.eclipse.nebula.widgets.nattable.grid.data.DefaultRowHeaderDataProvider;
import org.eclipse.nebula.widgets.nattable.layer.ILayer;
import org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator;
import org.eclipse.nebula.widgets.nattable.layer.stack.DefaultBodyLayerStack;
+import org.eclipse.nebula.widgets.nattable.persistence.gui.PersistenceDialog;
import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
import org.eclipse.nebula.widgets.nattable.sort.SortHeaderLayer;
import org.eclipse.nebula.widgets.nattable.sort.config.SingleClickSortConfiguration;
new CategoricalChartTooltip(this);
new QuantitativeChartTooltip(this);
+
this.layout();
- natTable.doCommand(new ClientAreaResizeCommand(natTable));
+// natTable.doCommand(new ClientAreaResizeCommand(natTable));
+
+// load active table state
+ String activeState = getNatTableState().getProperty(PersistenceDialog.ACTIVE_VIEW_CONFIGURATION_KEY);
+ natTable.loadState(activeState!=null?activeState:StringUtils.EMPTY, getNatTableState());
+ getNatTableState().remove(NatTable.INITIAL_PAINT_COMPLETE_FLAG);
}
private List<Character> initCharacterList(FeatureNode<Character> node){
import java.util.Properties;
import java.util.function.Consumer;
+import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.LabelProvider;
// create a combobox for showing the available view states
Collection<String> availableStates = PersistenceHelper.getAvailableStates(natTableState);
+ if(availableStates.isEmpty()){
+ natTableState.put(StringUtils.EMPTY, StringUtils.EMPTY); // add default config if no states are persisted
+ natTableState.setProperty(PersistenceDialog.ACTIVE_VIEW_CONFIGURATION_KEY, StringUtils.EMPTY);
+ availableStates.add(StringUtils.EMPTY);
+ }
comboStates.setLabelProvider(new LabelProvider(){
@Override
public String getText(Object element) {