diff options
author | Andrew Ferrazzutti | 2014-01-17 21:34:22 +0000 |
---|---|---|
committer | Sami Wagiaalla | 2014-01-21 17:45:58 +0000 |
commit | 83b12966cff200c147685f28a644bda745009128 (patch) | |
tree | cc90ba3bc3d4ac3454c15f919e2cbf9686f35b40 /systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org | |
parent | 5b61909d9fd5c96d635f60b036796562b831a3ed (diff) | |
download | org.eclipse.linuxtools-83b12966cff200c147685f28a644bda745009128.tar.gz org.eclipse.linuxtools-83b12966cff200c147685f28a644bda745009128.tar.xz org.eclipse.linuxtools-83b12966cff200c147685f28a644bda745009128.zip |
Systemtap: Improve print regex & RC menu layouts.
Change-Id: I471a32696e2830efe0d4acb40d536ec2ff44dbd2
Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com>
Reviewed-on: https://git.eclipse.org/r/20775
Tested-by: Hudson CI
Reviewed-by: Sami Wagiaalla <swagiaal@redhat.com>
IP-Clean: Sami Wagiaalla <swagiaal@redhat.com>
Tested-by: Sami Wagiaalla <swagiaal@redhat.com>
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org')
-rw-r--r-- | systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/graph/SelectGraphAndSeriesWizardPage.java | 59 |
1 files changed, 38 insertions, 21 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/graph/SelectGraphAndSeriesWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/graph/SelectGraphAndSeriesWizardPage.java index 4f72e37baf..3e3344dfb2 100644 --- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/graph/SelectGraphAndSeriesWizardPage.java +++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/graph/SelectGraphAndSeriesWizardPage.java @@ -16,6 +16,7 @@ import java.text.MessageFormat; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.linuxtools.internal.systemtap.graphingapi.ui.Localization; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.ScrolledComposite; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionEvent; @@ -48,11 +49,11 @@ public class SelectGraphAndSeriesWizardPage extends WizardPage implements Listen edit = wizard.isEditing(); //Set the layout data - Composite comp = new Composite(parent, SWT.NULL); + Composite comp = new Composite(parent, SWT.NONE); comp.setLayout(new GridLayout()); Group cmpGraphOptsGraph = new Group(comp, SWT.SHADOW_ETCHED_IN); - cmpGraphOptsGraph.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false)); + cmpGraphOptsGraph.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false)); RowLayout rowLayout = new RowLayout(); rowLayout.type = SWT.HORIZONTAL; rowLayout.spacing = 10; @@ -73,11 +74,14 @@ public class SelectGraphAndSeriesWizardPage extends WizardPage implements Listen } } - Group cmpGraphOptsSeries = new Group(comp, SWT.SHADOW_ETCHED_IN); - cmpGraphOptsSeries.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); - GridLayout layout = new GridLayout(); - layout.numColumns = 2; - cmpGraphOptsSeries.setLayout(layout); + ScrolledComposite scrolledComposite = new ScrolledComposite(comp, SWT.V_SCROLL | SWT.BORDER); + scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + scrolledComposite.setExpandHorizontal(true); + + Composite cmpGraphOptsSeries = new Composite(scrolledComposite, SWT.NONE); + cmpGraphOptsSeries.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + cmpGraphOptsSeries.setLayout(new GridLayout(2, false)); + scrolledComposite.setContent(cmpGraphOptsSeries); Label lblTitle = new Label(cmpGraphOptsSeries, SWT.NONE); lblTitle.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); @@ -126,8 +130,9 @@ public class SelectGraphAndSeriesWizardPage extends WizardPage implements Listen for(int j,i=0; i<labels.length; i++) { cboXItem.add(labels[i]); - for(j=0; j<lblYItems.length; j++) + for(j=0; j<lblYItems.length; j++) { cboYItems[j].add(labels[i]); + } } int selected; @@ -180,6 +185,7 @@ public class SelectGraphAndSeriesWizardPage extends WizardPage implements Listen saveDataToModelGraph(wizard.model.getGraphID()); } + cmpGraphOptsSeries.pack(); setControl(comp); checkErrors(); } @@ -219,10 +225,11 @@ public class SelectGraphAndSeriesWizardPage extends WizardPage implements Listen if(getErrorMessage() == null) { model.setTitle(txtTitle.getText()); - if(null != txtKey && txtKey.isEnabled()) + if(null != txtKey && txtKey.isEnabled()) { model.setKey(txtKey.getText()); - else + } else { model.setKey(null); + } model.setXSeries(cboXItem.getSelectionIndex()-1); @@ -315,35 +322,44 @@ public class SelectGraphAndSeriesWizardPage extends WizardPage implements Listen @Override public void dispose() { super.dispose(); - if(null != btnGraphs) - for(int i=0; i<btnGraphs.length; i++) + if(null != btnGraphs) { + for(int i=0; i<btnGraphs.length; i++) { btnGraphs[i].dispose(); + } + } btnGraphs = null; - if(null != txtTitle) + if(null != txtTitle) { txtTitle.dispose(); + } txtTitle = null; - if(null != txtKey) + if(null != txtKey) { txtKey.dispose(); + } txtKey = null; - if(null != btnKey) + if(null != btnKey) { btnKey.dispose(); + } btnKey = null; - if(null != lblKey) + if(null != lblKey) { lblKey.dispose(); + } lblKey = null; - if(null != cboXItem) + if(null != cboXItem) { cboXItem.dispose(); + } cboXItem = null; if(null != cboYItems) { for(int i=0; i<cboYItems.length; i++) { - if(null != cboYItems[i]) + if(null != cboYItems[i]) { cboYItems[i].dispose(); + } cboYItems[i] = null; - if(null != lblYItems[i]) + if(null != lblYItems[i]) { lblYItems[i].dispose(); + } lblYItems[i] = null; } } @@ -388,10 +404,11 @@ public class SelectGraphAndSeriesWizardPage extends WizardPage implements Listen deleted[i+1] = false; cboYItems[i].select(0); } - if(deleted[i+1] || (cboYItems[i].getSelectionIndex() > 0 && cboYItems[i].isVisible())) + if(deleted[i+1] || (cboYItems[i].getSelectionIndex() > 0 && cboYItems[i].isVisible())) { setVisible = true; - else + } else { setVisible = false; + } } } } |