本文整理了Java中org.eclipse.swt.widgets.Label.setSize()
方法的一些代码示例,展示了Label.setSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setSize()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:setSize
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
protected void createTextField(String labelText, String initialValue, boolean allowEmpty) {
Label label = new Label(panel, SWT.NONE);
label.setText(labelText);
label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
final Text text = new Text(panel, SWT.SINGLE | SWT.BORDER);
text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
text.setData(FIELD_NAME, labelText);
// make sure rows are the same height on both panels.
label.setSize(label.getSize().x, text.getSize().y);
if (initialValue != null) {
text.setText(initialValue);
}
if (!allowEmpty) {
validators.add(new Validator() {
@Override
public boolean validate() {
return !text.getText().equals(IInternalDebugCoreConstants.EMPTY_STRING);
}
});
text.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
validateFields();
}
});
}
controlList.add(text);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
label.setSize(label.getSize().x, text.getSize().y);
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
label.setSize(label.getSize().x, text.getSize().y);
代码示例来源:origin: BiglySoftware/BiglyBT
protected final void createGap(int width) {
width = (int)(width * width_multiplier );
// We create a label just so we can attach the menu to it.
assertConstructing();
Label result = new Label(splash, SWT.NONE);
result.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
result.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
result.setText("");
result.addMouseListener(this.mListener);
result.addMouseMoveListener(this.mMoveListener);
result.setLocation(this.xSize, 0);
result.setSize(width, hSize);
result.setMenu(this.menu);
this.xSize += width;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
label.setSize(label.getSize().x, text.getSize().y);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
Point labelSize = toolTipLabel.computeSize (SWT.DEFAULT, SWT.DEFAULT, true);
labelSize.x += 2; labelSize.y += 2;
toolTipLabel.setSize (labelSize);
toolTipShell.pack ();
toolTipLabel.setSize (area.width, area.height);
代码示例来源:origin: BiglySoftware/BiglyBT
protected final Label createFixedLabel(int width) {
assertConstructing();
Label result = new Label(splash, SWT.NONE);
result.setBackground(Colors.white);
result.setSize(width, SWT.DEFAULT );
result.setLocation(this.xSize, 0);
result.addMouseListener(this.mListener);
result.addMouseMoveListener(this.mMoveListener);
result.setMenu(this.menu);
if (this.hSize == -1) {
int hSizeText = result.getSize().y;
int hSizeImage = this.lDrag.getSize().y;
this.hSize = hSizeText > hSizeImage ? hSizeText : hSizeImage;
}
this.xSize += width;
return( result );
}
代码示例来源:origin: BiglySoftware/BiglyBT
ImageLoader.getInstance().setLabelImage(label, "tray");
final Rectangle bounds = label.getImage().getBounds();
label.setSize(bounds.width, bounds.height);
minimized.setSize(bounds.width + 2, bounds.height + 2);
screen = display.getClientArea();
内容来源于网络,如有侵权,请联系作者删除!