本文整理匯總了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;
}