• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ScrolledComposite类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.swt.custom.ScrolledComposite的典型用法代码示例。如果您正苦于以下问题:Java ScrolledComposite类的具体用法?Java ScrolledComposite怎么用?Java ScrolledComposite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ScrolledComposite类属于org.eclipse.swt.custom包,在下文中一共展示了ScrolledComposite类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createFeatureListTab

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void createFeatureListTab(TabFolder tabFolder, ActiveTab type) {
	TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
	if (type == ActiveTab.ALL_FEATURES) {
		tabItem.setText(ALL_FEATURES_TAB_TITLE);
	} else {
		tabItem.setText(UPDATES_TAB_TITLE);
	}
	ScrolledComposite scroll = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
	scroll.setLayout(new GridLayout());
	scroll.setLayoutData(new GridData());

	Group group = new Group(scroll, SWT.NONE);
	group.setLayout(new GridLayout());
	group.setLayoutData(new GridData());
	listFeatures(group, type);
	scroll.setContent(group);
	scroll.setExpandHorizontal(true);
	scroll.setExpandVertical(true);
	scroll.setMinSize(group.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	tabItem.setControl(scroll);
}
 
开发者ID:wso2,项目名称:developer-studio,代码行数:22,代码来源:UpdaterDialog.java


示例2: DiskInfoTab

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
/**
 * Create the DISK INFO tab.
 */
public DiskInfoTab(CTabFolder tabFolder, FormattedDisk[] disks) {
	this.formattedDisks = disks;
	
	CTabItem ctabitem = new CTabItem(tabFolder, SWT.NULL);
	ctabitem.setText(textBundle.get("DiskInfoTab.Title")); //$NON-NLS-1$
	
	tabFolder.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent event) {
			getInfoTable().removeAll();
			buildDiskInfoTable(getFormattedDisk(0));	// FIXME!
		}
	});
	
	ScrolledComposite scrolledComposite = new ScrolledComposite(
		tabFolder, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	ctabitem.setControl(scrolledComposite);
	
	composite = new Composite(scrolledComposite, SWT.NONE);
	createDiskInfoTable();
	if (disks.length > 1) {
		RowLayout layout = new RowLayout(SWT.VERTICAL);
		layout.wrap = false;
		composite.setLayout(layout);
		for (int i=0; i<disks.length; i++) {
			Label label = new Label(composite, SWT.NULL);
			label.setText(disks[i].getDiskName());
			buildDiskInfoTable(disks[i]);
		}
	} else {
		composite.setLayout(new FillLayout());
		buildDiskInfoTable(disks[0]);
	}
	composite.pack();
	scrolledComposite.setContent(composite);
	scrolledComposite.setMinSize(
		composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:43,代码来源:DiskInfoTab.java


示例3: setupPagingInformation

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
/**
 * Setup some sensible paging information.
 */
public static void setupPagingInformation(ScrolledComposite composite) {
	GC gc = new GC(composite);
	FontMetrics fontMetrics = gc.getFontMetrics();
	gc.dispose();
	int fontHeight = fontMetrics.getHeight();
	int fontWidth = fontMetrics.getAverageCharWidth();
	Rectangle clientArea = composite.getClientArea();
	int lines = clientArea.height / fontHeight;
	int pageHeight = lines * fontHeight;
	int pageWidth = clientArea.width - fontWidth; 
	composite.getVerticalBar().setIncrement(fontHeight);
	composite.getVerticalBar().setPageIncrement(pageHeight);
	composite.getHorizontalBar().setIncrement(fontWidth);
	composite.getHorizontalBar().setPageIncrement(pageWidth);
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:19,代码来源:SwtUtil.java


示例4: attachMouseScrollButtonListener

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void attachMouseScrollButtonListener(final ScrolledComposite scrolledComposite){
	scrolledComposite.addListener(SWT.MouseWheel, new Listener() {
		@Override
		public void handleEvent(Event event) {
			int wheelCount = event.count;
			wheelCount = (int) Math.ceil(wheelCount / 3.0f);
			while (wheelCount < 0) {
				scrolledComposite.getVerticalBar().setIncrement(4);
				wheelCount++;
			}

			while (wheelCount > 0) {
				scrolledComposite.getVerticalBar().setIncrement(-4);
				wheelCount--;
			}
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:19,代码来源:PropertyDialogBuilder.java


示例5: filterTree

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
protected void filterTree(TreeItem[] items, String text,
		ArrayList<TreeItem> foundItems) {
	text = text.toLowerCase();
	for (int i = 0; i < items.length; i++) {
		ensureSectionBuilt(items[i], false);
		ScrolledComposite composite = (ScrolledComposite) items[i].getData("Panel");

		if (text.length() > 0
				&& (items[i].getText().toLowerCase().contains(text) || compositeHasText(
						composite, text))) {
			foundItems.add(items[i]);

			ensureExpandedTo(items[i]);
			items[i].setFont(filterFoundFont);
		} else {
			items[i].setFont(null);
		}
		filterTree(items[i].getItems(), text, foundItems);
	}
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:21,代码来源:ConfigView.java


示例6: setViewRequiresOneDownload

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
public static void setViewRequiresOneDownload(Composite genComposite) {
	if (genComposite == null || genComposite.isDisposed()) {
		return;
	}
	Utils.disposeComposite(genComposite, false);

	Label lab = new Label(genComposite, SWT.NULL);
	GridData gridData = new GridData(SWT.CENTER, SWT.CENTER, true, true);
	gridData.verticalIndent = 10;
	lab.setLayoutData(gridData);
	Messages.setLanguageText(lab, "view.one.download.only");

	genComposite.layout(true);

	Composite parent = genComposite.getParent();
	if (parent instanceof ScrolledComposite) {
		ScrolledComposite scrolled_comp = (ScrolledComposite) parent;

		Rectangle r = scrolled_comp.getClientArea();
		scrolled_comp.setMinSize(genComposite.computeSize(r.width, SWT.DEFAULT ));
	}

}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:24,代码来源:ViewUtils.java


示例7: NotesCheckinControl

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
protected NotesCheckinControl(final Composite parent, final int style, final CheckinControlOptions options) {
    super(parent, style, Messages.getString("NotesCheckinControl.Title"), CheckinSubControlType.CHECKIN_NOTES); //$NON-NLS-1$

    this.options = options;

    final FillLayout layout = new FillLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    setLayout(layout);

    final int rootStyle = options.isForDialog() ? SWT.BORDER : SWT.NONE;
    rootComposite = new ScrolledComposite(this, SWT.V_SCROLL | rootStyle);
    rootComposite.setLayout(new FillLayout());
    rootComposite.setExpandHorizontal(true);
    rootComposite.setExpandVertical(true);

    addDisposeListener(new DisposeListener() {
        @Override
        public void widgetDisposed(final DisposeEvent e) {
            if (pendingCheckin != null) {
                pendingCheckin.getPendingChanges().removeAffectedTeamProjectsChangedListener(teamProjectsListener);
            }
        }
    });
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:26,代码来源:NotesCheckinControl.java


示例8: getLayoutChangedHandler

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private Runnable getLayoutChangedHandler() {
  return new Runnable() {

    @Override
    public void run() {
      // resize the page to work around https://bugs.eclipse.org/bugs/show_bug.cgi?id=265237
      Composite parent = getActivePanel().getParent();
      while (parent != null) {
        if (parent instanceof ScrolledComposite) {
          ScrolledComposite scrolledComposite = (ScrolledComposite) parent;
          scrolledComposite.setMinSize(getActivePanel().getParent().computeSize(SWT.DEFAULT, SWT.DEFAULT));
          getActivePanel().layout();
          return;
        }
        parent = parent.getParent();
      }
    }
  };
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:20,代码来源:DeployPropertyPage.java


示例9: FXCanvasScrollApp

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
protected FXCanvasScrollApp() {
    shell = new Shell();
    shell.setText(this.getClass().getSimpleName());
    shell.setLayout(new FillLayout());

    ScrolledComposite scrollPane = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    FXCanvas fxCanvas = new FXCanvas(scrollPane, SWT.BORDER);
    fxCanvas.setScene(createScene(SCROLL_CONTAINER_ID));
    scrollPane.setContent(fxCanvas);
    scrollPane.setExpandHorizontal(true);
    scrollPane.setExpandVertical(true);
    fxCanvas.pack();
    scrollPane.setMinSize(fxCanvas.getSize());

    shell.pack();
    Monitor monitor = shell.getMonitor();
    Rectangle monitorRect = monitor.getClientArea();
    Rectangle shellRect = shell.getBounds();
    shellRect.x = Math.max(0, (monitorRect.width - shellRect.width) / 2);
    shellRect.y = Math.max(0, (monitorRect.height - shellRect.height) / 2);
    shell.setBounds(shellRect);
    shell.open();
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:24,代码来源:FXCanvasScrollApp.java


示例10: handleRemoveButtonClick

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void handleRemoveButtonClick(SelectionEvent event) {
	Button btnThis = (Button) event.getSource();
	Composite parent = btnThis.getParent();
	Control[] children = parent.getChildren();
	if (children != null) {
		for (int i = 0; i < children.length; i++) {
			if (children[i].equals(btnThis) && i - 1 > 0) {
				Group group = (Group) children[i - 1];
				Control[] childrenOfGroup = group.getChildren();
				Label number = (Label) childrenOfGroup[0];
				Integer intNumber = Integer.parseInt(number.getText());
				nodeMap.remove(intNumber);
				children[i - 1].dispose();
				children[i].dispose();
				redraw();
				break;
			}
		}
	}

	innerContainer.setSize(innerContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	((ScrolledComposite) cmpMain).setMinSize(innerContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));

	updatePageCompleteStatus();
}
 
开发者ID:Pardus-LiderAhenk,项目名称:lider-ahenk-installer,代码行数:26,代码来源:LiderClusterConfPage.java


示例11: setSize

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void setSize(Composite composite) {
	if (composite != null) {
		// Note: The font is set here in anticipation that the class
		// inheriting
		// this base class may add widgets to the dialog. setSize
		// is assumed to be called just before we go live.
		applyDialogFont(composite);
		Point minSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		composite.setSize(minSize);
		// set scrollbar composite's min size so page is expandable but
		// has scrollbars when needed
		if (composite.getParent() instanceof ScrolledComposite) {
			ScrolledComposite sc1 = (ScrolledComposite) composite.getParent();
			sc1.setMinSize(minSize);
			sc1.setExpandHorizontal(true);
			sc1.setExpandVertical(true);
		}
	}
}
 
开发者ID:angelozerr,项目名称:angular-eclipse,代码行数:20,代码来源:AngularGlobalPreferencesPage.java


示例12: setSize

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void setSize(Composite composite) {
	if (composite != null) {
		// Note: The font is set here in anticipation that the class inheriting
		//       this base class may add widgets to the dialog.   setSize
		//       is assumed to be called just before we go live.
		applyDialogFont(composite);
		Point minSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		composite.setSize(minSize);
		// set scrollbar composite's min size so page is expandable but
		// has scrollbars when needed
		if (composite.getParent() instanceof ScrolledComposite) {
			ScrolledComposite sc1 = (ScrolledComposite) composite.getParent();
			sc1.setMinSize(minSize);
			sc1.setExpandHorizontal(true);
			sc1.setExpandVertical(true);
		}
	}
}
 
开发者ID:angelozerr,项目名称:angular-eclipse,代码行数:19,代码来源:HTMLAngularGlobalPreferencesPage.java


示例13: LayoutGeneral

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
/**
 * Creates the Complete General Tab
 * @param parent The Parent Folder
 * @param meta The Meta Include for this Project
 * @param props The PropsUI from the Kettle Project
 * @param fieldNames The FieldNames from the Previous Step
 */
public LayoutGeneral(final CTabFolder parent, ARXPluginMeta meta, final PropsUI props, String[] fieldNames) {
	this.meta = meta;
	this.props = props;
	this.fieldNames = fieldNames;
	composites = new LayoutCompositeInterface[2];

	CTabItem tabGeneral = new CTabItem(parent, SWT.NONE);
	tabGeneral.setText(Resources.getMessage("General.2"));
	ScrolledComposite scroller = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
	this.build(scroller);
	tabGeneral.setControl(scroller);
	{

	}
}
 
开发者ID:WiednerF,项目名称:ARXPlugin,代码行数:23,代码来源:LayoutGeneral.java


示例14: reattachWidget

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void reattachWidget(Position pos) {
	SashForm sf = positionSashFormMap.get(pos);
	ScrolledComposite w = widgets.get(pos);
	if (w.getParent() == sf) // already attached to SashForm -> do nothing!
		return;
	
	w.setParent(sf); // set parent to SashForm again
	
	// move to left or right side of SashForm depending on flag in position:
	if (pos.isLeftSideOfSashForm)
		w.moveAbove(null);
	else
		w.moveBelow(null);
	
	sf.layout(true);
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:17,代码来源:PortalWidget.java


示例15: createPartControl

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
@Override
public void createPartControl(final Composite parent) {
	try {
		final Composite outer = toolkit.createComposite(parent, SWT.NONE);
		final GridLayout layout = new GridLayout(1, false);
		layout.marginHeight = layout.marginWidth = 0;
		outer.setLayout(layout);
		final GridData layoutData = new GridData(GridData.FILL_BOTH);
		outer.setLayoutData(layoutData);

		createValidationComposite(outer);

		final ScrolledComposite content = new ScrolledComposite(outer, SWT.H_SCROLL | SWT.V_SCROLL);
		content.setExpandHorizontal(true);
		content.setExpandVertical(true);
		content.setLayout(layout);
		content.setLayoutData(layoutData);
		final Composite children = initUi(content);
		content.setMinSize(children.computeSize(SWT.DEFAULT, SWT.DEFAULT));
		content.setContent(children);
		createBinding();
		additionalTasks();
	} catch (final ConnectException e) {
		handle(e);
	}
}
 
开发者ID:FI13,项目名称:afbb-bibo,代码行数:27,代码来源:AbstractView.java


示例16: fillTop

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void fillTop(Composite top, ScrolledComposite scrolledComposite)
{
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;

	GridData data = new GridData();
	data.grabExcessHorizontalSpace = true;
	data.horizontalAlignment = GridData.FILL;

	top.setLayoutData(data);
	top.setLayout(layout);

	scrolledComposite.setMinSize(500, 250);
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	scrolledComposite.setContent(top);
}
 
开发者ID:lemberg,项目名称:mappwidget,代码行数:18,代码来源:MainView.java


示例17: createByUser

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void createByUser(CTabFolder tabFolder) {
	CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
	bptab.setText(Messages.PermissionPage_5);

	scUser = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
	scUser.setLayoutData(new GridData(GridData.FILL_BOTH));

	cmpUser = new Composite(scUser, SWT.NONE);
	cmpUser.setLayout(new GridLayout(2, true));

	scUser.setContent(cmpUser);
	// Set the minimum size
	scUser.setMinSize(cmpUser.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, cmpUser.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);

	// Expand both horizontally and vertically
	scUser.setExpandHorizontal(true);
	scUser.setExpandVertical(true);

	bptab.setControl(scUser);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:PermissionPage.java


示例18: createByRole

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
private void createByRole(CTabFolder tabFolder) {
	CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
	bptab.setText(Messages.PermissionPage_6);

	scRole = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
	scRole.setLayoutData(new GridData(GridData.FILL_BOTH));

	cmpRole = new Composite(scRole, SWT.NONE);
	cmpRole.setLayout(new GridLayout(2, true));

	scRole.setContent(cmpRole);
	// Set the minimum size
	scRole.setMinSize(cmpRole.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, cmpRole.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);

	// Expand both horizontally and vertically
	scRole.setExpandHorizontal(true);
	scRole.setExpandVertical(true);

	bptab.setControl(scRole);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:PermissionPage.java


示例19: createControl

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
@Override
public void createControl(Composite parent) {
	Composite mainComposite = new Composite(parent, SWT.NONE);
	mainComposite.setLayout(GridLayoutFactory.fillDefaults().create());
	
	Label titleLabel = new Label(mainComposite, SWT.NONE);
	titleLabel.setText(Messages.ShowServersPage_label);
	
	ScrolledComposite scrollComp = new ScrolledComposite(mainComposite, SWT.V_SCROLL | SWT.H_SCROLL);
	scrollComp.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
	scrollComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	scrollComp.setLayout(new GridLayout(1,false));
	scrollComp.setExpandHorizontal(true);
	scrollComp.setExpandVertical(true);
	content = new Composite(scrollComp, SWT.NONE);
	scrollComp.setContent(content);
	content.setLayout(new GridLayout(1,false));
	content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	setControl(mainComposite);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:ShowServersPage.java


示例20: createControl

import org.eclipse.swt.custom.ScrolledComposite; //导入依赖的package包/类
@Override
public void createControl(Composite parent) {
	
	//Calculate which parameters are needed and where they are needed
	String datasetName = (String)connectedDataset.getPropertyActualValue(JRDesignDataset.PROPERTY_NAME);
	runReferences = DeleteDatasetCommand.getDatasetUsage(connectedDataset.getRoot().getChildren(), datasetName);
	missingParamOnMain = getMissingParameterOnMainDataset();
	missingParamOnDataset = getMissingParameterOnDataset();
	missingParamOnRun = getMissingDatasetsRun();
	
	//Create the appropriate controls for this parameters
  ScrolledComposite scrollComposite = new ScrolledComposite(parent, SWT.V_SCROLL);
  scrollComposite.setExpandVertical(true);
	Composite mainComposite = new Composite(scrollComposite, SWT.NONE);
	scrollComposite.setContent(mainComposite);
	mainComposite.setLayout(new GridLayout(1,false));
	if (missingParamOnMain.isEmpty() && missingParamOnRun.isEmpty() && missingParamOnRun.isEmpty()){
		new Label(mainComposite, SWT.NONE).setText(Messages.ConnectToDomainWizardPage_noChangesLabel);
	} else createNotEmptyContent(mainComposite);
	mainComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
	scrollComposite.setMinSize(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	mainComposite.setSize(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
   UIUtils.resizeAndCenterShell(parent.getShell(), 650, 550);
	setControl(mainComposite);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:26,代码来源:ConnectToDomainWizardPage.java



注:本文中的org.eclipse.swt.custom.ScrolledComposite类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FailReason类代码示例发布时间:2022-05-20
下一篇:
Java LookAndFeel类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap