当前位置: 首页>>代码示例>>Java>>正文


Java Control.setVisible方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Control.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Java Control.setVisible方法的具体用法?Java Control.setVisible怎么用?Java Control.setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Control的用法示例。


在下文中一共展示了Control.setVisible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: show

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
@Override
public void show ()
{
    logger.debug ( "Showing component" );

    for ( final Control control : this.controls )
    {
        control.setVisible ( true );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:TrackingVisibleComponent.java

示例2: hide

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
@Override
public void hide ()
{
    for ( final Control control : this.controls )
    {
        control.setVisible ( false );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:9,代码来源:TrackingVisibleComponent.java

示例3: update

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
public void update(String currentPageId) {
	if (composite == null || composite.isDisposed())
		return;
	GC metricsGC = new GC(composite);
	FontMetrics metrics = metricsGC.getFontMetrics();
	metricsGC.dispose();
	List buttons = (List) buttonMap.get(currentPageId);
	Control[] children = composite.getChildren();

	int visibleChildren = 0;
	Button closeButton = getButton(IDialogConstants.CLOSE_ID);

	for (int i = 0; i < children.length; i++) {
		Control control = children[i];
		if (closeButton == control)
			closeButton.dispose();
		else {
			control.setVisible(false);
			setButtonLayoutData(metrics, control, false);
		}
	}
	if (buttons != null) {
		for (int i = 0; i < buttons.size(); i++) {
			Button button = (Button) buttons.get(i);
			button.setVisible(true);
			setButtonLayoutData(metrics, button, true);
			GridData data = (GridData) button.getLayoutData();
			data.exclude = false;
			visibleChildren++;
		}
	}

	GridLayout compositeLayout = (GridLayout) composite.getLayout();
	compositeLayout.numColumns = visibleChildren;
	composite.layout(true);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:37,代码来源:HydrographInstallationDialog.java

示例4: addPages

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
public void addPages() {
	super.addPages();

	mainPage = new NewJavaProjectWizardPageOne() {
		public void createControl(Composite parent) {
			initializeDialogUnits(parent);

			Composite composite = new Composite(parent, SWT.NULL);
			composite.setFont(parent.getFont());
			composite.setLayout(new GridLayout(1, false));
			composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));

			// create UI elements
			Control nameControl = createNameControl(composite);
			nameControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

			Control jreControl = createJRESelectionControl(composite);
			jreControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

			Control workingSetControl = createWorkingSetControl(composite);
			workingSetControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
			workingSetControl.setVisible(false);

			Control infoControl = createInfoControl(composite);
			infoControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
			infoControl.setVisible(false);

			setControl(composite);
		}

		public IClasspathEntry[] getSourceClasspathEntries() {
			return  GW4ENature.getSourceClasspathEntries(getProjectName());
		}

		public IPath getOutputLocation() {
			return GW4ENature.getOutputLocation(getProjectName());
		}
	};

	addPage(mainPage);
	javaPage = new NewJavaProjectWizardPageTwo(mainPage);
	addPage(javaPage);
	List<TemplateProvider>  templates = TemplateProvider.getTemplates();
	fExtraPage = new GW4ETemplatePage(this,templates,false);
	addPage(fExtraPage);
	fMavenPage = new MavenTemplatePage(this);
	addPage(fMavenPage);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:49,代码来源:GW4ECreationWizard.java


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