本文整理了Java中org.eclipse.swt.widgets.Label.getBounds()
方法的一些代码示例,展示了Label.getBounds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getBounds()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:getBounds
暂无
代码示例来源:origin: pentaho/pentaho-kettle
wlQuoteString.setText( BaseMessages.getString( PKG, "ExecSQLDialog.QuoteString.Label" ) );
wlQuoteString.pack();
Rectangle rEachRow = wlEachRow.getBounds();
Rectangle rSingleStatement = wlSingleStatement.getBounds();
Rectangle rVariables = wlVariables.getBounds();
Rectangle rQuoteString = wlQuoteString.getBounds();
int width =
Math.max(
代码示例来源:origin: org.eclipse.e4.ui.workbench.addons/swt
@Override
public void updateRegion(Region region) {
region.add(label.getBounds());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.addons.swt
@Override
public void updateRegion(Region region) {
region.add(label.getBounds());
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void paintControl(PaintEvent e) {
/*
* The graphic is drawn to the left of the titleLabel so define the offset from the titleLabel
*/
int offsetX = titleLabel.getBounds().x - 10;
int offsetY = titleLabel.getBounds().y + 3;
if (null != twistieColor) {
e.gc.setBackground(twistieColor);
} else {
e.gc.setBackground(getForeground());
}
if (isCollapsed) {
e.gc.fillPolygon(translate(points_for_collapsed, offsetX, offsetY));
} else {
e.gc.fillPolygon(translate(points_for_expanded, offsetX, offsetY));
}
}
});
代码示例来源:origin: stefanhaustein/flowgrid
void setPosition(int row, int col, int height, int width) {
if (row != this.row || col != this.col || height != this.height || width != this.width) {
int newX = sge.screenX(col);
int newY = sge.screenY(row);
int newW = Math.round(cellSize * width);
int newH = Math.round(cellSize * height);
int oldX = sge.screenX(this.col);
int oldY = sge.screenY(this.row);
int oldW = Math.round(cellSize * this.width);
int oldH = Math.round(cellSize * this.height);
this.row = row;
this.col = col;
this.height = height;
this.width = width;
menuAnchor.setBounds(newX, newY, newW, newH);
System.err.println("bounds: " + menuAnchor.getBounds());
redraw(oldX, oldY, oldW, oldH, true);
redraw(newX, newY, newW, newH, true);
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void paintControl(PaintEvent e) {
String text = (String)notification_text.getData();
int style = SWT.LEFT;
Rectangle bounds = notification_text.getBounds();
bounds.x = 4;
bounds.y = 0;
bounds.width -= 8;
GCStringPrinter sp = new GCStringPrinter(e.gc, text, bounds, true, true, style );
sp.calculateMetrics();
sp.printString();
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
Rectangle paletteCanvasBounds = paletteCanvas.getBounds();
int minY = paletteCanvasBounds.y + 20;
Rectangle dataLabelBounds = dataLabel.getBounds();
int maxY = statusLabel.getBounds().y - dataLabelBounds.height - 20;
if (event.y > minY && event.y < maxY) {
Rectangle oldSash = sash.getBounds();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
@Override
public void paintControl(PaintEvent e) {
if (((GridData) fLabelControl.getLayoutData()).exclude) {
fParent.removePaintListener(this);
fLabelControl.setData(null);
return;
}
int GAP= 7;
int ARROW= 3;
Rectangle l= fLabelControl.getBounds();
Point c= fComboBox.getLocation();
e.gc.setForeground(e.display.getSystemColor(fColor));
int x2= c.x - GAP;
int y= l.y + l.height / 2 + 1;
e.gc.drawLine(l.x + l.width + GAP, y, x2, y);
e.gc.drawLine(x2 - ARROW, y - ARROW, x2, y);
e.gc.drawLine(x2 - ARROW, y + ARROW, x2, y);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
dialogBounds.height = labelTitle.getBounds().height + labelSeparator.getBounds().height + tableBounds.height
+ gl_composite.marginHeight * 2 + gl_composite.verticalSpacing * 2;
} else {
dialogBounds.height = text.getBounds().height + +labelSeparator.getBounds().height + tableBounds.height
+ gl_composite.marginHeight * 2 + gl_composite.verticalSpacing * 2;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
Rectangle bounds = imageLabel.getBounds();
final int adjust = HINDENT + bounds.width + layout.verticalSpacing
+ (layout.marginWidth * 2);
内容来源于网络,如有侵权,请联系作者删除!