本文整理了Java中org.eclipse.swt.widgets.Label.setLocation()
方法的一些代码示例,展示了Label.setLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setLocation()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:setLocation
暂无
代码示例来源: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: 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: rinde/RinSim
/**
* Configure shell.
*/
void createContent(Composite parent) {
canvas = new Canvas(parent, SWT.DOUBLE_BUFFERED | SWT.NONE
| SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL);
canvas.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
origin = new org.eclipse.swt.graphics.Point(0, 0);
size = START_SCREEN_SIZE;
canvas.addPaintListener(this);
canvas.addControlListener(this);
this.layout();
timeLabel = new Label(canvas, SWT.NONE);
timeLabel.setText("hello world");
timeLabel.pack();
timeLabel.setLocation(TIME_LABEL_LOC);
timeLabel
.setBackground(canvas.getDisplay().getSystemColor(SWT.COLOR_WHITE));
hBar = canvas.getHorizontalBar();
hBar.addSelectionListener(this);
vBar = canvas.getVerticalBar();
vBar.addSelectionListener(this);
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
caretLabel.setLocation(p);
caretLabel.setVisible(true);
代码示例来源:origin: BiglySoftware/BiglyBT
protected final Label createFixedTextLabel(String msg_key, boolean add_colon, boolean bold) {
assertConstructing();
Label result = new Label(splash, SWT.NONE);
result.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
result.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
result.setText(MessageText.getString(msg_key) + ((add_colon) ? ":" : ""));
if (bold) {
if (this.bold_font == null) {
this.bold_font = createBoldFont(result.getFont());
}
result.setFont(this.bold_font);
}
result.addMouseListener(this.mListener);
result.addMouseMoveListener(this.mMoveListener);
result.pack();
result.setLocation(this.xSize, 0);
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 += result.getSize().x + 3;
return( result );
}
代码示例来源:origin: BiglySoftware/BiglyBT
yPad = ( testTextHeight - lDragSize.y )/2;
lDrag.setLocation(0, yPad);
内容来源于网络,如有侵权,请联系作者删除!