本文整理汇总了Java中org.eclipse.draw2d.Label.setFont方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setFont方法的具体用法?Java Label.setFont怎么用?Java Label.setFont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.Label
的用法示例。
在下文中一共展示了Label.setFont方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFigure
import org.eclipse.draw2d.Label; //导入方法依赖的package包/类
@Override
protected IFigure createFigure() {
final LineLayout layout = new LineLayout();
layout.setHorizontal(true);
layout.setMajorAlignment(FlowLayout.ALIGN_TOPLEFT);
layout.setMinorAlignment(FlowLayout.ALIGN_BOTTOMRIGHT);
layout.setMinorSpacing(SPACING);
layout.setMargin(MARGIN);
FreeformLayer res = new FreeformLayer();
final Label toolTip = new Label();
toolTip.setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
toolTip.setBackgroundColor(ColorConstants.tooltipBackground);
toolTip.setForegroundColor(ColorConstants.tooltipForeground);
toolTip.setText(getModel().getTimelineWindow().getProvider().getTextAt(getModel().getBranch()));
res.setToolTip(toolTip);
res.setLayoutManager(layout);
return res;
}
示例2: createFigure
import org.eclipse.draw2d.Label; //导入方法依赖的package包/类
@Override
public IFigure createFigure(IValueModel v) {
label = new Label("");
label.setOpaque(true);
label.setBackgroundColor(ColorConstants.white);
label.setBorder(new LineBorder(1));
label.setFont(PandionJUI.getFont(14));
update(v, Integer.parseInt(v.getCurrentValue()));
v.registerDisplayObserver((value) -> {
update(v, Integer.parseInt(v.getCurrentValue()));
});
return label;
}
示例3: PossibleStepFigure
import org.eclipse.draw2d.Label; //导入方法依赖的package包/类
/**
* Constructor.
*/
public PossibleStepFigure() {
final LineLayout layout = new LineLayout();
layout.setHorizontal(true);
layout.setMajorAlignment(FlowLayout.ALIGN_TOPLEFT);
layout.setMinorAlignment(FlowLayout.ALIGN_CENTER);
layout.setMinorSpacing(SPACING);
setLayoutManager(layout);
toolTip = new Label();
toolTip.setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
toolTip.setBackgroundColor(ColorConstants.tooltipBackground);
toolTip.setForegroundColor(ColorConstants.tooltipForeground);
ellipse = createEllipse();
add(ellipse);
label = new Label();
if (withLabel) {
add(label);
hasLabel = true;
} else {
ellipse.setToolTip(toolTip);
hasLabel = false;
}
addMouseListener(new MouseListener.Stub() {
/**
* {@inheritDoc}
*
* @see org.eclipse.draw2d.MouseListener.Stub#mouseReleased(org.eclipse.draw2d.MouseEvent)
*/
@Override
public void mousePressed(MouseEvent me) {
if (me.button == 1) {
final EditPartViewer viewer = getViewer();
viewer.getSelectionManager().deselectAll();
viewer.getSelectionManager().appendSelection(PossibleStepEditPart.this);
}
}
});
}