Commit 5bad30a1 authored by Hernan Ponce de Leon's avatar Hernan Ponce de Leon
Browse files

[YELLOW]

refs 3344
parent d182c2d7
......@@ -3,5 +3,5 @@ GraphicalSimulationView.java 497b127751381a7c55795c26faf58ae91f039fd0 GREEN
GraphicalStructureSimulationView.java 9175bc494e8660e8d40f249a69df5b6d07385bb1 GREEN
GraphicalStructureViewMenuContributor.java a61a85e249d146f62dc2b7bb8b12f570601cd2f7 GREEN
InputOutputTableMenuContributor.java 364b2f620f2e3147bf6acc187909ff8172709cf5 GREEN
InputOutputTableView.java 8c97292134cd98c90777c69688f23859c6759d3f GREEN
InputOutputTableView.java 334baaccae09fcc797c9de9dc3f5e8eec310d1d1 YELLOW
LocalZoomComboContributionItem.java d4f4f57a4ae40af0f3b842ae54d794661d272500 GREEN
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.simulator.component;
import static org.eclipse.jface.layout.GridDataFactory.fillDefaults;
import static org.fortiss.af3.component.ui.utils.ComponentCompletionProposalUtils.createInitialValueProposals;
import static org.fortiss.af3.expression.utils.ExpressionUtils.isComplexDataType;
import static org.fortiss.tooling.base.ui.utils.TableViewerUtils.createColumn;
......@@ -22,7 +23,6 @@ import static org.fortiss.tooling.base.ui.utils.TableViewerUtils.createColumn;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.DialogCellEditor;
......@@ -38,6 +38,7 @@ import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
import org.fortiss.af3.component.model.InputPort;
import org.fortiss.af3.component.model.OutputPort;
......@@ -81,15 +82,16 @@ public final class InputOutputTableView extends SimulationViewBase {
InputPortsTableViewer iptv = new InputPortsTableViewer();
inputViewer = iptv.createTableViewer(parent);
GridDataFactory.fillDefaults().applyTo(inputViewer.getTable());
fillDefaults().applyTo(inputViewer.getTable());
maintainSize(parent, inputViewer);
OutputPortsTableViewer optv = new OutputPortsTableViewer();
outputViewer = optv.createTableViewer(parent);
GridDataFactory.fillDefaults().applyTo(outputViewer.getTable());
fillDefaults().applyTo(outputViewer.getTable());
maintainSize(parent, outputViewer);
setPartName(getModelElement().getName() + " I/O");
String modelName = getModelElement() != null ? getModelElement().getName() : "";
setPartName(modelName + " I/O");
simulationInitialized();
}
......@@ -102,23 +104,24 @@ public final class InputOutputTableView extends SimulationViewBase {
Rectangle clientArea = parent.getParent().getClientArea();
// we have two tables, so use a a bit less than half of the
// space available (-20 looks good)
GridDataFactory.fillDefaults().hint(clientArea.width / 2 - 20, clientArea.height)
.applyTo(viewer.getControl());
fillDefaults().hint(clientArea.width / 2 - 20, clientArea.height).applyTo(
viewer.getControl());
Table table = viewer.getTable();
if(viewer == outputViewer) {
// this is the output table (3 columns)
int w = clientArea.width / 6;
viewer.getTable().getColumn(0).setWidth(w);
viewer.getTable().getColumn(1).setWidth(w);
viewer.getTable().getColumn(2).setWidth(w);
table.getColumn(0).setWidth(w);
table.getColumn(1).setWidth(w);
table.getColumn(2).setWidth(w);
} else {
// this is the input table (4 columns)
int w = clientArea.width / 8;
viewer.getTable().getColumn(0).setWidth(w);
viewer.getTable().getColumn(1).setWidth(w);
viewer.getTable().getColumn(2).setWidth(w);
viewer.getTable().getColumn(3).setWidth(w);
table.getColumn(0).setWidth(w);
table.getColumn(1).setWidth(w);
table.getColumn(2).setWidth(w);
table.getColumn(3).setWidth(w);
}
viewer.getTable().redraw();
table.redraw();
parent.layout();
}
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment