Skip to content
Snippets Groups Projects
Commit ee1fffaa authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Added scrolled composites for too long labels

parent bd4d6740
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ import kieker.diagnosis.subview.util.NameConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
......@@ -99,6 +100,8 @@ public final class AggregatedCallsView implements ISubView, Observer {
private Button ivBtn2;
private ScrolledComposite ivSc;
@PostConstruct
public void initialize() {
this.dataModel.addObserver(this);
......@@ -129,7 +132,7 @@ public final class AggregatedCallsView implements ISubView, Observer {
gl_composite.marginWidth = 0;
gl_composite.horizontalSpacing = 0;
this.filterComposite.setLayout(gl_filterComposite);
ivBtn1 = new Button(filterComposite, SWT.RADIO);
ivBtn1.setText("Show All Calls");
ivBtn1.setSelection(true);
......@@ -179,13 +182,19 @@ public final class AggregatedCallsView implements ISubView, Observer {
tblclmnTotalDuration.setWidth(100);
tblclmnTotalDuration.setText("Total Duration");
this.detailComposite = new Composite(sashForm, SWT.BORDER);
ivSc = new ScrolledComposite(sashForm, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
this.detailComposite = new Composite(ivSc, SWT.NONE);
this.detailComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.detailComposite.setLayout(new GridLayout(2, false));
ivSc.setContent(detailComposite);
ivSc.setExpandHorizontal(true);
ivSc.setExpandVertical(true);
final Label lblExecutionContainer = new Label(this.detailComposite, SWT.NONE);
lblExecutionContainer.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
lblExecutionContainer.setText("Execution Container:");
lblExecutionContainer.setText("Execution Container:");
this.lblExecutionContainerDisplay = new Text(this.detailComposite, SWT.READ_ONLY);
this.lblExecutionContainerDisplay.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
......@@ -195,7 +204,7 @@ public final class AggregatedCallsView implements ISubView, Observer {
lblComponent.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
lblComponent.setText("Component:");
this.lblComponentDisplay =new Text(this.detailComposite, SWT.READ_ONLY);
this.lblComponentDisplay = new Text(this.detailComposite, SWT.READ_ONLY);
this.lblComponentDisplay.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.lblComponentDisplay.setText(AggregatedCallsView.N_A);
......@@ -211,7 +220,7 @@ public final class AggregatedCallsView implements ISubView, Observer {
lblNumberOfCalls.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
lblNumberOfCalls.setText("Number of Calls:");
this.lblNumberOfCallsDisplay =new Text(this.detailComposite, SWT.READ_ONLY);
this.lblNumberOfCallsDisplay = new Text(this.detailComposite, SWT.READ_ONLY);
this.lblNumberOfCallsDisplay.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.lblNumberOfCallsDisplay.setText(AggregatedCallsView.N_A);
......@@ -219,7 +228,7 @@ public final class AggregatedCallsView implements ISubView, Observer {
lblMinimalDuration.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
lblMinimalDuration.setText("Minimal Duration:");
this.lblMinimalDurationDisplay =new Text(this.detailComposite, SWT.READ_ONLY);
this.lblMinimalDurationDisplay = new Text(this.detailComposite, SWT.READ_ONLY);
this.lblMinimalDurationDisplay.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.lblMinimalDurationDisplay.setText(AggregatedCallsView.N_A);
......@@ -243,7 +252,7 @@ public final class AggregatedCallsView implements ISubView, Observer {
lblMaximalDuration.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
lblMaximalDuration.setText("Maximal Duration:");
this.lblMaximalDurationDisplay =new Text(this.detailComposite, SWT.READ_ONLY);
this.lblMaximalDurationDisplay = new Text(this.detailComposite, SWT.READ_ONLY);
this.lblMaximalDurationDisplay.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.lblMaximalDurationDisplay.setText(AggregatedCallsView.N_A);
......@@ -259,7 +268,7 @@ public final class AggregatedCallsView implements ISubView, Observer {
this.lblFailed.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.lblFailed.setText("Failed:");
this.lblFailedDisplay =new Text(this.detailComposite, SWT.READ_ONLY);
this.lblFailedDisplay = new Text(this.detailComposite, SWT.READ_ONLY);
this.lblFailedDisplay.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.lblFailedDisplay.setText(AggregatedCallsView.N_A);
sashForm.setWeights(new int[] { 2, 1 });
......@@ -381,7 +390,8 @@ public final class AggregatedCallsView implements ISubView, Observer {
this.lblFailed.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));
}
}
this.detailComposite.layout();
this.detailComposite.layout();
ivSc.setMinSize(detailComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
private class DataProvider implements Listener {
......
......@@ -45,6 +45,7 @@ import kieker.diagnosis.subview.util.TraceSizeSortListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
......@@ -107,6 +108,8 @@ public final class AggregatedTracesView implements Observer, ISubView {
private Button ivBtn3;
private ScrolledComposite ivSc;
@PostConstruct
public void initialize() {
this.dataModel.addObserver(this);
......@@ -196,10 +199,16 @@ public final class AggregatedTracesView implements Observer, ISubView {
trclmnTotalDuration.setWidth(100);
trclmnTotalDuration.setText("Total Duration");
this.detailComposite = new Composite(sashForm, SWT.BORDER);
ivSc = new ScrolledComposite(sashForm, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
this.detailComposite = new Composite(ivSc, SWT.NONE);
this.detailComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.detailComposite.setLayout(new GridLayout(2, false));
ivSc.setContent(detailComposite);
ivSc.setExpandHorizontal(true);
ivSc.setExpandVertical(true);
final Label lblExecutionContainer = new Label(this.detailComposite, SWT.NONE);
lblExecutionContainer.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
lblExecutionContainer.setText("Execution Container:");
......@@ -364,10 +373,10 @@ public final class AggregatedTracesView implements Observer, ISubView {
private void updateStatusBar() {
switch (this.model.getFilter()) {
case JUST_FAILED:
this.lblTraceEquivalence.setText(this.dataModel.getFailedTracesCopy().size() + "Failed Trace Equivalence Class(es)");
this.lblTraceEquivalence.setText(this.dataModel.getFailedTracesCopy().size() + " Failed Trace Equivalence Class(es)");
break;
case JUST_FAILURE_CONTAINING:
this.lblTraceEquivalence.setText(this.dataModel.getFailureContainingTracesCopy().size() + "Failure Containing Trace Equivalence Class(es)");
this.lblTraceEquivalence.setText(this.dataModel.getFailureContainingTracesCopy().size() + " Failure Containing Trace Equivalence Class(es)");
break;
case NONE:
this.lblTraceEquivalence.setText(this.dataModel.getTracesCopy().size() + " Trace Equivalence Class(es)");
......@@ -445,6 +454,7 @@ public final class AggregatedTracesView implements Observer, ISubView {
}
}
this.detailComposite.layout();
ivSc.setMinSize(detailComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
private class DataProvider implements Listener {
......
......@@ -39,6 +39,7 @@ import kieker.diagnosis.subview.util.NameConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
......@@ -91,6 +92,8 @@ public final class CallsView implements ISubView, Observer {
private Button ivBtn2;
private ScrolledComposite ivSc;
@PostConstruct
public void initialize() {
this.dataModel.addObserver(this);
......@@ -159,9 +162,15 @@ public final class CallsView implements ISubView, Observer {
tblclmnTimestamp.setWidth(100);
tblclmnTimestamp.setText("Timestamp");
this.detailComposite = new Composite(sashForm, SWT.BORDER);
ivSc = new ScrolledComposite(sashForm, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
this.detailComposite = new Composite(ivSc, SWT.NONE);
this.detailComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.detailComposite.setLayout(new GridLayout(2, false));
ivSc.setContent(detailComposite);
ivSc.setExpandHorizontal(true);
ivSc.setExpandVertical(true);
final Label lblExecutionContainer = new Label(this.detailComposite, SWT.NONE);
lblExecutionContainer.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
......@@ -283,6 +292,7 @@ public final class CallsView implements ISubView, Observer {
}
}
this.detailComposite.layout();
ivSc.setMinSize(detailComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
private void updateStatusBar() {
......
......@@ -42,6 +42,7 @@ import kieker.diagnosis.subview.util.TraceSizeSortListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
......@@ -99,6 +100,8 @@ public final class TracesView implements Observer, ISubView {
private Button ivBtn3;
private ScrolledComposite ivSc;
@PostConstruct
public void initialize() {
this.dataModel.addObserver(this);
......@@ -180,10 +183,16 @@ public final class TracesView implements Observer, ISubView {
trclmnTimestamp.setWidth(100);
trclmnTimestamp.setText("Timestamp");
this.detailComposite = new Composite(sashForm, SWT.BORDER);
ivSc = new ScrolledComposite(sashForm, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
this.detailComposite = new Composite(ivSc, SWT.NONE);
this.detailComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.detailComposite.setLayout(new GridLayout(2, false));
ivSc.setContent(detailComposite);
ivSc.setExpandHorizontal(true);
ivSc.setExpandVertical(true);
final Label lblExecutionContainer = new Label(this.detailComposite, SWT.NONE);
lblExecutionContainer.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
lblExecutionContainer.setText("Execution Container:");
......@@ -320,10 +329,10 @@ public final class TracesView implements Observer, ISubView {
private void updateStatusBar() {
switch (this.model.getFilter()) {
case JUST_FAILED:
this.lblTraces.setText(this.dataModel.getFailedTracesCopy().size() + "Failed Trace(s)");
this.lblTraces.setText(this.dataModel.getFailedTracesCopy().size() + " Failed Trace(s)");
break;
case JUST_FAILURE_CONTAINING:
this.lblTraces.setText(this.dataModel.getFailureContainingTracesCopy().size() + "Failure Containing Trace(s)");
this.lblTraces.setText(this.dataModel.getFailureContainingTracesCopy().size() + " Failure Containing Trace(s)");
break;
case NONE:
this.lblTraces.setText(this.dataModel.getTracesCopy().size() + " Trace(s)");
......@@ -393,6 +402,7 @@ public final class TracesView implements Observer, ISubView {
}
}
this.detailComposite.layout();
ivSc.setMinSize(detailComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
private class DataProvider implements Listener {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment