本文整理匯總了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);
}
}
}
示例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();
}
}
示例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;
}
示例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);
}
}
示例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();
}