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