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


Java Resources.INDENT属性代码示例

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


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

示例1: createCombo

public static Combo createCombo(final AbstractDialog dialog, final Composite composite, final String title, final int span) {
    if (title != null) {
        final Label label = new Label(composite, SWT.LEFT);
        label.setText(ResourceString.getResourceString(title));
    }

    final GridData gridData = new GridData();
    gridData.horizontalSpan = span;
    gridData.horizontalAlignment = GridData.FILL;
    gridData.horizontalIndent = Resources.INDENT;
    gridData.grabExcessHorizontalSpace = true;

    final Combo combo = new Combo(composite, SWT.NONE);
    combo.setLayoutData(gridData);

    ListenerAppender.addComboListener(combo, dialog, false);

    return combo;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:19,代码来源:CompositeFactory.java

示例2: createCheckbox

public static Button createCheckbox(final AbstractDialog dialog, final Composite composite, final String title, final boolean indent, final int span) {
    final Button checkbox = new Button(composite, SWT.CHECK);
    checkbox.setText(ResourceString.getResourceString(title));

    final GridData gridData = new GridData();

    if (span != -1) {
        gridData.horizontalSpan = span;
    }
    if (indent) {
        gridData.horizontalIndent = Resources.INDENT;
    }

    checkbox.setLayoutData(gridData);

    ListenerAppender.addCheckBoxListener(checkbox, dialog);

    return checkbox;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:19,代码来源:CompositeFactory.java

示例3: createRadio

public static Button createRadio(final AbstractDialog dialog, final Composite composite, final String title, final int span, final boolean indent) {
    final Button radio = new Button(composite, SWT.RADIO);
    radio.setText(ResourceString.getResourceString(title));

    final GridData gridData = new GridData();

    if (span != -1) {
        gridData.horizontalSpan = span;
    }

    if (indent) {
        gridData.horizontalIndent = Resources.INDENT;
    }

    radio.setLayoutData(gridData);

    ListenerAppender.addCheckBoxListener(radio, dialog);

    return radio;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:CompositeFactory.java

示例4: createCombo

public static Combo createCombo(AbstractDialog dialog, Composite composite,
		String title, int span) {
	if (title != null) {
		Label label = new Label(composite, SWT.LEFT);
		label.setText(ResourceString.getResourceString(title));
	}

	GridData gridData = new GridData();
	gridData.horizontalSpan = span;
	gridData.horizontalAlignment = GridData.FILL;
	gridData.horizontalIndent = Resources.INDENT;
	gridData.grabExcessHorizontalSpace = true;

	Combo combo = new Combo(composite, SWT.NONE);
	combo.setLayoutData(gridData);

	ListenerAppender.addComboListener(combo, dialog, false);

	return combo;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:20,代码来源:CompositeFactory.java

示例5: createCheckbox

public static Button createCheckbox(AbstractDialog dialog,
		Composite composite, String title, boolean indent, int span) {
	Button checkbox = new Button(composite, SWT.CHECK);
	checkbox.setText(ResourceString.getResourceString(title));

	GridData gridData = new GridData();

	if (span != -1) {
		gridData.horizontalSpan = span;
	}
	if (indent) {
		gridData.horizontalIndent = Resources.INDENT;
	}

	checkbox.setLayoutData(gridData);

	ListenerAppender.addCheckBoxListener(checkbox, dialog);

	return checkbox;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:20,代码来源:CompositeFactory.java

示例6: createRadio

public static Button createRadio(AbstractDialog dialog,
		Composite composite, String title, int span, boolean indent) {
	Button radio = new Button(composite, SWT.RADIO);
	radio.setText(ResourceString.getResourceString(title));

	GridData gridData = new GridData();

	if (span != -1) {
		gridData.horizontalSpan = span;
	}

	if (indent) {
		gridData.horizontalIndent = Resources.INDENT;
	}

	radio.setLayoutData(gridData);

	ListenerAppender.addCheckBoxListener(radio, dialog);

	return radio;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:21,代码来源:CompositeFactory.java

示例7: AbstractPathText

public AbstractPathText(final Composite parent, final File argProjectDir, final boolean indent) {
    text = new Text(parent, SWT.BORDER);
    projectDir = argProjectDir;

    final GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gridData.grabExcessHorizontalSpace = true;

    if (indent) {
        gridData.horizontalIndent = Resources.INDENT;
    }

    text.setLayoutData(gridData);

    openBrowseButton = new Button(parent, SWT.LEFT);
    openBrowseButton.setText(" " + JFaceResources.getString("openBrowse") + " ");

    openBrowseButton.addSelectionListener(new SelectionAdapter() {

        /**
         * {@inheritDoc}
         */
        @Override
        public void widgetSelected(final SelectionEvent e) {
            String saveFilePath = selectPathByDilaog();

            if (saveFilePath != null) {
                saveFilePath = FileUtils.getRelativeFilePath(projectDir, saveFilePath);
                setText(saveFilePath);
            }
        }
    });
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:32,代码来源:AbstractPathText.java

示例8: createReadOnlyCombo

public static Combo createReadOnlyCombo(final AbstractDialog dialog, final Composite composite, final String title, final int span, final int width) {
    final GridData gridData = new GridData();
    gridData.horizontalSpan = span;

    if (title != null) {
        gridData.horizontalIndent = Resources.INDENT;

        final Label label = new Label(composite, SWT.LEFT);

        final GridData labelGridData = new GridData();
        labelGridData.horizontalAlignment = SWT.LEFT;
        label.setLayoutData(labelGridData);
        label.setText(ResourceString.getResourceString(title));
    }

    if (width > 0) {
        gridData.widthHint = width;

    } else {
        gridData.horizontalAlignment = GridData.FILL;
        gridData.grabExcessHorizontalSpace = true;
    }

    final Combo combo = new Combo(composite, SWT.READ_ONLY);
    combo.setLayoutData(gridData);

    ListenerAppender.addComboListener(combo, dialog, false);

    return combo;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:30,代码来源:CompositeFactory.java

示例9: createText

public static Text createText(final AbstractDialog dialog, final Composite composite, final String title, final int span, final int width, final int style, final boolean imeOn, final boolean indent) {
    if (title != null) {
        final Label label = new Label(composite, SWT.NONE);
        if (indent) {
            final GridData labelGridData = new GridData();
            labelGridData.horizontalAlignment = SWT.LEFT;
            label.setLayoutData(labelGridData);
        }

        label.setText(ResourceString.getResourceString(title));
    }

    final GridData textGridData = new GridData();
    textGridData.horizontalSpan = span;
    if (indent) {
        textGridData.horizontalIndent = Resources.INDENT;
    }

    if (width > 0) {
        textGridData.widthHint = width;

    } else {
        textGridData.horizontalAlignment = GridData.FILL;
        textGridData.grabExcessHorizontalSpace = true;
    }

    final Text text = new Text(composite, style);
    text.setLayoutData(textGridData);

    ListenerAppender.addTextListener(text, dialog, imeOn);

    return text;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:33,代码来源:CompositeFactory.java

示例10: createLabelAsValue

public static Label createLabelAsValue(final Composite composite, final String title, final int span) {
    final Label label = new Label(composite, SWT.NONE);
    label.setText(ResourceString.getResourceString(title));

    final GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalIndent = Resources.INDENT;
    gridData.horizontalSpan = span;

    label.setLayoutData(gridData);

    return label;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:14,代码来源:CompositeFactory.java

示例11: createLabel

public static Label createLabel(final Composite composite, final String title, final int span, final int width, final boolean leftAlign, final boolean indent) {
    final Label label = new Label(composite, SWT.NONE);
    label.setText(ResourceString.getResourceString(title));

    final GridData gridData = new GridData();
    if (indent) {
        gridData.horizontalIndent = Resources.INDENT;
    }
    if (leftAlign) {
        gridData.horizontalAlignment = SWT.LEFT;

    } else {
        gridData.horizontalAlignment = SWT.RIGHT;
    }

    if (span > 0 || width > 0) {
        if (span > 0) {
            gridData.horizontalSpan = span;
        }
        if (width > 0) {
            gridData.widthHint = width;
        }
    }

    label.setLayoutData(gridData);

    return label;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:28,代码来源:CompositeFactory.java

示例12: createTextArea

public static Text createTextArea(final AbstractDialog dialog, final Composite composite, final String title, final int width, final int height, final int span, final boolean selectAll, final boolean imeOn, final boolean indent) {
    if (title != null) {
        final Label label = new Label(composite, SWT.NONE);

        final GridData labelGridData = new GridData();
        labelGridData.verticalAlignment = SWT.TOP;
        labelGridData.horizontalAlignment = SWT.LEFT;

        label.setLayoutData(labelGridData);

        label.setText(ResourceString.getResourceString(title));
    }

    final GridData textAreaGridData = new GridData();
    textAreaGridData.heightHint = height;
    textAreaGridData.horizontalSpan = span;

    if (width > 0) {
        textAreaGridData.widthHint = width;
    } else {
        textAreaGridData.horizontalAlignment = GridData.FILL;
        textAreaGridData.grabExcessHorizontalSpace = true;
    }

    if (title != null && indent) {
        textAreaGridData.horizontalIndent = Resources.INDENT;
    }

    final Text text = new Text(composite, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER);
    text.setLayoutData(textAreaGridData);

    ListenerAppender.addTextAreaListener(text, dialog, selectAll, imeOn);

    return text;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:35,代码来源:CompositeFactory.java

示例13: MultiLineCheckbox

public MultiLineCheckbox(final AbstractDialog dialog, final Composite parent, final String title, final boolean indent, final int span) {
    super();

    final Composite box = new Composite(parent, SWT.NONE);

    final GridData boxGridData = new GridData(SWT.FILL, SWT.LEFT, true, false, span, 1);
    if (indent) {
        boxGridData.horizontalIndent = Resources.INDENT;
    }
    box.setLayoutData(boxGridData);

    final GridLayout layout = new GridLayout(2, false);
    layout.marginWidth = 0;
    box.setLayout(layout);

    checkboxButton = new Button(box, SWT.CHECK);
    final GridData checkboxGridData = new GridData();
    checkboxGridData.verticalAlignment = SWT.TOP;
    checkboxButton.setLayoutData(checkboxGridData);

    label = new Label(box, SWT.NONE);
    final GridData labelGridData = new GridData();
    labelGridData.horizontalIndent = Resources.CHECKBOX_INDENT;

    label.setLayoutData(labelGridData);
    label.setText(ResourceString.getResourceString(title));

    ListenerAppender.addCheckBoxListener(checkboxButton, dialog);

    label.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseUp(final MouseEvent e) {
            checkboxButton.setSelection(!checkboxButton.getSelection());
            dialog.validate();
        }
    });
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:37,代码来源:MultiLineCheckbox.java

示例14: AbstractPathText

public AbstractPathText(Composite parent, final File argProjectDir,
		boolean indent) {
	this.text = new Text(parent, SWT.BORDER);
	this.projectDir = argProjectDir;

	GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false, 1,
			1);
	gridData.grabExcessHorizontalSpace = true;

	if (indent) {
		gridData.horizontalIndent = Resources.INDENT;
	}

	this.text.setLayoutData(gridData);

	this.openBrowseButton = new Button(parent, SWT.LEFT);
	this.openBrowseButton.setText(" "
			+ JFaceResources.getString("openBrowse") + " ");

	this.openBrowseButton.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 */
		@Override
		public void widgetSelected(SelectionEvent e) {
			String saveFilePath = selectPathByDilaog();

			if (saveFilePath != null) {
				saveFilePath = FileUtils.getRelativeFilePath(projectDir,
						saveFilePath);
				setText(saveFilePath);
			}
		}
	});
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:36,代码来源:AbstractPathText.java

示例15: createReadOnlyCombo

public static Combo createReadOnlyCombo(AbstractDialog dialog,
		Composite composite, String title, int span, int width) {
	GridData gridData = new GridData();
	gridData.horizontalSpan = span;

	if (title != null) {
		gridData.horizontalIndent = Resources.INDENT;

		Label label = new Label(composite, SWT.LEFT);

		GridData labelGridData = new GridData();
		labelGridData.horizontalAlignment = SWT.LEFT;
		label.setLayoutData(labelGridData);
		label.setText(ResourceString.getResourceString(title));
	}

	if (width > 0) {
		gridData.widthHint = width;

	} else {
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = true;
	}

	Combo combo = new Combo(composite, SWT.READ_ONLY);
	combo.setLayoutData(gridData);

	ListenerAppender.addComboListener(combo, dialog, false);

	return combo;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:31,代码来源:CompositeFactory.java


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