本文整理汇总了Java中org.eclipse.swt.SWT.H_SCROLL属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.H_SCROLL属性的具体用法?Java SWT.H_SCROLL怎么用?Java SWT.H_SCROLL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.H_SCROLL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControl
/**
* @wbp.parser.entryPoint
*/
@Override
public void createControl(Composite parent) {
fRootControl = new Composite(parent, SWT.NULL);
fRootControl.setLayout(new FillLayout(SWT.HORIZONTAL));
viewer = new TreeViewer(fRootControl, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(new ViewLabelProvider(createImageDescriptor())));
viewer.addDoubleClickListener(new IDoubleClickListener () {
@Override
public void doubleClick(DoubleClickEvent evt) {
TreeSelection sel = (TreeSelection) evt.getSelection();
IFile file = (IFile) sel.getFirstElement();
if (isModelFile(file)) {
JDTManager.openEditor(file, "org.gw4e.eclipse.studio.editor.GW4EEditor", null);
return;
}
JDTManager.openEditor(file, null);
}
});
files = new ArrayList<IFile>();
}
示例2: createContents
/**
* Create contents of the application window.
*
* @param parent the parent
* @return the control
*/
@Override
protected Control createContents(Composite parent) {
getShell().setText("Execution tracking console - " + consoleName);
getShell().setBounds(50, 250, 450, 500);
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new GridLayout(1, false));
{
styledText = new StyledText(container, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
styledText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
styledText.setEditable(false);
}
statusLineManager.setMessage("Waiting for tracking status from server. Please wait!");
return container;
}
示例3: createComponents
private void createComponents ()
{
final FillLayout layout = new FillLayout ( SWT.VERTICAL );
layout.marginHeight = 12;
layout.marginWidth = 12;
setLayout ( layout );
final Text filterTextField = new Text ( this, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL );
filterTextField.setText ( this.filter );
filterTextField.addKeyListener ( new KeyAdapter () {
@Override
public void keyReleased ( final KeyEvent e )
{
verifyFilter ( filterTextField.getText () );
}
} );
}
示例4: createDialogArea
@Override
protected Control createDialogArea(Composite parent) {
Composite comp = (Composite) super.createDialogArea(parent);
Text filed = new Text(comp, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
| SWT.READ_ONLY | SWT.MULTI);
filed.setText(text);
filed.setBackground(getShell().getDisplay().getSystemColor(
SWT.COLOR_LIST_BACKGROUND));
filed.setFont(JFaceResources.getTextFont());
PixelConverter pc = new PixelConverter(filed);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = pc.convertWidthInCharsToPixels(80);
gd.heightHint = pc.convertHeightInCharsToPixels(30);
filed.setLayoutData(gd);
return comp;
}
示例5: createStyledText
private StyledText createStyledText() {
styledText = new StyledText(shell,
SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); // SWT.WRAP
GridData gridData = new GridData();
styledText.setFont(
new Font(shell.getDisplay(), "Source Code Pro Light", 10, SWT.NORMAL));
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = GridData.FILL;
gridData.grabExcessVerticalSpace = true;
styledText.setLayoutData(gridData);
styledText.addLineStyleListener(lineStyler);
styledText.setEditable(false);
styledText
.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
return styledText;
}
示例6: createPartControl
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
*/
public void createPartControl(Composite parent) {
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
setColumnsName(viewer);
viewer.setContentProvider(new ExecutionContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setComparator(new PerformanceStatsViewerSorter());
viewer.getTable().setData(PERFORMANCE_VIEW_WIDGET_ID,PERFORMANCE_VIEW_TABLE);
getSite().setSelectionProvider(viewer);
makeActions();
hookContextMenu();
contributeToActionBars();
load () ;
}
示例7: createCompositeXml
/**
* This method initializes compositeXml
*
*/
private void createCompositeXml() {
compositeXml = new Composite(sashForm, SWT.NONE);
compositeXml.setLayout(new FillLayout());
xmlView = new StructuredTextViewer(compositeXml, null, null, false, SWT.H_SCROLL | SWT.V_SCROLL);
xmlView.setEditable(false);
colorManager = new ColorManager();
xmlView.configure(new XMLConfiguration(colorManager));
Document document = new Document(
"Click on the XML generation button to view the XML document generated by Convertigo.");
IDocumentPartitioner partitioner = new FastPartitioner(new XMLPartitionScanner(), new String[] {
XMLPartitionScanner.XML_TAG, XMLPartitionScanner.XML_COMMENT, });
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
xmlView.setDocument(document);
}
示例8: createNewFilePage
@Override
protected WizardNewFileCreationPage createNewFilePage() {
return new NewFilePage(getSelection(), fileExt) {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
Composite control = (Composite) getControl();
Composite extensionGroup = new Composite(control, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
extensionGroup.setLayout(layout);
extensionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label refOccieLabel = new Label(extensionGroup, SWT.NONE);
refOccieLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
refOccieLabel.setText(Messages.NewExtensionWizard_RefExtensionLabel);
refOccieLabel.setFont(parent.getFont());
Composite composite = new Composite(extensionGroup, SWT.NULL);
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
composite.setLayoutData(layoutData);
TableColumnLayout tableLayout = new TableColumnLayout();
composite.setLayout(tableLayout);
Table table = new Table(composite,
SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
refExtensionViewer = new CheckboxTableViewer(table);
refExtensionViewer.setContentProvider(ArrayContentProvider.getInstance());
Collection<String> registeredExtensions = new ArrayList<String>(
OcciRegistry.getInstance().getRegisteredExtensions());
refExtensionViewer.setInput(registeredExtensions);
}
};
}
示例9: createPageControl
/**
* Creates custom control for user-defined query text.
*/
private Control createPageControl( Composite parent )
{
Composite composite = new Composite( parent, SWT.NONE );
composite.setLayout( new GridLayout( 1, false ) );
GridData gridData = new GridData( GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_FILL );
composite.setLayoutData( gridData );
Label fieldLabel = new Label( composite, SWT.NONE );
fieldLabel.setText( "&Query Text:" );
m_queryTextField = new Text( composite, SWT.BORDER
| SWT.V_SCROLL | SWT.H_SCROLL );
GridData data = new GridData( GridData.FILL_HORIZONTAL );
data.heightHint = 100;
m_queryTextField.setLayoutData( data );
m_queryTextField.addModifyListener( new ModifyListener( )
{
public void modifyText( ModifyEvent e )
{
validateData();
}
} );
setPageComplete( false );
return composite;
}
示例10: createPartControl
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
*/
public void createPartControl(Composite parent) {
_viewer = new TreeViewer(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
_contentProvider = new ViewContentProvider();
_viewer.setContentProvider(_contentProvider);
ColumnViewerToolTipSupport.enableFor(_viewer);
_viewer.addSelectionChangedListener(
new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
fireEngineSelectionChanged();
}
});
createColumns();
// _viewer.setColumnProperties( new String[] {"Status", "Identifier", "Step", "Status"} );
// _viewer.getTree().setHeaderVisible(true);
Font mono = JFaceResources.getFont(JFaceResources.TEXT_FONT);
_viewer.getTree().setFont(mono);
// Create the help context id for the viewer's control
PlatformUI.getWorkbench().getHelpSystem().setHelp(_viewer.getControl(), "org.eclipse.gemoc.executionframework.ui.views.engine.EngineStatusView");
// register for changes in the RunningEngineRegistry
//org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.addObserver(this);
buildMenu();
org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.addEngineRegistrationListener(this);
}
示例11: createFormatedViewTabItem
/**
*
* Create formatted view tab in data viewer tab folder
*
*/
public void createFormatedViewTabItem() {
if (isViewTabExist(Views.FORMATTED_VIEW_NAME)) {
CTabItem item = getViewTabItem(Views.FORMATTED_VIEW_NAME);
tabFolder.setSelection(item);
dataViewLoader.reloadloadViews();
return;
}
CTabItem tbtmFormattedView = new CTabItem(tabFolder, SWT.CLOSE);
tbtmFormattedView.setData(Views.VIEW_NAME_KEY, Views.FORMATTED_VIEW_NAME);
tbtmFormattedView.setText(Views.FORMATTED_VIEW_DISPLAYE_NAME);
{
Composite composite = new Composite(tabFolder, SWT.NONE);
tbtmFormattedView.setControl(composite);
composite.setLayout(new GridLayout(1, false));
{
formattedViewTextarea = new StyledText(composite, SWT.BORDER | SWT.READ_ONLY | SWT.H_SCROLL
| SWT.V_SCROLL);
formattedViewTextarea.setFont(SWTResourceManager.getFont("Courier New", 9, SWT.NORMAL));
formattedViewTextarea.setEditable(false);
formattedViewTextarea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
}
}
tabFolder.setSelection(tbtmFormattedView);
dataViewLoader.setFormattedViewTextarea(formattedViewTextarea);
dataViewLoader.reloadloadViews();
}
示例12: createPartControl
@Override
public void createPartControl(Composite content) {
content.setLayout(new GridLayout(1, false));
Util.removeMargins(content);
this.viewer = new TableViewer(content, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
viewer.setUseHashlookup(true);
viewer.getTable().setHeaderVisible(true);
viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
createColumns();
viewer.setContentProvider(createContentProvider());
consumers = new ConcurrentHashMap<>();
viewer.setInput(consumers);
createActions();
try {
createTopicListener(new URI(Activator.getJmsUri()));
} catch (Exception e) {
logger.error("Cannot listen to topic of command server!", e);
}
final String partName = getSecondaryIdAttribute("partName");
if (partName!=null) setPartName(partName);
}
示例13: createDialogArea
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.getShell().setText("Component Details");
container.setLayout(new GridLayout(1, false));
ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
GridData gd_scrolledComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_scrolledComposite.heightHint = 289;
gd_scrolledComposite.widthHint = 571;
scrolledComposite.setLayoutData(gd_scrolledComposite);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
text = new Text(scrolledComposite, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.READ_ONLY);
StringBuilder stringBuilder = new StringBuilder();
if(extraComponentList != null && extraComponentList.size() > 0){
stringBuilder.append(Messages.REPLAY_EXTRA_COMPONENTS + "\n");
extraComponentList.forEach(componentName -> { stringBuilder.append(extraCompcount + ". " + componentName + "\n");
extraCompcount++;
});
}
if(missedComponentList != null && missedComponentList.size() > 0 && !missedComponentList.isEmpty()){
stringBuilder.append(Messages.REPLAY_MISSING_COMPONENTS + "\n");
missedComponentList.forEach(componentName -> { stringBuilder.append(missedCompcount + "." + componentName + "\n");
missedCompcount++;
});
}
text.setText(stringBuilder.toString());
scrolledComposite.setContent(text);
return super.createDialogArea(parent);
}
示例14: createPartControl
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
*/
public void createPartControl(Composite parent) {
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setSorter(new NameSorter());
viewer.setInput(getViewSite());
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();
}
示例15: createInputFieldSection
private void createInputFieldSection(Composite composite) {
Composite inputComposite = new Composite(composite, SWT.NONE);
GridLayout gl_inputComposite = new GridLayout(1, false);
gl_inputComposite.horizontalSpacing = 0;
gl_inputComposite.verticalSpacing = 0;
gl_inputComposite.marginWidth = 0;
gl_inputComposite.marginHeight = 0;
inputComposite.setLayout(gl_inputComposite);
GridData gd_inputComposite = new GridData(SWT.FILL, SWT.FILL, false, true,
1, 1);
gd_inputComposite.widthHint = 269;
inputComposite.setLayoutData(gd_inputComposite);
inputComposite.setBounds(0, 0, 64, 64);
ScrolledComposite inputScrolledComposite = new ScrolledComposite(
inputComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
inputScrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, true, 1, 1));
inputScrolledComposite.setExpandHorizontal(true);
inputScrolledComposite.setExpandVertical(true);
final SashForm inputComposite2 = new SashForm(inputScrolledComposite, SWT.VERTICAL);
inputComposite2.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
in0Table.getColumn(0).setWidth(inputComposite2.getSize().x-5);
in1Table.getColumn(0).setWidth(inputComposite2.getSize().x-5);
}
});
inputComposite2.setLayout(new GridLayout(1, false));
addIn0InputFields(inputComposite2);
addIn1InputFields(inputComposite2);
inputScrolledComposite.setContent(inputComposite2);
inputScrolledComposite.setMinSize(inputComposite2.computeSize(SWT.DEFAULT,
SWT.DEFAULT));
}