本文整理汇总了Java中org.eclipse.swt.SWT.V_SCROLL属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.V_SCROLL属性的具体用法?Java SWT.V_SCROLL怎么用?Java SWT.V_SCROLL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.V_SCROLL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDialogArea
@Override
protected Control createDialogArea(Composite parent) {
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
GridLayout layout = new GridLayout(2, false);
container.setLayout(layout);
Label lbtOcciServerUrl = new Label(container, SWT.NONE);
lbtOcciServerUrl.setText(Messages.OcciActionDialog_Label);
final List listOcciActions = new List (container, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL);
listOcciActions.addSelectionListener(
new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
selectedAction = listOcciActions.getSelection()[0];
}
}
);
listOcciActions.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
for(Action action : actions) {
listOcciActions.add(action.getScheme() + action.getTerm());
}
return area;
}
示例2: initialize
protected void initialize() {
Label label0 = new Label (this, SWT.NONE);
label0.setText ("Please choose type(s) which are returned by transaction response:");
list = new List(this, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
GridData data = new GridData ();
data.horizontalAlignment = GridData.FILL;
data.verticalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
data.heightHint = 200;
list.setLayoutData (data);
GridLayout gridLayout = new GridLayout();
setLayout(gridLayout);
setSize(new Point(408, 251));
}
示例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: 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);
}
示例5: attachWidget
@Override
public void attachWidget(Composite container) {
TableViewer tableViewer = new TableViewer(container, SWT.BORDER|SWT.CENTER | SWT.MULTI | SWT.FULL_SELECTION |SWT.H_SCROLL |SWT.V_SCROLL|SWT.RESIZE);
tableViewer.setContentProvider(iStructuredContentProvider);
tableViewer.setLabelProvider(iTableLabelProvider);
jfaceWidgets = tableViewer;
widget = tableViewer.getTable();
}
示例6: createTable
private void createTable(Composite parent) {
GridData gridData = new GridData();
gridData.horizontalSpan = numColumns;
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = GridData.FILL;
table = new Table(parent, SWT.VIRTUAL | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
table.setLayoutData(gridData);
table.setHeaderVisible(true);
table.setLinesVisible(true);
}
示例7: 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;
}
示例8: SummaryPanel
SummaryPanel(Composite parent) {
summary = new StyledText(parent, SWT.WRAP | SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL);
summary.setCaret(null);
summary.setEditable(false);
GridData gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL | GridData.GRAB_HORIZONTAL);
gd.horizontalSpan = 2;
// gd.heightHint = 100;
summary.setLayoutData(gd);
BookNotifier.getInstance().addListener(this);
}
示例9: createViewer
@Override
protected TableViewer createViewer(Composite parent) {
TableViewer viewer = new TableViewer(
parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
viewer.setContentProvider(ArrayContentProvider.getInstance());
addColumns(viewer);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2);
gd.widthHint = PREF_PAGE.WIDTH_HINT_PX;
viewer.getTable().setLayoutData(gd);
viewer.getTable().setLinesVisible(true);
viewer.getTable().setHeaderVisible(true);
return viewer;
}
示例10: initialize
@Override
protected void initialize() {
GridData gridData = new org.eclipse.swt.layout.GridData();
gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
httpData = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
httpData.setLayoutData(gridData);
httpData.setText("");
this.setLayout(new GridLayout());
setSize(new Point(300, 200));
}
示例11: createContents
@Override
protected Control createContents(Composite parent) {
this.getShell().setText(_Command);
ScrolledComposite scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL);
scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
scrolledComposite.setExpandHorizontal(true);
Text text = new Text(scrolledComposite, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP);
text.setText(_Result);
text.pack();
scrolledComposite.setContent(text);
return scrolledComposite;
}
示例12: createControl
private void createControl() {
GridLayout layout = new GridLayout();
layout.marginTop = 0;
text = new StyledText(parent, SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
text.setLayout(layout);
text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
text.setMargins(3, 3, 3, 3);
text.layout(true);
text.addModifyListener(modifyListener);
parent.layout(true, true);
// add empty string on ENTER pressed
text.addTraverseListener(e -> {
switch (e.detail) {
case SWT.TRAVERSE_RETURN:
if (!text.isDisposed()) {
text.append("\n");
text.setTopIndex(text.getLineCount() - 1);
text.setCaretOffset(text.getCharCount() - 1);
}
break;
default:
break;
}
});
// wheel up and down
text.addMouseWheelListener(e -> autoScrollEnabled = e.count <= 0);
styledTextContent = text.getContent();
}
示例13: createDialogArea
@Override
protected Control createDialogArea(Composite parent) {
// create a composite with standard margins and spacing
Composite composite = (Composite)super.createDialogArea(parent);
composite.setLayout(new GridLayout(1, false));
final CLabel warning = new CLabel(composite, SWT.LEFT);
warning.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
warning.setImage(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/error.png").createImage());
warning.setText("Expert queue configuration parameters, please use with caution.");
TableViewer viewer = new TableViewer(composite, 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);
viewer.setContentProvider(createContentProvider());
viewer.setInput(props);
final Button adv = new Button(composite, SWT.PUSH);
adv.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));
adv.setText("Advanced...");
adv.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(getShell(), "org.dawnsci.commandserver.ui.activemqPage", null, null);
if (pref != null) pref.open();
}
});
return composite;
}
示例14: 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));
}
示例15: addScrolledCompositeToTab
private ScrolledComposite addScrolledCompositeToTab(CTabFolder tabFolder,CTabItem tabItem) {
ScrolledComposite scrolledComposite = new ScrolledComposite(tabFolder,SWT.V_SCROLL);
tabItem.setControl(scrolledComposite);
//scrolledComposite.setLayout(new GridLayout(1, false));
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
scrolledComposite.setAlwaysShowScrollBars(false);
attachMouseScrollButtonListener(scrolledComposite);
return scrolledComposite;
}