本文整理匯總了Java中org.eclipse.swt.custom.CLabel.setBounds方法的典型用法代碼示例。如果您正苦於以下問題:Java CLabel.setBounds方法的具體用法?Java CLabel.setBounds怎麽用?Java CLabel.setBounds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.custom.CLabel
的用法示例。
在下文中一共展示了CLabel.setBounds方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createGroup
import org.eclipse.swt.custom.CLabel; //導入方法依賴的package包/類
/**
* This method initializes group
*
*/
private void createGroup() {
group = new Group(shell, SWT.NONE);
group.setText(Messages.getString("IndicatorGroupDialog.indicator")); //$NON-NLS-1$
group.setBounds(new org.eclipse.swt.graphics.Rectangle(3, 2, 419, 75));
lblName = new CLabel(group, SWT.NONE);
lblName.setText(Messages.getString("IndicatorGroupDialog.name")); //$NON-NLS-1$
lblName.setFont(new Font(Display.getDefault(), "Tahoma", 8, SWT.BOLD)); //$NON-NLS-1$
lblName.setBounds(new Rectangle(8, 15, 44, 22));
lblId = new CLabel(group, SWT.NONE);
lblId.setText(Messages.getString("IndicatorGroupDialog.id")); //$NON-NLS-1$
lblId.setFont(new Font(Display.getDefault(), "Tahoma", 8, SWT.BOLD)); //$NON-NLS-1$
lblId.setBounds(new Rectangle(263, 17, 37, 19));
lblDescription = new CLabel(group, SWT.NONE);
lblDescription.setFont(new Font(Display.getDefault(), "Tahoma", 8, SWT.BOLD)); //$NON-NLS-1$
lblDescription.setLocation(new org.eclipse.swt.graphics.Point(8, 41));
lblDescription.setText(Messages.getString("IndicatorGroupDialog.description")); //$NON-NLS-1$
lblDescription.setSize(new org.eclipse.swt.graphics.Point(80, 22));
cLabelGrlName = new CLabel(group, SWT.SHADOW_IN);
cLabelGrlName.setText(""); //$NON-NLS-1$
cLabelGrlName.setLocation(new Point(56, 15));
cLabelGrlName.setSize(new Point(199, 23));
cLabelGrlDescription = new CLabel(group, SWT.SHADOW_IN);
cLabelGrlDescription.setText(""); //$NON-NLS-1$
cLabelGrlDescription.setLocation(new Point(95, 41));
cLabelGrlDescription.setSize(new org.eclipse.swt.graphics.Point(315, 23));
cLabelGrlId = new CLabel(group, SWT.SHADOW_IN);
cLabelGrlId.setText(""); //$NON-NLS-1$
cLabelGrlId.setLocation(new Point(306, 15));
cLabelGrlId.setSize(new org.eclipse.swt.graphics.Point(103, 23));
}
示例2: carregaImagem
import org.eclipse.swt.custom.CLabel; //導入方法依賴的package包/類
private void carregaImagem(CLabel label, Image imagem) {
label.setBackground(imagem);
label.setBounds(label.getBounds().x, label.getBounds().y, imagem.getImageData().width,
imagem.getImageData().height);
}