Java 类org.eclipse.ui.forms.widgets.ColumnLayout 实例源码

项目:Hydrograph    文件:RuntimePropertyDialog.java   
private void addErrorLabel(Composite container) {
    Composite composite_3 = new Composite(container, SWT.NONE);
    ColumnLayout cl_coposite_3 = new ColumnLayout();
    cl_coposite_3.topMargin=0;
    composite_3.setLayout(cl_coposite_3);
    ColumnLayoutData cld_composite_3 = new ColumnLayoutData();
    cld_composite_3.heightHint = 19;
    composite_3.setLayoutData(cld_composite_3);

    lblPropertyError = new Label(composite_3, SWT.NONE);
    ColumnLayoutData cld_lblPropertyError = new ColumnLayoutData();
    cld_lblPropertyError.heightHint = 25;
    lblPropertyError.setLayoutData(cld_lblPropertyError);
    lblPropertyError.setVisible(false);
    lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
}
项目:bdf2    文件:DeploymentPage.java   
@Override
protected void createFormContent(IManagedForm managedForm) {
    FormToolkit toolkit=managedForm.getToolkit();
    ScrolledForm form=managedForm.getForm();
    form.setText("流程模版导出与部署");
    ColumnLayout layout=new ColumnLayout();
    layout.topMargin=0;
    layout.bottomMargin=0;
    layout.leftMargin=0;
    layout.rightMargin=0;
    layout.maxNumColumns=1;
    layout.horizontalSpacing=5;
    layout.verticalSpacing=5;
    form.getBody().setLayout(layout);
    this.createExportSection(toolkit, form);
    this.createOnlineDeploymentSection(toolkit, form);
}
项目:termsuite-ui    文件:PipelinePart.java   
@PostConstruct
public void createControls(Composite parent,
        IEclipseContext context) {

    this.pipelineValidValue.setValue(false);
    this.context = context;

    FormToolkit toolkit = new FormToolkit(parent.getDisplay());
    form = toolkit.createScrolledForm(parent);
    form.setText(EDITOR_TITLE);
    Composite body = form.getBody();
    body.setLayout(new ColumnLayout());


    /*
     * Create the content
     */
    createPipelineContent(toolkit, form);
}
项目:xstreamer    文件:AbstractPlayerFormPage.java   
@Override
public void createPartControl(Composite parent) {
    toolkit = new FormToolkit(parent.getDisplay());
    form = toolkit.createScrolledForm(parent);
    setPageName();

    ColumnLayout layout = new ColumnLayout();
    form.getBody().setLayout(layout);

    createSquadSection();
    createImportSquadSection();

    getSite().setSelectionProvider(treeViewer);

    pageContent(parent);
}
项目:xstreamer    文件:AbstractPlayerFormPage.java   
@Override
public void createPartControl(Composite parent) {
    toolkit = new FormToolkit(parent.getDisplay());
    form = toolkit.createScrolledForm(parent);
    setPageName();

    ColumnLayout layout = new ColumnLayout();
    form.getBody().setLayout(layout);

    createArmySection();
    createImportSquadSection();

    getSite().setSelectionProvider(treeViewer);


    pageContent(parent);
}
项目:OpenSPIFe    文件:EMFDetailFormPart.java   
public static Section createCategorySection(FormToolkit toolkit, Composite parent, String category, Image icon, boolean hasTwistie) {
    if (EMFDetailUtils.isCategoryHeaderHidden(category)) {
        category = null;
    }
    Section categorySection = DetailFormToolkit.createSection(toolkit, parent, category, icon, hasTwistie);
    categorySection.clientVerticalSpacing = 0;
    if ((parent.getLayout() instanceof RowLayout) || (parent.getLayout() instanceof ColumnLayout)) {
        categorySection.setLayoutData(null);
    }
    Composite categorySubSection = toolkit.createComposite(categorySection);
    GridLayout layout = new GridLayout(2, false);
    layout.marginHeight = 3;
    layout.verticalSpacing = 2;
    layout.horizontalSpacing = 10;
    categorySubSection.setLayout(layout);
    categorySection.setClient(categorySubSection);
    return categorySection;
}
项目:OpenSPIFe    文件:EMFDetailSheet.java   
@Override
public boolean setInput(Object input) {
    ColumnLayout layout = new ColumnLayout();
    layout.topMargin = 0;
    layout.bottomMargin = 0;
    layout.verticalSpacing = 0;
    layout.maxNumColumns = 4;
    body.setLayout(layout);
    if (!(input instanceof EObject)) {
        return false;
    }
    FormToolkit toolkit = getToolkit();
    EObject object = (EObject) input;
    List<IFormPart> formParts = EMFDetailFormPart.getFormParts(toolkit, object, true, selectionProvider);
    for (IFormPart formPart : formParts) {
        addPart(formPart);
    }
    boolean result = super.setInput(input);
    ScrolledForm form = getForm();
    form.reflow(true);
    form.setOrigin(0, 0);
    checkParts(layout, formParts, input);
    return result;
}
项目:OpenSPIFe    文件:EMFDetailSheet.java   
private void checkParts(ColumnLayout layout, List<IFormPart> formParts, Object input) {
    for (IFormPart part : formParts) {
        Composite composite = null;
        if (part instanceof EMFDetailFormPart) {
            EMFDetailFormPart emfDetailFormPart = (EMFDetailFormPart) part;
            composite = emfDetailFormPart.getComposite();
        }
        if (part instanceof EMFTitleFormPart) {
            EMFTitleFormPart emfTitleFormPart = (EMFTitleFormPart) part;
            composite = emfTitleFormPart.getComposite();
        }
        if (composite != null) {
            checkControl(part, layout, composite, input);
        }
    }
}
项目:Hydrograph    文件:ParameterGridDialog.java   
private Composite createBaseContainer(Composite parent) {
    final Composite container = (Composite) super.createDialogArea(parent);
    ColumnLayout cl_container = new ColumnLayout();
    cl_container.verticalSpacing = 0;
    cl_container.maxNumColumns = 1;
    container.setLayout(cl_container);
    container.getShell().setText("Parameter Grid");
    return container;
}
项目:Hydrograph    文件:TextGrid.java   
private void initializeGridComposites(){
    textGridComposite = new ScrolledComposite(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    textGridCompositeLayoutData = new ColumnLayoutData();
    textGridCompositeLayoutData.heightHint = 267;
    textGridComposite.setLayoutData(textGridCompositeLayoutData);
    textGridComposite.setExpandVertical(true);
    textGridComposite.setExpandHorizontal(true);

    innerComposite = new Composite(textGridComposite, SWT.NONE);
    ColumnLayout cl_composite_1 = new ColumnLayout();
    cl_composite_1.maxNumColumns = 1;
    innerComposite.setLayout(cl_composite_1);

    textGridComposite.setContent(innerComposite);
}
项目:Hydrograph    文件:ELTDefaultSubgroup.java   
private ColumnLayout getGroupWidgetLayout() {
    ColumnLayout subGroupLayout = new ColumnLayout();
    subGroupLayout.maxNumColumns = 1;
    subGroupLayout.bottomMargin = 0;
    subGroupLayout.topMargin = 20;
    subGroupLayout.rightMargin = 0;
    return subGroupLayout;
}
项目:Hydrograph    文件:HiveOutputFieldDialog.java   
private void addErrorLabel(Composite container) {
    Composite composite_3 = new Composite(container, SWT.NONE);
    composite_3.setLayout(new ColumnLayout());
    ColumnLayoutData cld_composite_3 = new ColumnLayoutData();
    cld_composite_3.heightHint = 72;
    composite_3.setLayoutData(cld_composite_3);

    lblPropertyError = new Label(composite_3, SWT.NONE);
    ColumnLayoutData cld_lblPropertyError = new ColumnLayoutData();
    cld_lblPropertyError.heightHint = 24;
    lblPropertyError.setLayoutData(cld_lblPropertyError);
    lblPropertyError.setVisible(false);
    lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
}
项目:Hydrograph    文件:SecondaryColumnKeysDialog.java   
private void addErrorLabel(Composite container) {
    Composite composite_3 = new Composite(container, SWT.NONE);
    composite_3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
    composite_3.setLayout(new ColumnLayout());

    lblPropertyError = new Label(composite_3, SWT.NONE);
    lblPropertyError.setVisible(false);
    lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
}
项目:Hydrograph    文件:RuntimePropertyDialog.java   
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

    isAnyUpdatePerformed = false;

    Composite container = (Composite) super.createDialogArea(parent);
    container.getShell().setText(windowLabel);
    ColumnLayout cl_container = new ColumnLayout();
    cl_container.verticalSpacing = 0;
    cl_container.maxNumColumns = 1;
    container.setLayout(cl_container);

    addButtonPanel(container);

    Composite composite_2 = new Composite(container, SWT.NONE);
    composite_2.setLayout(new GridLayout(1, false));
    ColumnLayoutData cld_composite_2 = new ColumnLayoutData();
    cld_composite_2.heightHint = 453;
    composite_2.setLayoutData(cld_composite_2);

    createTable(composite_2);

    addErrorLabel(container);

    return container;
}
项目:xstreamer    文件:OtherCardsFormPage.java   
@Override
public void createPartControl(Composite parent) {
    toolkit = new FormToolkit(parent.getDisplay());
    form = toolkit.createScrolledForm(parent);
    form.setText("Skirmish Maps");

    ColumnLayout layout = new ColumnLayout();
    form.getBody().setLayout(layout);

    createMapSection();

    getSite().setSelectionProvider(listViewer);
}
项目:xstreamer    文件:GeneralFormPage.java   
@Override
public void createPartControl(Composite parent) {
    toolkit = new FormToolkit(parent.getDisplay());
    form = toolkit.createScrolledForm(parent);
    ColumnLayout layout = new ColumnLayout();
    form.getBody().setLayout(layout);

    createPlayerSection();
    createScoringSection();
    createNewsTickerSection();
}
项目:xstreamer    文件:MapsFormPage.java   
@Override
public void createPartControl(Composite parent) {
    toolkit = new FormToolkit(parent.getDisplay());
    form = toolkit.createScrolledForm(parent);
    form.setText("Skirmish Maps");

    ColumnLayout layout = new ColumnLayout();
    form.getBody().setLayout(layout);

    createMapSection();

    getSite().setSelectionProvider(listViewer);
}
项目:OpenSPIFe    文件:EMFDetailUtils.java   
public static Label createLabel(Composite parent, FormToolkit toolkit, String string) {
    Label label = toolkit.createLabel(parent, string);
    label.setBackground(parent.getBackground());
    if (parent.getLayout() instanceof GridLayout) {
        label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
    } else if (parent.getLayout() instanceof ColumnLayout) {
        ColumnLayoutData data = new ColumnLayoutData();
        data.horizontalAlignment = SWT.LEFT;
        label.setLayoutData(data);
    } else {
        Logger logger = Logger.getLogger(EMFDetailFormPart.class);
        logger.warn("unexpected layout for label");
    }
    return label;
}
项目:OpenSPIFe    文件:EMFDetailSheet.java   
private void checkControl(IFormPart emfDetailFormPart, Layout layout, Control control, Object input) {
    Object layoutData = control.getLayoutData();
    if (layoutData != null) {
        String mismatch = null;
        if ((layout instanceof ColumnLayout) && !(layoutData instanceof ColumnLayoutData)) {
            mismatch = "ColumnLayout is incompatible with " + layoutData;
        }
        if ((layout instanceof GridLayout) && !(layoutData instanceof GridData)) {
            mismatch = "GridLayout is incompatible with " + layoutData;
        }
        if ((layout instanceof TableWrapLayout) && !(layoutData instanceof TableWrapData)) {
            mismatch = "TableWrapLayout is incompatible with " + layoutData;
        }
        if (mismatch != null) {
            StringBuilder message = new StringBuilder(mismatch);
            message.append('\n');
            message.append("clearing invalid layout data on control " + control + " in form part: " + emfDetailFormPart);
            message.append('\n');
            message.append("the input was: " + input);
            LogUtil.error(message);
            control.setLayoutData(null);
        }
    }
    if (control instanceof Composite) {
        Composite composite = (Composite) control;
        Control[] children = composite.getChildren();
        for (Control child : children) {
            checkControl(emfDetailFormPart, composite.getLayout(), child, input);
        }
    }
}
项目:idecore    文件:ApexPropertySheet.java   
protected void setUpLayout() {
    ColumnLayout layout = new ColumnLayout();
    layout.topMargin = 0;
    layout.bottomMargin = 5;
    layout.leftMargin = 10;
    layout.rightMargin = 10;
    layout.horizontalSpacing = 10;
    layout.verticalSpacing = 10;
    layout.maxNumColumns = 2;
    layout.minNumColumns = 1;
    form.getBody().setLayout(layout);
}
项目:birt    文件:UIUtil.java   
/**
 * Returns the height hint for the given control.
 * 
 * @param hHint
 *            the width hint
 * @param c
 *            the control
 * 
 * @return the height hint
 */
