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


Java SWT.HORIZONTAL属性代码示例

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


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

示例1: createContent

private void createContent() {
    toolBar = new ToolBar(this, SWT.HORIZONTAL);
    toolBar.setEnabled(false);
    GridLayout layout = new GridLayout();
    GridData layoutData = new GridData(SWT.FILL, SWT.TOP, true, false);
    toolBar.setLayout(layout);
    toolBar.setLayoutData(layoutData);

    ToolItem cancelProcessToolItem = new ToolItem(toolBar, SWT.PUSH);
    cancelProcessToolItem.setText(resourceBundle.getString("cancel_process"));
    cancelProcessToolItem.addListener(SWT.Selection, event -> {
        listeners.forEach(DBProcessInfoViewListener::dbProcessInfoViewCancelProcessToolItemClicked);
    });

    ToolItem terminateProcessToolItem = new ToolItem(toolBar, SWT.PUSH);
    terminateProcessToolItem.setText(resourceBundle.getString("kill_process"));
    terminateProcessToolItem.addListener(SWT.Selection, event -> {
        listeners.forEach(DBProcessInfoViewListener::dbProcessInfoViewTerminateProcessToolItemClicked);
    });

    processInfoText = new Text(this, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
    GridData textLayoutData = new GridData(SWT.FILL, SWT.BOTTOM, true, false);
    textLayoutData.heightHint = 200;
    processInfoText.setLayoutData(textLayoutData);
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:25,代码来源:DBProcessInfoView.java

示例2: DashboardComposite

/** {@code key} defines which data source will be used for display. */
public DashboardComposite(String key, Composite parent, int style) {
	super(parent, style);
	this.key = key;

	this.setLayout(new FillLayout());

	final SashForm sf = new SashForm(this, SWT.HORIZONTAL);
	sf.setLayout(new FillLayout());

	this.canvas = new VisualisationCanvas(sf, SWT.NONE);

	this.text = new Text(sf, SWT.LEFT | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
	text.setText("");

	createVisualisationControls(sf);
	sf.setWeights(new int[] { 45, 45, 10 });
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:18,代码来源:DashboardComposite.java

示例3: createContent

private void createContent() {
    toolBar = new ToolBar(this, SWT.HORIZONTAL);
    GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    SashForm sashForm = new SashForm(this, SWT.HORIZONTAL);
    sashForm.SASH_WIDTH = 2;
    sashForm.setLayoutData(layoutData);
    sashForm.setLayout(layout);

    createLeftPanel(sashForm);
    createRightPanel(sashForm);

    sashForm.setSashWidth(2);
    sashForm.setWeights(new int[] {15, 85});
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:17,代码来源:ProcessesView.java

示例4: insertHorizontalSeparator

/** Horizontal line separator */
public static Control insertHorizontalSeparator(Composite parent) {
	Label label = new Label(parent, SWT.SEPARATOR | SWT.WRAP | SWT.HORIZONTAL | SWT.SHADOW_NONE);
	GridData separatorLayoutData = new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1);
	separatorLayoutData.heightHint = 25;
	label.setLayoutData(separatorLayoutData);
	return label;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:WizardComponentUtils.java

示例5: addSeparator

private void addSeparator(Composite parent) {
	Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
	GridData gridData = new GridData();
	gridData.horizontalAlignment = GridData.FILL;
	gridData.grabExcessHorizontalSpace = true;
	separator.setLayoutData(gridData);
}
 
开发者ID:mnlipp,项目名称:EclipseMinifyBuilder,代码行数:7,代码来源:MinifyPropertyPage.java

示例6: BreadcrumbBar

public BreadcrumbBar ( final Composite parent, final int style )
{
    this.composite = new Composite ( parent, SWT.NONE );
    this.composite.addDisposeListener ( new DisposeListener () {

        @Override
        public void widgetDisposed ( final DisposeEvent e )
        {
            handleDispose ();
        }
    } );
    this.horizontal = ( style & SWT.HORIZONTAL ) != 0;

    final GridLayout layout = new GridLayout ( 1, false );
    layout.marginHeight = layout.marginWidth = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 0;

    if ( this.horizontal )
    {
        layout.marginWidth = 5;
        layout.horizontalSpacing = 5;
    }
    else
    {
        layout.marginHeight = 5;
        layout.verticalSpacing = 5;
    }

    this.composite.setLayout ( layout );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:30,代码来源:BreadcrumbBar.java

示例7: createAllEntries

private void createAllEntries ()
{
    final Composite extensionSpace = this.extensionSpaceProvider.getExtensionSpace ();
    if ( extensionSpace == null )
    {
        return;
    }

    this.wrapper = new Composite ( extensionSpace, SWT.NONE );
    final RowLayout layout = new RowLayout ( SWT.HORIZONTAL );
    layout.marginTop = layout.marginBottom = 0;
    this.wrapper.setLayout ( layout );

    int i = 0;
    for ( final Profile profile : this.profiles )
    {
        final ProfileEntry entry = createProfileEntry ( profile, i );
        if ( entry != null )
        {
            this.profileEntries.put ( profile.getId (), entry );
        }
        i++;
    }

    final Label sep = new Label ( this.wrapper, SWT.SEPARATOR | SWT.VERTICAL );
    sep.setLayoutData ( new RowData ( SWT.DEFAULT, 20 ) );

    extensionSpace.layout ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:ProfileManager.java

示例8: createSash

public static Sash
createSash(
	Composite	form,
	int			SASH_WIDTH )
{
    final Sash sash = new Sash(form, SWT.HORIZONTAL);
    Image image = new Image(sash.getDisplay(), 9, SASH_WIDTH);
    ImageData imageData = image.getImageData();
    int[] row = new int[imageData.width];
    for (int i = 0; i < row.length; i++) {
    	if (imageData.depth == 16) {
    		row[i] = (i % 3) != 0 ? 0x7BDEF7BD : 0xDEF7BDEB;
    	} else {
    		row[i] = (i % 3) != 0 ? 0xE0E0E0 : 0x808080;
    		if (imageData.depth == 32) {
    			row[i] = (row[i] & 255) + (row[i] << 8);
    		}
    	}
		}
    for (int y = 1; y < imageData.height - 1; y++) {
    	imageData.setPixels(0, y, row.length, row, 0);
    }
    Arrays.fill(row, imageData.depth == 16 ? 0x7BDEF7BD : 0xE0E0E0E0);
  	imageData.setPixels(0, 0, row.length, row, 0);
  	imageData.setPixels(0, imageData.height - 1, row.length, row, 0);
    image.dispose();
    image = new Image(sash.getDisplay(), imageData);
    sash.setBackgroundImage(image);
    sash.addDisposeListener(new DisposeListener() {
			@Override
			public void widgetDisposed(DisposeEvent e) {
				sash.getBackgroundImage().dispose();
			}
		});

    return( sash );
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:37,代码来源:Utils.java

示例9: FrameView

FrameView(Composite parent) {
	super(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	setLayout(layout);
	setBackground(ColorConstants.white);
	header = new Label(this, SWT.BORDER);
	header.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

	FontManager.setFont(header, Constants.MESSAGE_FONT_SIZE);

	viewer = new FrameViewer(this);

	slider = new Slider(this, SWT.HORIZONTAL | SWT.BORDER);
	slider.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

	slider.setMinimum(1);
	slider.setMaximum(1);
	slider.setIncrement(1);
	slider.addSelectionListener(new SelectionAdapter() {
		int sel = slider.getSelection();
		@Override
		public void widgetSelected(SelectionEvent e) {
			if(slider.getSelection() != sel) {
				model.setStep(slider.getSelection()-1);
				sel = slider.getSelection();
				PandionJUI.navigateToLine(model.getSourceFile(), model.getStepLine());
				//				slider.setToolTipText(slider.getSelection() + "/" + slider.getMaximum());
			}
		}
	});
	slider.setVisible(false);
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:32,代码来源:FrameView.java

示例10: createBlocksJournalTab

private void createBlocksJournalTab() {
    TabItem blocksJournalTabItem = new TabItem(tabFolder, SWT.NONE);
    blocksJournalTabItem.setText(resourceBundle.getString("blocks_journal"));

    Composite dbBlocksJournalViewComposite = new Composite(tabFolder, SWT.NONE);
    GridLayout gl = new GridLayout();
    gl.marginWidth= 0;
    gl.marginHeight = 0;

    dbBlocksJournalViewComposite.setLayout(gl);

    ToolBar dbBlocksJournalViewToolBar = new ToolBar(dbBlocksJournalViewComposite, SWT.HORIZONTAL);
    dbBlocksJournalViewToolBar.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));

    toggleVisibilityBlocksJournalProcessesFilterPanelToolItem = new ToolItem(dbBlocksJournalViewToolBar, SWT.CHECK);
    toggleVisibilityBlocksJournalProcessesFilterPanelToolItem.setImage(ImageUtils.getImage(Images.FILTER));
    toggleVisibilityBlocksJournalProcessesFilterPanelToolItem.setToolTipText(Images.FILTER.getDescription(resourceBundle));
    toggleVisibilityBlocksJournalProcessesFilterPanelToolItem.addListener(SWT.Selection, event ->
            setBlocksJournalProcessesFilterViewVisibility(toggleVisibilityBlocksJournalProcessesFilterPanelToolItem.getSelection()));
    toggleVisibilityBlocksJournalProcessesFilterPanelToolItem.setEnabled(false);

    ToolItem showColumnsDialogToolItem = new ToolItem(dbBlocksJournalViewToolBar, SWT.PUSH);
    showColumnsDialogToolItem.setImage(ImageUtils.getImage(Images.TABLE));
    showColumnsDialogToolItem.setToolTipText(resourceBundle.getString("columns"));
    showColumnsDialogToolItem.addListener(SWT.Selection, event -> showDbBlocksJournalViewColumnsDialog());

    dbBlocksJournalProcessesFiltersView = new DBProcessesFiltersView(resourceBundle, dbBlocksJournalViewComposite, SWT.NONE);
    dbBlocksJournalProcessesFiltersView.addListener(this);
    dbBlocksJournalProcessesFiltersView.hide();

    dbBlocksJournalView = new DBProcessesView(dbBlocksJournalViewComposite, SWT.NONE);
    dbBlocksJournalView.getTreeViewer().setDataSource(new DBBlocksJournalViewDataSource(resourceBundle));
    dbBlocksJournalView.getTreeViewer().addSelectionChangedListener(this::dbBlocksJournalViewSelectionChanged);

    dbBlocksJournalProcessInfoView = new DBProcessInfoView(resourceBundle, dbBlocksJournalViewComposite, SWT.NONE);
    dbBlocksJournalProcessInfoView.hideToolBar();
    dbBlocksJournalProcessInfoView.hide();

    blocksJournalTabItem.setControl(dbBlocksJournalViewComposite);
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:40,代码来源:ProcessesController.java

示例11: createDialogArea

private Control createDialogArea(Composite shell) {
       GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	shell.setLayout(layout);

	lblStep = new Label(shell, SWT.NONE);
	lblStep.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	lblStep.setText("Step 1 / 999");

	lblMessage = new Label(shell, SWT.NONE);
	lblMessage.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	lblMessage.setText("Idle");

	pbProg = new ProgressBar(shell, SWT.SMOOTH | SWT.INDETERMINATE);
	pbProg.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	pbProg.setMaximum(1000);
	pbProg.setSelection(0);
	pbProg.setSelection(256);

	final Label lblSeparator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
	lblSeparator.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

	txtLog = new Text(shell, SWT.MULTI
	          | SWT.BORDER
	          | SWT.H_SCROLL
	          | SWT.V_SCROLL);
	txtLog.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
	txtLog.setEditable(false);
	txtLog.setBackground(new Color(shell.getDisplay(), 10,10,10));
	txtLog.setForeground(new Color(shell.getDisplay(), 200,200,200));

	shell.layout();

	return shell;
}
 
开发者ID:aserg-ufmg,项目名称:RefDiff,代码行数:35,代码来源:ProgressBarDialog.java

示例12: AZProgressBar

/**
 *
 * @param parent
 * @param isIndeterminate
 * @param useInputButton determines whether the <code>inputButton</code> is available or not
 * @param image an <code>Image</code> to display; may be null
 */
public AZProgressBar(Composite parent, boolean isIndeterminate) {
	super(parent, SWT.NULL);

	incrementalProgressBar = new ProgressBar(this, SWT.HORIZONTAL);
	indeterminateProgressBar = new ProgressBar(this, SWT.HORIZONTAL
			| SWT.INDETERMINATE);

	stack = new StackLayout();
	setLayout(stack);
	pack();

	setIndeterminate(isIndeterminate);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:20,代码来源:AZProgressBar.java

示例13: populateProcessGroup

private void populateProcessGroup(Composite container) {
    Group processGroup = new Group(container, SWT.SHADOW_IN);
    processGroup.setText(resourceBundle.getString("processes"));
    processGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
    processGroup.setLayout(new GridLayout(3, false));

    Label updatePeriodLabel = new Label(processGroup, SWT.HORIZONTAL);
    updatePeriodLabel.setText(resourceBundle.getString("auto_update_interval"));

    GridData textGd = new GridData(GridData.FILL_HORIZONTAL);
    textGd.horizontalSpan = 2;
    textGd.horizontalIndent = 50;
    updatePeriod = new Spinner(processGroup, SWT.BORDER);
    updatePeriod.setLayoutData(textGd);
    updatePeriod.setMinimum(1);
    updatePeriod.setMaximum(100);
    updatePeriod.setSelection(settings.getUpdatePeriod());

    Label idleShowLabel = new Label(processGroup, SWT.HORIZONTAL);
    idleShowLabel.setText(resourceBundle.getString("show_idle_process"));
    GridData labelGd = new GridData(GridData.FILL_HORIZONTAL);
    labelGd.horizontalSpan = 2;
    idleShowLabel.setLayoutData(labelGd);

    showIdleButton = new Button(processGroup, SWT.CHECK);
    showIdleButton.setSelection(settings.getShowIdle());
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:27,代码来源:SettingsDialog.java

示例14: createDetailSection

/**
 * Below the panel, taking up the entire width of the window, is the detail section
 */
private void createDetailSection(IProgressReport pReport) {
	Label separator = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
	Utils.setLayoutData(separator, new GridData(SWT.FILL, SWT.TOP, true, false));

	detailSection = new TwistieSection(this, TwistieLabel.NONE);
	detailSection.setTitle(MessageText.getString("label.details"));
	Composite sectionContent = detailSection.getContent();

	detailSectionData = new GridData(SWT.FILL, SWT.FILL, true, true);
	Utils.setLayoutData(detailSection, detailSectionData);

	GridLayout sectionLayout = new GridLayout();
	sectionLayout.marginHeight = 0;
	sectionLayout.marginWidth = 0;
	sectionContent.setLayout(sectionLayout);
	detailSection.setEnabled(false);

	detailListWidget = new StyledText(sectionContent, SWT.BORDER | SWT.V_SCROLL
			| SWT.WRAP);
	Utils.setLayoutData(detailListWidget, new GridData(SWT.FILL, SWT.FILL, true, true));

	/*
	 * Add a default message instead of an empty box if there is no history;
	 * remove this later when a real detail message arrive
	 */

	IMessage[] messages = pReporter.getMessageHistory();
	/*
	 * Show error messages in red; otherwise use default color
	 */
	for (int i = 0; i < messages.length; i++) {
		if (messages[i].getType() == MSG_TYPE_ERROR) {
			appendToDetail(formatForDisplay(messages[i].getValue()), true);
		} else {
			appendToDetail(formatForDisplay(messages[i].getValue()), false);
		}
	}

	resizeDetailSection();

	/*
	 * Force a layout when ever the section is collapsed or expanded
	 */
	detailSection.addTwistieListener(new ITwistieListener() {
		@Override
		public void isCollapsed(boolean value) {
			resizeDetailSection();
			layout(true, true);
		}

	});

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

示例15: addSeparator

protected void addSeparator() {
	Label label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
	label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:4,代码来源:SchemaViewer.java


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