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


Java Sash类代码示例

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


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

示例1: getControls

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private Control[] getControls(boolean onlyVisible)
{
  Control[] children = getChildren();
  Control[] result = new Control[0];
  for (int i = 0; i < children.length; i++)
  {
    if (children[i] instanceof Sash)
      continue;
    if (onlyVisible && !children[i].getVisible())
      continue;

    Control[] newResult = new Control[result.length + 1];
    System.arraycopy(result, 0, newResult, 0, result.length);
    newResult[result.length] = children[i];
    result = newResult;
  }
  return result;
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:19,代码来源:LiveSashForm.java

示例2: getControls

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
Control[] getControls( boolean onlyVisible){
    Control[] children = getChildren();
    Control[] result = new Control[0];
    for (int i = 0; i < children.length; i++) {
        if (children[i] instanceof Sash)
            continue;
        if (onlyVisible && !children[i].getVisible())
            continue;

        Control[] newResult = new Control[result.length + 1];
        System.arraycopy(result, 0, newResult, 0, result.length);
        newResult[result.length] = children[i];
        result = newResult;
    }
    return result;
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:17,代码来源:UrbanSashForm.java

示例3: setOrientation

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
/**
 * If orientation is SWT.HORIZONTAL, lay the controls in the SashForm out
 * side by side. If orientation is SWT.VERTICAL, lay the controls in the
 * SashForm out top to bottom.
 * 
 * @param orientation
 *            SWT.HORIZONTAL or SWT.VERTICAL
 * 
 * @exception SWTException
 *                <ul>
 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
 *                disposed</li>
 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
 *                thread that created the receiver</li>
 *                <li>ERROR_INVALID_ARGUMENT - if the value of orientation
 *                is not SWT.HORIZONTAL or SWT.VERTICAL
 *                </ul>
 */
public void setOrientation( int orientation){
    checkWidget();
    if (getOrientation() == orientation)
        return;
    if (orientation != SWT.HORIZONTAL && orientation != SWT.VERTICAL) {
        SWT.error(SWT.ERROR_INVALID_ARGUMENT);
    }
    sashStyle &= ~(SWT.HORIZONTAL | SWT.VERTICAL);
    sashStyle |= orientation == SWT.VERTICAL ? SWT.HORIZONTAL
            : SWT.VERTICAL;
    for (int i = 0; i < sashes.length; i++) {
        sashes[i].dispose();
        sashes[i] = new Sash(this, sashStyle);
        sashes[i].setBackground(background);
        sashes[i].setForeground(foreground);
        sashes[i].addListener(SWT.Selection, sashListener);
    }
    layout(false);
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:38,代码来源:UrbanSashForm.java

示例4: createUIContainer

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private void createUIContainer(final Composite parent) {

		final Composite container = new Composite(parent, SWT.NONE);
		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		// dlgContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
		{
			// left part (layer selection)
			_leftContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(0, 5, 0, 0).applyTo(_leftContainer);
			createUILayer(_leftContainer);

			// sash
			final Sash sash = new Sash(container, SWT.VERTICAL);
			net.tourbook.common.UI.addSashColorHandler(sash);

			// right part (map)
			final Composite mapContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(5, 0, 0, 0).spacing(0, 0).applyTo(mapContainer);
			createUIMap(mapContainer);

			_detailForm = new ViewerDetailForm(container, _leftContainer, sash, mapContainer, 30);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:DialogMPWms.java

示例5: createUI100Container

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private void createUI100Container(final Composite parent) {

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		{
			// left part (layer selection)
			_leftContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(0, 5, 0, 0).applyTo(_leftContainer);
			createUI110LeftContainer(_leftContainer);

			// sash
			final Sash sash = new Sash(container, SWT.VERTICAL);
			net.tourbook.common.UI.addSashColorHandler(sash);

			// right part (map)
			final Composite mapContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(5, 0, 0, 0).spacing(0, 0).applyTo(mapContainer);
			createUI180Map(mapContainer);

			_detailForm = new ViewerDetailForm(container, _leftContainer, sash, mapContainer, 30);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:DialogMPProfile.java

示例6: createUI100Container

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private void createUI100Container(final Composite parent) {

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		{
			// left part (layer selection)
			_leftContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(0, 5, 0, 0).applyTo(_leftContainer);
			createUI200LeftPart(_leftContainer);

			// sash
			final Sash sash = new Sash(container, SWT.VERTICAL);
			net.tourbook.common.UI.addSashColorHandler(sash);

			// right part (map)
			final Composite mapContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(5, 0, 0, 0).spacing(0, 0).applyTo(mapContainer);
			createUI300Map(mapContainer);

			_detailForm = new ViewerDetailForm(container, _leftContainer, sash, mapContainer, 30);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:DialogMPCustom.java

示例7: createUIContainer

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private void createUIContainer(final Composite parent, final PixelConverter pixelConverter) {

		final Composite container = new Composite(parent, SWT.NONE);
		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		// dlgContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
		{
			// left part (layer selection)
			_leftContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(0, 5, 0, 0).applyTo(_leftContainer);
			createUILayer(_leftContainer, pixelConverter);

			// sash
			final Sash sash = new Sash(container, SWT.VERTICAL);
			net.tourbook.util.UI.addSashColorHandler(sash);

			// right part (map)
			final Composite mapContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(5, 0, 0, 0).spacing(0, 0).applyTo(mapContainer);
			createUIMap(mapContainer, pixelConverter);

			_detailForm = new ViewerDetailForm(container, _leftContainer, sash, mapContainer, 30);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:DialogMPWms.java

示例8: createUI100Container

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private void createUI100Container(final Composite parent, final PixelConverter pixelConverter) {

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		{
			// left part (layer selection)
			_leftContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(0, 5, 0, 0).applyTo(_leftContainer);
			createUI110LeftContainer(_leftContainer, pixelConverter);

			// sash
			final Sash sash = new Sash(container, SWT.VERTICAL);
			net.tourbook.util.UI.addSashColorHandler(sash);

			// right part (map)
			final Composite mapContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(5, 0, 0, 0).spacing(0, 0).applyTo(mapContainer);
			createUI180Map(mapContainer, pixelConverter);

			_detailForm = new ViewerDetailForm(container, _leftContainer, sash, mapContainer, 30);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:DialogMPProfile.java

示例9: createUI100Container

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private void createUI100Container(final Composite parent, final PixelConverter pixelConverter) {

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		{
			// left part (layer selection)
			_leftContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(0, 5, 0, 0).applyTo(_leftContainer);
			createUI200LeftPart(_leftContainer, pixelConverter);

			// sash
			final Sash sash = new Sash(container, SWT.VERTICAL);
			net.tourbook.util.UI.addSashColorHandler(sash);

			// right part (map)
			final Composite mapContainer = new Composite(container, SWT.NONE);
			GridLayoutFactory.fillDefaults().extendedMargins(5, 0, 0, 0).spacing(0, 0).applyTo(mapContainer);
			createUI300Map(mapContainer, pixelConverter);

			_detailForm = new ViewerDetailForm(container, _leftContainer, sash, mapContainer, 30);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:DialogMPCustom.java

示例10: JoSashForm

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
public JoSashForm(final Composite parent, final ISplitCompositeSetupSpi setup) {
    super(parent, getSashFormStyle(setup));
    resizePolicy = setup.getResizePolicy();
    sashUtil = getSashUtil(setup);
    layout = new JoSashFormLayout(this, sashUtil);
    setLayout(layout);

    sash = new Sash(this, getSashStyle(setup));
    sash.setToolTipText(getToolTipText());
    sash.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(final Event event) {
            if (event.detail == SWT.DRAG) {
                return;
            }
            onDragSash(event);
        }
    });

    firstMinSize = new Point(SPLIT_MINIMUM, SPLIT_MINIMUM);
    secondMinSize = new Point(SPLIT_MINIMUM, SPLIT_MINIMUM);
}
 
开发者ID:jo-source,项目名称:jo-widgets,代码行数:23,代码来源:JoSashForm.java

示例11: getControls

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private Control[] getControls(boolean onlyVisible) {
	Control[] children = getChildren();
	Control[] controls = new Control[0];
	for (int i = 0; i < children.length; i++) {
		if (children[i] instanceof Sash)
			continue;
		if (onlyVisible && !children[i].getVisible())
			continue;

		Control[] newControls = new Control[controls.length + 1];
		System.arraycopy(controls, 0, newControls, 0, controls.length);
		newControls[controls.length] = children[i];
		controls = newControls;
	}
	return controls;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:17,代码来源:Splitter.java

示例12: paint

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
void paint(Sash sash, GC gc) {
	if (getSashWidth() == 0)
		return;
	Point size = sash.getSize();
	if (getOrientation() == SWT.HORIZONTAL) {
		gc.setForeground(ColorConstants.buttonDarker);
		gc.drawLine(getSashWidth() - 1, 0, getSashWidth() - 1, size.y);
		gc.setForeground(ColorConstants.buttonLightest);
		gc.drawLine(0, 0, 0, size.y);
	} else {
		gc.setForeground(ColorConstants.buttonDarker);
		gc.drawLine(0, 0, size.x, 0);
		gc.drawLine(0, getSashWidth() - 1, size.x, getSashWidth() - 1);
		gc.setForeground(ColorConstants.buttonLightest);
		gc.drawLine(0, 1, size.x, 1);
	}
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:18,代码来源:Splitter.java

示例13: setOrientation

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
/**
 * If orientation is SWT.HORIZONTAL, lay the controls in the SashForm out
 * side by side. If orientation is SWT.VERTICAL, lay the controls in the
 * SashForm out top to bottom.
 */
public void setOrientation(int orientation) {
	if (this.orientation == orientation)
		return;
	if (orientation != SWT.HORIZONTAL && orientation != SWT.VERTICAL) {
		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
	}
	this.orientation = orientation;

	int sashOrientation = (orientation == SWT.HORIZONTAL) ? SWT.VERTICAL
			: SWT.HORIZONTAL;
	for (int i = 0; i < sashes.length; i++) {
		sashes[i].dispose();
		sashes[i] = new Sash(this, sashOrientation);
		sashes[i].setBackground(ColorConstants.buttonLightest);
		sashes[i].addListener(SWT.Selection, sashListener);
	}
	layout();
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:24,代码来源:Splitter.java

示例14: createSections

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
/***************************************************************************
 * Create the main parts of the control
 **************************************************************************/
private void createSections()
{
	m_presentationSection = new Composite(this, SWT.NONE);
	m_presentationSection.setLayoutData(new GridData(GridData.FILL_BOTH));

	m_sash = new Sash(this, SWT.BORDER | SWT.HORIZONTAL );

	m_controlSection = new Composite(this, SWT.BORDER);
	m_controlSection.setLayoutData(new GridData(GridData.FILL_BOTH));

}
 
开发者ID:Spacecraft-Code,项目名称:SPELL,代码行数:15,代码来源:SplitPanel.java

示例15: saveChildControlSizes

import org.eclipse.swt.widgets.Sash; //导入依赖的package包/类
private void saveChildControlSizes() {
	// Save control sizes
	Control[] children = getChildren();
	int iChildToSave = 0;
	for (int i = 0; i < children.length && iChildToSave < 2; i++) {
		Control child = children[i];
		if (!(child instanceof Sash)) {
			currentSashInfo.savedSizes[iChildToSave] = child.getSize();
			iChildToSave++;
		}
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:CSashForm.java


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