本文整理了Java中org.eclipse.swt.widgets.Label.moveAbove()
方法的一些代码示例,展示了Label.moveAbove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.moveAbove()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:moveAbove
暂无
代码示例来源:origin: org.metawidget.modules/metawidget-all
separator.moveAbove( label );
代码示例来源:origin: org.metawidget.modules/metawidget-all
label.moveAbove( control );
代码示例来源:origin: org.metawidget.modules/metawidget-all
protected String layoutBeforeChild( Control control, String labelText, String elementName, Map<String, String> attributes, Control container, SwtMetawidget metawidget ) {
State state = getState( (Composite) container );
// Add label
if ( SimpleLayoutUtils.needsLabel( labelText, elementName ) ) {
Label label = new Label( (Composite) container, SWT.None );
// Required
if ( attributes != null && TRUE.equals( attributes.get( REQUIRED ) ) && !WidgetBuilderUtils.isReadOnly( attributes ) && !metawidget.isReadOnly() ) {
label.setText( labelText + "*" + StringUtils.SEPARATOR_COLON );
} else {
label.setText( labelText + StringUtils.SEPARATOR_COLON );
}
CC labelConstraints = new CC();
labelConstraints.cell( state.currentColumn * 2, state.currentRow );
labelConstraints.growX();
// Top align all labels, not just those belonging to 'tall' controls,
// so that tall controls, regular controls and nested Metawidget
// controls all line up
labelConstraints.alignY( "top" );
// Apply some vertical padding so the label lines up with the control nicely
labelConstraints.pad( state.defaultLabelVerticalPadding, 0, state.defaultLabelVerticalPadding, 0 );
// Add it
label.setLayoutData( labelConstraints );
label.moveAbove( control );
}
return labelText;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
protected void addLabel(String label, boolean highlight, int indent) {
if (label == null)
return;
Label labelControl= createLabel(GRID_COLUMNS - 2, fControl.getParent(), label, indent);
labelControl.moveAbove(fControl);
if (highlight)
fHighlight= PreferenceHighlight.addHighlight(labelControl, fControl, false);
addChild(new PreferenceTreeNode<>(label, labelControl, true));
}
}
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
separator.moveAbove(null);
Label label = new Label(c, SWT.NONE);
label.setText(description);
label.setToolTipText(description);
label.moveAbove(null);
c.layout();
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
separator.moveAbove(null);
Label label = new Label(c, SWT.NONE);
label.setText(description);
label.setToolTipText(description);
label.moveAbove(null);
c.layout();
代码示例来源:origin: org.eclipse.xtext/ui
public void freeze() {
release();
if (sourceViewer instanceof SourceViewer) {
Control viewerControl = ((SourceViewer) sourceViewer).getControl();
if (viewerControl instanceof Composite) {
Composite composite = (Composite) viewerControl;
Display display = composite.getDisplay();
// Flush pending redraw requests:
while (!display.isDisposed() && display.readAndDispatch()) {
}
// Copy editor area:
GC gc = new GC(composite);
Point size;
try {
size = composite.getSize();
image = new Image(gc.getDevice(), size.x, size.y);
gc.copyArea(image, 0, 0);
} finally {
gc.dispose();
gc = null;
}
// Persist editor area while executing refactoring:
label = new Label(composite, SWT.NONE);
label.setImage(image);
label.setBounds(0, 0, size.x, size.y);
label.moveAbove(null);
}
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
rd.width = 8;
spacer.setLayoutData(rd);
spacer.moveAbove(null);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
label.setImage(image);
label.setBounds(0, 0, size.x, size.y);
label.moveAbove(null);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
label.setImage(image);
label.setBounds(0, 0, size.x, size.y);
label.moveAbove(null);
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
label.setImage(image);
label.setBounds(0, 0, size.x, size.y);
label.moveAbove(null);
内容来源于网络,如有侵权,请联系作者删除!