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


Java Section.layout方法代码示例

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


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

示例1: initFromModelInternal

import org.eclipse.ui.forms.widgets.Section; //导入方法依赖的package包/类
@Override
protected final void initFromModelInternal() {

    ZooKeeperConnectionModel model = getModel();
    ZooKeeperConnectionDescriptor descriptor = model.getKey();

    String rootPath = descriptor.getRootPath();
    rootPath = (rootPath != null) ? rootPath : "/";
    _RootPathText.setText(rootPath);

    int sessionTimeout = descriptor.getSessionTimeout();
    _SessionTimeoutText.setText(String.valueOf(sessionTimeout));

    initPropertiesSectionFromModel();

    Section propertiesSection = getPropertiesSection();
    if (propertiesSection != null) {
        propertiesSection.layout(true);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:21,代码来源:ZooKeeperConnectionModelMainFormPage.java

示例2: initFromModelInternal

import org.eclipse.ui.forms.widgets.Section; //导入方法依赖的package包/类
@Override
protected final void initFromModelInternal() {

    JmxConnectionModel model = getModel();
    JmxConnectionDescriptor descriptor = model.getKey();

    String jmxServiceUrl = String.valueOf(descriptor.getJmxServiceUrl());
    _ServiceUrlText.setText(jmxServiceUrl);

    String userName = descriptor.getUserName();
    userName = (userName != null) ? userName : "";
    _UserNameText.setText(userName);

    if (userName != null) {
        String password = descriptor.getPassword();
        password = (password != null) ? password : "";
        _PasswordText.setText(password);
    }
    
    initPropertiesSectionFromModel();

    Section propertiesSection = getPropertiesSection();
    if (propertiesSection != null) {
        propertiesSection.layout(true);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:27,代码来源:JmxConnectionModelMainFormPage.java

示例3: initFromModelInternal

import org.eclipse.ui.forms.widgets.Section; //导入方法依赖的package包/类
@Override
protected void initFromModelInternal() {

    initPrimarySectionFromModel();
    initDetailSectionFromModel();
    initInfoSectionFromModel();
    packTable(getInfoTable(), DEFAULT_NAME_VALUE_COLUMN_WIDTHS);
    initDescriptorSectionFromModel();
    packTable(getDescriptorTable(), DEFAULT_NAME_VALUE_COLUMN_WIDTHS);

    // forceLayout();

    Section primarySection = getPrimarySection();
    if (primarySection != null) {
        primarySection.layout(true);
    }
    Section infoSection = getInfoSection();
    if (infoSection != null) {
        infoSection.layout(true);
    }
    Section descriptionSection = getDescriptorSection();
    if (descriptionSection != null) {
        descriptionSection.layout(true);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:26,代码来源:BaseJmxModelMainFormPage.java

示例4: activateFilter

import org.eclipse.ui.forms.widgets.Section; //导入方法依赖的package包/类
/**
 * Activates the specified filter.
 *
 * @param   filter  a filter that must be activated
 */
private void activateFilter(IFilter filter) {
    Section section = getSection();

    // Freezes the section widget.
    section.setRedraw(false);

    // Updates the filter button's state.
    Control[] controls = filterButtons.getChildren();
    for (int i = 0; i < controls.length; ++i) {
        Control control = controls[i];
        Button button = (Button) control;

        button.setSelection(control.getData() == filter);
    }

    // If there is a new filter to activate, do the activation job.
    if (filter != activeFilter) {

        // Deactivates the previous filter.
        if (activeFilter != null) {
            activeFilter.disposeViewerFilers(tableViewer);
            activeFilter.disposeControls();
            activeFilter.setDoxyfile(null);
            activeFilter = null;
        }

        // Activates the new filter.
        activeFilter = filter;
        activeFilter.setDoxyfile(doxyfile);
        activeFilter.createControls(getManagedForm(), filterControls);
        activeFilter.createViewerFilters(tableViewer);
        tableViewer.refresh();

        // Adapts the size of the filter control container & relayout the section content.
        Object tableLayoutData = tableViewer.getTable().getLayoutData();
        FormData tableFormData = (FormData) tableLayoutData;
        if (filterControls.getChildren().length == 0) {
            filterControls.setVisible(false);
            tableFormData.top = new FormAttachment(0, 0);
        } else {
            filterControls.setVisible(true);
            tableFormData.top = new FormAttachment(filterControls, 6, SWT.BOTTOM);
        }

        // Reactivates section widget.
        section.layout(true, true);
    }

    // Reactivates the redrawing.
    section.setRedraw(true);
}
 
开发者ID:anb0s,项目名称:eclox,代码行数:57,代码来源:MasterPart.java


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