本文整理汇总了Java中org.eclipse.draw2d.IFigure.setBorder方法的典型用法代码示例。如果您正苦于以下问题:Java IFigure.setBorder方法的具体用法?Java IFigure.setBorder怎么用?Java IFigure.setBorder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.IFigure
的用法示例。
在下文中一共展示了IFigure.setBorder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleIllustration
import org.eclipse.draw2d.IFigure; //导入方法依赖的package包/类
private void handleIllustration(GraphNode source, IFigure sourceFig, GraphNode target, IFigure targetFig, ReferenceModel reference) {
if(source.getData() instanceof ReferenceModel &&
target.getData() instanceof ArrayModel &&
targetFig instanceof ArrayPrimitiveFigure2) {
ReferenceModel r = (ReferenceModel) source.getData();
if(r.hasIndexVars()) {
IllustrationBorder b = new IllustrationBorder(r, (ArrayPrimitiveFigure2) targetFig);
targetFig.setBorder(b);
}
}
else if(source.getData() instanceof ArrayReferenceModel &&
target.getData() instanceof ArrayPrimitiveModel) {
ArrayReferenceModel array = (ArrayReferenceModel) source.getData();
targetFig.setBorder(new IllustrationBorder(reference, (ArrayPrimitiveFigure2) targetFig));
}
}
示例2: handleIllustration
import org.eclipse.draw2d.IFigure; //导入方法依赖的package包/类
private void handleIllustration(IReferenceModel reference, IFigure targetFig, ExceptionType exception) {
if(targetFig instanceof AbstractArrayFigure) {
if(reference.hasIndexVars()) {
IllustrationBorder b = new IllustrationBorder(reference, (AbstractArrayFigure<?>) targetFig, exception);
targetFig.setBorder(b);
}
else {
targetFig.setBorder(new MarginBorder(IllustrationBorder.getInsets(targetFig, targetFig instanceof ArrayPrimitiveFigure)));
}
}
}
示例3: handleIllustration
import org.eclipse.draw2d.IFigure; //导入方法依赖的package包/类
private boolean handleIllustration(IReferenceModel reference, IFigure targetFig) {
if(targetFig instanceof AbstractArrayFigure) {
if(reference.hasIndexVars()) {
IllustrationBorder b = new IllustrationBorder(reference, (AbstractArrayFigure<?>) targetFig);
targetFig.setBorder(b);
return true;
}
else
targetFig.setBorder(null);
}
return false;
}