當前位置: 首頁>>代碼示例>>Java>>正文


Java ScrolledComposite.layout方法代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.ScrolledComposite.layout方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrolledComposite.layout方法的具體用法?Java ScrolledComposite.layout怎麽用?Java ScrolledComposite.layout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.custom.ScrolledComposite的用法示例。


在下文中一共展示了ScrolledComposite.layout方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showSection

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void
showSection(
	TreeItem 	section,
	boolean		focus )
{
saveLatestSelection( section );

   ScrolledComposite item = (ScrolledComposite)section.getData("Panel");

   if (item != null) {

   	ensureSectionBuilt(section, true);

     layoutConfigSection.topControl = item;

     setupSC(item);

     if (filterText != null && filterText.length() > 0) {
     	hilightText(item, filterText);
       item.layout(true, true);
     }

     cConfigSection.layout();

     updateHeader(section);

     if ( focus ){
   	  layoutConfigSection.topControl.traverse( SWT.TRAVERSE_TAB_NEXT);
     }
   }
 }
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:32,代碼來源:ConfigView.java

示例2: updateScrolledContent

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
public static void updateScrolledContent(final Composite composite) {

		Composite child = composite;
		Composite parent = composite.getParent();

		while (parent != null) {

			// go up until the first scrolled container

			if (parent instanceof ScrolledComposite) {

				final ScrolledComposite scrolledContainer = (ScrolledComposite) parent;

				/*
				 * update layout: both methods must be called because the size can be modified and a
				 * layout with resized controls MUST be done !!!!
				 */
				scrolledContainer.setMinSize(child.computeSize(SWT.DEFAULT, SWT.DEFAULT));
				scrolledContainer.layout(true, true);

				break;
			}

			child = parent;
			parent = parent.getParent();
		}
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:28,代碼來源:UI.java

示例3: createUITab_10_Tour

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private Composite createUITab_10_Tour(final Composite parent) {

		// scrolled container
		_tab1Container = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
		_tab1Container.setExpandVertical(true);
		_tab1Container.setExpandHorizontal(true);
		_tab1Container.addControlListener(new ControlAdapter() {
			@Override
			public void controlResized(final ControlEvent e) {
				onResizeTab1();
			}
		});
		{
			_tourContainer = new Composite(_tab1Container, SWT.NONE);
			GridDataFactory.fillDefaults().applyTo(_tourContainer);
			_tk.adapt(_tourContainer);
			GridLayoutFactory.swtDefaults().applyTo(_tourContainer);
//			_tourContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));

			// set content for scrolled composite
			_tab1Container.setContent(_tourContainer);

			_tk.setBorderStyle(SWT.BORDER);
			{
				createUISection_110_Title(_tourContainer);
				createUI_SectionSeparator(_tourContainer);

				createUISection_120_DateTime(_tourContainer);
				createUI_SectionSeparator(_tourContainer);

				createUISection_130_Personal(_tourContainer);
				createUI_SectionSeparator(_tourContainer);

				createUISection_140_Weather(_tourContainer);
				createUI_SectionSeparator(_tourContainer);

				createUISection_150_Characteristics(_tourContainer);
			}
		}

		// compute width for all controls and equalize column width for the different sections
		_tab1Container.layout(true, true);
		UI.setEqualizeColumWidths(_firstColumnControls);
		UI.setEqualizeColumWidths(_secondColumnControls);

		_tab1Container.layout(true, true);
		UI.setEqualizeColumWidths(_firstColumnContainerControls);

		/*
		 * Reduce width that the decorator is not truncated
		 */
		final GridData gd = (GridData) _lblTimeZone.getLayoutData();
		gd.widthHint -= UI.DECORATOR_HORIZONTAL_INDENT;

		return _tab1Container;
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:57,代碼來源:TourDataEditorView.java

示例4: showSection

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void showSection(TreeItem section) {
  ScrolledComposite item = (ScrolledComposite)section.getData("Panel");

  if (item != null) {
  	
  	ensureSectionBuilt(section, true);
  	
    layoutConfigSection.topControl = item;
    
    setupSC(item);

    if (filterText != null && filterText.length() > 0) {
    	hilightText(item, filterText);
      item.layout(true, true);
    }

    cConfigSection.layout();
    
    updateHeader(section);
  }
}
 
開發者ID:AcademicTorrents,項目名稱:AcademicTorrents-Downloader,代碼行數:22,代碼來源:ConfigView.java

示例5: layoutPage

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
/**
 * Relayouts the box. Needed when box is dynamically resized. This is NOT a
 * nice solution.
 * 
 * @param heightSizeChange
 *            size delta
 */
public void layoutPage(int heightSizeChange) {
	ScrolledComposite scrollArea = (ScrolledComposite) getParent().getParent();
	scrollArea.setMinSize(scrollArea.getMinWidth(), scrollArea.getMinHeight() + heightSizeChange);
	scrollArea.layout();
}
 
開發者ID:edgarmueller,項目名稱:emfstore-rest,代碼行數:13,代碼來源:DecisionBox.java


注:本文中的org.eclipse.swt.custom.ScrolledComposite.layout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。