本文整理汇总了Java中org.eclipse.draw2d.Label.setBorder方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setBorder方法的具体用法?Java Label.setBorder怎么用?Java Label.setBorder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.Label
的用法示例。
在下文中一共展示了Label.setBorder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EdgeFigure
import org.eclipse.draw2d.Label; //导入方法依赖的package包/类
public EdgeFigure() {
tooltipFigure = new TooltipFigure();
setToolTip(tooltipFigure);
this.setLineWidth(this.getLineWidth() * 2);
this.setTargetDecoration(new PolylineDecoration());
label = new Label("e_"+ID.getId());
label.setOpaque(true);
label.setBackgroundColor(ColorConstants.buttonLightest);
label.setBorder(new LineBorder());
add(label, new MidpointLocator(this, 0));
guardedFigure = new GuardFigure();
blockedFigure = new BlockedFigure();
actionFigure = new ActionFigure ();
add (actionFigure, new RelativeLocator(label,0.5,1.5));
}
示例2: createRV
import org.eclipse.draw2d.Label; //导入方法依赖的package包/类
private Figure createRV ()
{
final Figure rvFigure = new Figure ();
rvFigure.setLayoutManager ( new BorderLayout () );
final Label label = new Label ( Messages.ManualOverride_ResetValue_Label );
label.setBorder ( new MarginBorder ( 10 ) );
rvFigure.add ( label, BorderLayout.RIGHT );
this.rvRect = new RoundedRectangle ();
this.rvRect.setLayoutManager ( new BorderLayout () );
this.rvValue = new Label ();
this.rvRect.setBackgroundColor ( ColorConstants.lightGray );
this.rvValue.setBorder ( new MarginBorder ( 10 ) );
this.rvRect.add ( this.rvValue, BorderLayout.CENTER );
this.rvRectBlinker = new StyleBlinker () {
@Override
public void update ( final CurrentStyle style )
{
ManualOverride.this.rvRect.setBackgroundColor ( style.background );
ManualOverride.this.rvRect.setForegroundColor ( style.foreground );
ManualOverride.this.rvRect.setFont ( style.font );
}
};
this.rvRectStyler = new StateStyler ( this.rvRectBlinker );
rvFigure.add ( this.rvRect, BorderLayout.CENTER );
return rvFigure;
}
示例3: createFigure
import org.eclipse.draw2d.Label; //导入方法依赖的package包/类
@Override
public IFigure createFigure(IArrayModel<?> e) {
Label label = new Label();
label.setBorder(new MarginBorder(5));
PandionJUI.setFont(label, 18);
updateLabel(e, label);
e.registerDisplayObserver((a) -> updateLabel(e, label));
return label;
}
示例4: 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;
}