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

项目: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));
}
项目:Hydrograph    文件:ParameterGridDialog.java   
private Composite attachButtonContainer(final Composite container) {
    Composite composite = new Composite(container, SWT.NONE);
    composite.setLayout(new GridLayout(4, false));
    ColumnLayoutData cld_composite = new ColumnLayoutData();
    cld_composite.horizontalAlignment = ColumnLayoutData.RIGHT;
    cld_composite.heightHint = 30;
    composite.setLayoutData(cld_composite);
    return composite;
}
项目: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    文件: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    文件:HiveOutputFieldDialog.java   
protected Composite addButtonPanel(Composite container) {
    Composite composite_1 = new Composite(container, SWT.NONE);
    composite_1.setLayout(new GridLayout(5, false));
    ColumnLayoutData cld_composite_1 = new ColumnLayoutData();
    cld_composite_1.horizontalAlignment = ColumnLayoutData.RIGHT;
    cld_composite_1.heightHint = 28;
    composite_1.setLayoutData(cld_composite_1);

    Label addButton = new Label(composite_1, SWT.NONE);
    addButton.setToolTipText(Messages.ADD_KEY_SHORTCUT_TOOLTIP);
    addButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    addButton.setImage(ImagePathConstant.ADD_BUTTON.getImageFromRegistry());
    attachAddButtonListern(addButton);

    deleteButton = new Label(composite_1, SWT.NONE);
    deleteButton.setToolTipText(Messages.DELETE_KEY_SHORTCUT_TOOLTIP);
    deleteButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    deleteButton.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
    attachDeleteButtonListener(deleteButton);

    upButton = new Label(composite_1, SWT.NONE);
    upButton.setToolTipText(Messages.MOVE_UP_KEY_SHORTCUT_TOOLTIP);
    upButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    upButton.setImage(ImagePathConstant.MOVEUP_BUTTON.getImageFromRegistry());
    attachUpButtonListener(upButton);

    downButton = new Label(composite_1, SWT.NONE);
    downButton.setToolTipText(Messages.MOVE_DOWN_KEY_SHORTCUT_TOOLTIP);
    downButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    downButton.setImage(ImagePathConstant.MOVEDOWN_BUTTON.getImageFromRegistry());
    attachDownButtonListerner(downButton);
    deleteButton.setEnabled(false);
    upButton.setEnabled(false);
    downButton.setEnabled(false);
    return composite_1;
}
项目: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;
}
项目:Hydrograph    文件:RuntimePropertyDialog.java   
private void addButtonPanel(Composite container) {
    Composite composite_1 = new Composite(container, SWT.NONE);
    composite_1.setLayout(new GridLayout(4, false));
    ColumnLayoutData cld_composite_1 = new ColumnLayoutData();
    cld_composite_1.horizontalAlignment = ColumnLayoutData.RIGHT;
    cld_composite_1.heightHint = 30;
    composite_1.setLayoutData(cld_composite_1);

    Button addButton = new Button(composite_1, SWT.NONE);
    addButton.setToolTipText(Messages.ADD_KEY_SHORTCUT_TOOLTIP);
    addButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    addButton.setImage(ImagePathConstant.ADD_BUTTON.getImageFromRegistry());
    attachAddButtonListern(addButton);

    deleteButton = new Button(composite_1, SWT.NONE);
    deleteButton.setToolTipText(Messages.DELETE_KEY_SHORTCUT_TOOLTIP);
    deleteButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    deleteButton.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
    attachDeleteButtonListener(deleteButton);

    upButton = new Button(composite_1, SWT.NONE);
    upButton.setToolTipText(Messages.MOVE_UP_KEY_SHORTCUT_TOOLTIP);
    upButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    upButton.setImage(ImagePathConstant.MOVEUP_BUTTON.getImageFromRegistry());
    attachUpButtonListener(upButton);

    downButton = new Button(composite_1, SWT.NONE);
    downButton.setToolTipText(Messages.MOVE_DOWN_KEY_SHORTCUT_TOOLTIP);
    downButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    downButton.setImage(ImagePathConstant.MOVEDOWN_BUTTON.getImageFromRegistry());
    attachDownButtonListerner(downButton);
    deleteButton.setEnabled(false);
    upButton.setEnabled(false);
    downButton.setEnabled(false);
}
项目: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);
        }
    }
}
项目: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;
}