本文整理了Java中org.eclipse.swt.widgets.Canvas.setData()
方法的一些代码示例,展示了Canvas.setData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Canvas.setData()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Canvas
类名称:Canvas
方法名:setData
暂无
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
public void setData( String key, Object value ) {
if( !RWT.MARKUP_ENABLED.equals( key ) || !isMarkupEnabledFor( this ) ) {
super.setData( key, value );
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void runSupport() {
customImage = true;
customImageID = null;
drawAlpha = 255;
canvas.setData("image", image);
canvas.setData("ImageID", null);
canvas.setData("image-left", null);
canvas.setData("image-right", null);
canvas.setData("drawAlpha", null);
canvas.removePaintListener(paintListener);
canvas.addPaintListener(paintListener);
Utils.relayout(canvas);
canvas.redraw();
}
});
代码示例来源:origin: BiglySoftware/BiglyBT
canvas.setData("drawAlpha", drawAlpha);
canvas.setData("hpadding", new Long(hpadding));
canvas.setData("drawmode", drawMode);
canvas.setData("delay", null);
if (images == null) {
canvas.setData("images", null);
image = null;
} else if (drawMode == DRAW_ANIMATE) {
int animationDelay = ImageLoader.getInstance().getAnimationDelay(sImageID);
canvas.setData("images", images);
canvas.setData("ImageIndex", Long.valueOf(0));
canvas.setData("delay", new Long(animationDelay));
image = images[0];
Image imageLeft = images[0];
if (ImageLoader.isRealImage(imageLeft)) {
canvas.setData("image-left", imageLeft);
canvas.setData("image-right", imageRight);
&& drawMode != DRAW_STRETCH && drawMode != DRAW_SCALEDOWN_OR_CENTER) {
canvas.setSize(imgBounds.width + hpadding, imgBounds.height);
canvas.setData("oldSize", canvas.getSize());
canvas.setData("oldSize", new Point(fd.width, fd.height));
代码示例来源:origin: BiglySoftware/BiglyBT
canvas.setData("color", color);
} else {
canvas.setData("color", properties.getColor(sPrefix + ".color"));
canvas.setData("font", existingFont);
} else {
boolean bNewFont = false;
canvas.setData("font", canvasFont);
canvas.addDisposeListener(new DisposeListener() {
@Override
canvas.setData("Font" + suffix, canvasFont);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
protected void refresh() {
adjustItemNumber();
if (fInput == null)
return;
if (fInput.fAnnotations == null)
return;
if (fInput.fViewer != null)
fInput.fViewer.addViewportListener(fViewportListener);
fShell.setRegion(fLayouter.getShellRegion(fInput.fAnnotations.length));
Layout layout= fLayouter.getLayout(fInput.fAnnotations.length);
fComposite.setLayout(layout);
Control[] children= fComposite.getChildren();
for (int i= 0; i < fInput.fAnnotations.length; i++) {
Canvas canvas= (Canvas) children[i];
Item item= new Item();
item.canvas= canvas;
item.fAnnotation= fInput.fAnnotations[i];
canvas.setData(item);
canvas.redraw();
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
protected void refresh() {
adjustItemNumber();
if (fInput == null)
return;
if (fInput.fAnnotations == null)
return;
if (fInput.fViewer != null)
fInput.fViewer.addViewportListener(fViewportListener);
fShell.setRegion(fLayouter.getShellRegion(fInput.fAnnotations.length));
Layout layout= fLayouter.getLayout(fInput.fAnnotations.length);
fComposite.setLayout(layout);
Control[] children= fComposite.getChildren();
for (int i= 0; i < fInput.fAnnotations.length; i++) {
Canvas canvas= (Canvas) children[i];
Item item= new Item();
item.canvas= canvas;
item.fAnnotation= fInput.fAnnotations[i];
canvas.setData(item);
canvas.redraw();
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
protected void refresh() {
adjustItemNumber();
if (fInput == null)
return;
if (fInput.fAnnotations == null)
return;
if (fInput.fViewer != null)
fInput.fViewer.addViewportListener(fViewportListener);
fShell.setRegion(fLayouter.getShellRegion(fInput.fAnnotations.length));
Layout layout= fLayouter.getLayout(fInput.fAnnotations.length);
fComposite.setLayout(layout);
Control[] children= fComposite.getChildren();
for (int i= 0; i < fInput.fAnnotations.length; i++) {
Canvas canvas= (Canvas) children[i];
Item item= new Item();
item.canvas= canvas;
item.fAnnotation= fInput.fAnnotations[i];
canvas.setData(item);
canvas.redraw();
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void imageDownloaded(Image image, String key, boolean returnedImmediately) {
if (!returnedImmediately) {
if (lblImage.isDisposed()) {
return;
}
lblImage.setData("Image", image);
Rectangle bounds = image.getBounds();
GridData gridData = (GridData) lblImage.getLayoutData();
gridData.heightHint = bounds.height + 10;
gridData.widthHint = bounds.width + 16;
lblImage.setLayoutData(gridData);
lblImage.getShell().layout(new Control[] {
lblImage
});
Point computeSize = shell.computeSize(600, SWT.DEFAULT, true);
shell.setSize(computeSize);
}
}
});
代码示例来源:origin: BiglySoftware/BiglyBT
lblImage.setData("obj", obj);
lblImage.addListener(SWT.Paint, new Listener() {
@Override
lblImage.setData("Image", image);
Rectangle bounds = image.getBounds();
gridData.heightHint = bounds.height + 10;
代码示例来源:origin: BiglySoftware/BiglyBT
cColor.setData("Index", new Integer(i));
代码示例来源:origin: BiglySoftware/BiglyBT
drawable.setData("image", image);
代码示例来源:origin: BiglySoftware/BiglyBT
canvas.setData("font", font);
setControl(canvas);
if (typeParams.length > 1) {
代码示例来源:origin: BiglySoftware/BiglyBT
canvas.setData("SkinObject", this);
代码示例来源:origin: BiglySoftware/BiglyBT
canvas.setData("SkinObject", this);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
canvas.setData("STRINGS", new String[] {prefix+" Canvas widget"});
canvas.addPaintListener(e -> {
Canvas c = (Canvas)e.widget;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
overrideCanvas.setData("name", "Canvas");
overrideCanvas.getAccessible().addAccessibleListener(overrideAccessibleAdapter);
代码示例来源:origin: org.xworker/xworker_swt
s.set("image", null);
canvas.addListener(SWT.Paint, new PaintListener(s));
canvas.setData(s);
内容来源于网络,如有侵权,请联系作者删除!