public static int getHeightHint( int hHint, Control c )
{
    if ( c instanceof Composite )
    {
        Layout layout = ( (Composite) c ).getLayout( );
        if ( layout instanceof ColumnLayout )
            return hHint;
    }
    return SWT.DEFAULT;
}
项目:elexis-3-core    文件:StickerComposite.java   
public StickerComposite(Composite parent, int style, FormToolkit toolkit){
    super(parent, style);
    setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
    ColumnLayout cwl = new ColumnLayout();
    cwl.maxNumColumns = 4;
    cwl.horizontalSpacing = 1;
    cwl.bottomMargin = 1;
    cwl.topMargin = 1;
    cwl.rightMargin = 1;
    cwl.leftMargin = 1;
    setLayout(cwl);
    this.toolkit = toolkit;
    this.setVisible(false);
}
项目:elexis-3-core    文件:LabeledInputField.java   
public Tableau(Composite parent, int minColumns, int maxColumns){
    super(parent, SWT.BORDER);
    ColumnLayout cl = new ColumnLayout();
    cl.maxNumColumns = maxColumns;
    cl.minNumColumns = minColumns;
    setLayout(cl);
}
项目:Hydrograph    文件:HiveOutputFieldDialog.java   
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

    isAnyUpdatePerformed = false;

    if (Constants.KEY_FIELDS_WINDOW_TITLE.equalsIgnoreCase(componentName)) {
        getShell().setText(Constants.KEY_FIELDS_WINDOW_TITLE);
    }
    if (Constants.OPERATION_FIELDS_WINDOW_TITLE.equalsIgnoreCase(componentName)) {
        getShell().setText(Constants.OPERATION_FIELDS_WINDOW_TITLE);
    }
    if (Constants.JOIN_KEYS_WINDOW_TITLE.equalsIgnoreCase(componentName)) {
        getShell().setText(Constants.JOIN_KEYS_WINDOW_TITLE);
    }
    if(Constants.LOOKUP_KEYS_WINDOW_TITLE.equalsIgnoreCase(componentName)){
        getShell().setText(Constants.LOOKUP_KEYS_WINDOW_TITLE);
    }
    if(Constants.PARTITION_KEYS_WINDOW_TITLE.equalsIgnoreCase(componentName)){
        getShell().setText(Constants.PARTITION_KEYS_WINDOW_TITLE);
    }
    Composite container = (Composite) super.createDialogArea(parent);
    ColumnLayout cl_container = new ColumnLayout();
    cl_container.verticalSpacing = 0;
    cl_container.maxNumColumns = 1;
    container.setLayout(cl_container);

    addButtonPanel(container);

    Composite tableComposite = new Composite(container, SWT.NONE);
    tableComposite.setLayout(new GridLayout(2, false));
    ColumnLayoutData cld_composite_2 = new ColumnLayoutData();
    cld_composite_2.heightHint = 453;
    tableComposite.setLayoutData(cld_composite_2);

    createSourceTable(tableComposite);
    createTargetTable(tableComposite);

    addErrorLabel(container);
    checkFieldsOnStartup();
    return container;
}
项目:xstreamer    文件:CountDownTimerPage.java   
@Override
public void createPartControl(Composite parent) {
    toolkit = new FormToolkit(parent.getDisplay());
    form = toolkit.createScrolledForm(parent);
    ColumnLayout layout = new ColumnLayout();
    form.getBody().setLayout(layout);

    Section timer = toolkit.createSection(form.getBody(), ExpandableComposite.TWISTIE | Section.DESCRIPTION| ExpandableComposite.TITLE_BAR);
    timer.setText("Timer Section");
    timer.setExpanded(true);
    timer.setDescription("Set the intial count down timer value.");
    Composite timerClient = toolkit.createComposite(timer);
    GridLayout timerGridLayout = new GridLayout();
    timerGridLayout.numColumns = 6;
    timerClient.setLayout(timerGridLayout);
    toolkit.createLabel(timerClient, "Match Length: ");

    hourText = toolkit.createText(timerClient, preference.getString(PreferenceConstants.TIMER_HOUR_DEFAULT));
    hourText.setLayoutData(createTimerTextPadding());

    toolkit.createLabel(timerClient, ":");      
    minuteText = toolkit.createText(timerClient, preference.getString(PreferenceConstants.TIMER_MINUTES_DEFAULT));
    minuteText.setLayoutData(createTimerTextPadding());

    toolkit.createLabel(timerClient, ":");
    secondsText = toolkit.createText(timerClient, preference.getString(PreferenceConstants.TIMER_SECONDS_DEFAULT));
    secondsText.setLayoutData(createTimerTextPadding());

    toolkit.createLabel(timerClient, " ");

    resetButton = toolkit.createButton(timerClient, "Reset", SWT.PUSH | SWT.RESIZE);
    Button startPauseButton = toolkit.createButton(timerClient, "Start", SWT.PUSH | SWT.RESIZE);

    GridData resetButtonData = new GridData();
    resetButtonData.horizontalSpan = 2;
    resetButtonData.widthHint = 60;
    resetButton.setLayoutData(resetButtonData);     
    resetButton.addSelectionListener(new RestTimerListener(startPauseButton));

    toolkit.createLabel(timerClient, " ");

    GridData startPauseButtonData = new GridData();
    startPauseButtonData.horizontalSpan = 2;
    startPauseButtonData.widthHint = 70;
    startPauseButton.setLayoutData(startPauseButtonData);
    startPauseButton.addSelectionListener(new StartPauseButtonListener(startPauseButton));

    timer.setClient(timerClient);

    createCountDownSection();

}
项目:mule-tooling-incubator    文件:MuleEnvironmentConfigsPart.java   
private void configurePanel(Section section, FormToolkit toolkit) {

    Composite globalPanel = toolkit.createComposite(section);

    ColumnLayout layout = new ColumnLayout();
    layout.maxNumColumns = 1;
    layout.minNumColumns = 1;

    globalPanel.setLayout(layout);

    textsTable = new HashMap<String, Text>();


    addTopPanel(toolkit, globalPanel);
    buildEnvironmentsPanels(toolkit, globalPanel);

    toolkit.paintBordersFor(globalPanel);
    section.setClient(globalPanel);

    updateFieldsEnablement();
}