本文整理汇总了Java中org.controlsfx.control.decoration.Decoration类的典型用法代码示例。如果您正苦于以下问题:Java Decoration类的具体用法?Java Decoration怎么用?Java Decoration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Decoration类属于org.controlsfx.control.decoration包,在下文中一共展示了Decoration类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRequiredDecorations
import org.controlsfx.control.decoration.Decoration; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected Collection<Decoration> createRequiredDecorations(Control target) {
ImageView imageView = new ImageView(REQUIRED_IMAGE);
// The following code will transform REQUIRED_IMAGE from red to blue.
ColorAdjust adjust = new ColorAdjust();
adjust.setSaturation(-1);
Blend bluemaker = new Blend(BlendMode.SRC_ATOP, adjust,
new ColorInput(0, 0, imageView.getImage().getWidth(),
imageView.getImage().getHeight(), Color.DEEPSKYBLUE));
imageView.setEffect(bluemaker);
return Arrays.asList(new GraphicDecoration(imageView, Pos.TOP_LEFT,
REQUIRED_IMAGE.getWidth() / 2, REQUIRED_IMAGE.getHeight() / 2));
}
示例2: createValidationDecorations
import org.controlsfx.control.decoration.Decoration; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected Collection<Decoration> createValidationDecorations(ValidationMessage message) {
return Arrays.asList(new GraphicDecoration(createDecorationNode(message), Pos.BOTTOM_LEFT));
}
示例3: createRequiredDecorations
import org.controlsfx.control.decoration.Decoration; //导入依赖的package包/类
@Override
protected Collection<Decoration> createRequiredDecorations(Control target) {
return new ArrayList<>();
}
示例4: createValidationDecorations
import org.controlsfx.control.decoration.Decoration; //导入依赖的package包/类
@Override
protected Collection<Decoration> createValidationDecorations(ValidationMessage message) {
return Arrays.asList(new GraphicDecoration(createDecorationNode(message), position));
}