Java Code Examples for org.eclipse.swt.SWT#NO_SCROLL
The following examples show how to use
org.eclipse.swt.SWT#NO_SCROLL .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChartMakerDialog.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
/** * Constructor. * * @param parent * Parent shell * @param model * Model to choose source from */ public ChartMakerDialog(Shell parent, IDataChartProvider<?> model) { super(parent); fComposite = parent; fDataProvider = model; /* Create tables */ fTypeTable = new TableViewer(parent, SWT.FULL_SELECTION | SWT.BORDER); fSeriesTable = new TableViewer(parent, SWT.FULL_SELECTION | SWT.BORDER); fSelectionXTable = new TableViewer(parent, SWT.FULL_SELECTION | SWT.BORDER | SWT.NO_SCROLL | SWT.V_SCROLL); fSelectionYTable = checkNotNull(CheckboxTableViewer.newCheckList(parent, SWT.BORDER | SWT.NO_SCROLL | SWT.V_SCROLL)); /* Create buttons */ fAddButton = new Button(parent, SWT.NONE); fXLogscaleButton = new Button(parent, SWT.CHECK); fYLogscaleButton = new Button(parent, SWT.CHECK); fWarningLabel = new Label(parent, SWT.NONE); setShellStyle(getShellStyle() | SWT.RESIZE); }
Example 2
Source File: SWTUtil.java From arx with Apache License 2.0 | 6 votes |
/** * Returns a table viewer with pagination. Implements hacks for fixing OSX bugs. * @param parent * @param style * @param fill * @param equalSize * @return */ public static PageableTable createPageableTableViewer(Composite container, int style, boolean fill, final boolean equalSize) { PageableTable pageableTable = new PageableTable( container, SWT.BORDER | SWT.NO_SCROLL, style, PageableTableNavigator.PAGE_SIZE, PageResultContentProvider.getInstance(), PageableTableNavigatorFactory.getFactory(), null); // Fix bug fixOSXTableBug(pageableTable.getViewer().getTable()); // Create column layout new PageableTableColumnLayout(pageableTable, fill, equalSize); // Done return pageableTable; }
Example 3
Source File: AlwStartPage.java From XPagesExtensionLibrary with Apache License 2.0 | 5 votes |
@Override public void createControl(final Composite parent) { // Setup the initial data populateConfigurationList(); Composite container = new Composite(parent, SWT.NONE); GridLayout layout = WizardUtils.createGridLayout(1, 5); container.setLayout(layout); // Create the radio group Group group = WizardUtils.createGroup(container, 1, 3); (_allRadio = WizardUtils.createRadio(group, "&All", 1, this)).setSelection(true); // $NLX-AlwStartPage.All-1$ _responsiveRadio = WizardUtils.createRadio(group, "&Responsive", 1, this); // $NLX-AlwStartPage.Responsive-1$ _nonResponsiveRadio = WizardUtils.createRadio(group, "N&on-Responsive", 1, this); // $NLX-AlwStartPage.NonResponsive-1$ // Create the table _table = new Table(container, SWT.FULL_SELECTION | SWT.BORDER | SWT.V_SCROLL | SWT.NO_SCROLL); _table.setHeaderVisible(false); _table.setLinesVisible(false); GridData gd = new GridData(SWT.DEFAULT); gd.horizontalSpan = 1; gd.verticalAlignment = GridData.FILL; gd.grabExcessVerticalSpace = true; gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = true; // Set the preferred height (3 rows) gd.heightHint = (_defImage.getBounds().height + (MARGIN * 2)) * DEFAULT_ROWS; _table.setLayoutData(gd); // Add one column new TableColumn(_table, SWT.NONE); // Add the rows refreshTable(ConfigurationType.ALL); setControl(container); setPageComplete(false); }
Example 4
Source File: N4IDEXpectView.java From n4js with Eclipse Public License 1.0 | 4 votes |
@Override public void createPartControl(Composite parent) { FillLayout fillLayout = new FillLayout(SWT.VERTICAL); fillLayout.marginHeight = 5; fillLayout.marginWidth = 5; parent.setLayout(fillLayout); // main container container = new Composite(parent, SWT.BORDER); container.setLayout(new FillLayout()); // create container for stack trace data Composite stacktraceDataContainer = new Composite(parent, SWT.BORDER); FormLayout formLayout = new FormLayout(); formLayout.marginHeight = 5; formLayout.marginWidth = 5; formLayout.spacing = 5; stacktraceDataContainer.setLayout(formLayout); Composite stackLabelContainer = new Composite(stacktraceDataContainer, SWT.NO_SCROLL | SWT.SHADOW_NONE); stackLabelContainer.setLayout(new GridLayout()); FormData stackLabelFormData = new FormData(); stackLabelFormData.top = new FormAttachment(0); stackLabelFormData.left = new FormAttachment(0); stackLabelFormData.right = new FormAttachment(100); stackLabelFormData.bottom = new FormAttachment(20); stackLabelContainer.setLayoutData(stackLabelFormData); Composite stackTraceContainer = new Composite(stacktraceDataContainer, SWT.NO_SCROLL | SWT.SHADOW_NONE); stackTraceContainer.setLayout(new FillLayout()); FormData stackTraceFormData = new FormData(); stackTraceFormData.top = new FormAttachment(stackLabelContainer); stackTraceFormData.left = new FormAttachment(0); stackTraceFormData.right = new FormAttachment(100); stackTraceFormData.bottom = new FormAttachment(100); stackTraceContainer.setLayoutData(stackTraceFormData); // Create viewer for test tree in main container testTreeViewer = new TreeViewer(container); testTreeViewer.setContentProvider(new XpectContentProvider()); testTreeViewer.setLabelProvider(new XpectLabelProvider(this.testsExecutionStatus)); testTreeViewer.setInput(null); // create stack trace label stacktraceLabel = new Label(stackLabelContainer, SWT.SHADOW_OUT); FontData fontData = stacktraceLabel.getFont().getFontData()[0]; Display display = Display.getCurrent(); // may be null if outside the UI thread if (display == null) display = Display.getDefault(); Font font = new Font(display, new FontData(fontData.getName(), fontData .getHeight(), SWT.BOLD)); // Make stack trace label bold stacktraceLabel.setFont(font); stacktraceLabel.setText(NO_TRACE_MSG); // create stack trace console MessageConsole messageConsole = new MessageConsole("trace", null); stacktraceConsole = new TraceConsole(messageConsole); stacktraceConsoleViewer = new TextConsoleViewer(stackTraceContainer, messageConsole); // context menu getSite().setSelectionProvider(testTreeViewer); MenuManager contextMenu = new MenuManager(); contextMenu.setRemoveAllWhenShown(true); getSite().registerContextMenu(contextMenu, testTreeViewer); Control control = testTreeViewer.getControl(); Menu menu = contextMenu.createContextMenu(control); control.setMenu(menu); activateContext(); createSelectionActions(); }