本文整理汇总了Java中javafx.scene.effect.InnerShadow.setColor方法的典型用法代码示例。如果您正苦于以下问题:Java InnerShadow.setColor方法的具体用法?Java InnerShadow.setColor怎么用?Java InnerShadow.setColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.effect.InnerShadow
的用法示例。
在下文中一共展示了InnerShadow.setColor方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FocusBorder
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public FocusBorder() {
InnerShadow innerFocus = new InnerShadow();
innerFocus.setColor(Color.rgb(104, 155, 201, 0.8));
innerFocus.setBlurType(BlurType.ONE_PASS_BOX);
innerFocus.setRadius(5.0);
innerFocus.setChoke(0.8);
innerFocus.setOffsetX(0.0);
setSpread(0.6);
setColor(Color.rgb(120, 171, 217));
setBlurType(BlurType.ONE_PASS_BOX);
setRadius(6.5);
setOffsetX(0.0);
setOffsetY(0.0);
setInput(innerFocus);
}
示例2: setSelectedFocusBorder
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
private void setSelectedFocusBorder() {
InnerShadow innerFocus = new InnerShadow();
innerFocus.setColor(Color.rgb(104, 155, 201, 0.7));
innerFocus.setBlurType(BlurType.ONE_PASS_BOX);
innerFocus.setRadius(6.5);
innerFocus.setChoke(0.7);
innerFocus.setOffsetX(0.0);
innerFocus.setOffsetY(0.0);
DropShadow outerFocus = new DropShadow();
outerFocus.setColor(Color.rgb(104, 155, 201));
outerFocus.setBlurType(BlurType.ONE_PASS_BOX);
outerFocus.setRadius(7.0);
outerFocus.setSpread(0.7);
outerFocus.setOffsetX(0.0);
outerFocus.setOffsetY(0.0);
outerFocus.setInput(innerFocus);
for (Node child : getChildren()) {
if (child instanceof StackPane) {
child.setEffect(outerFocus);
}
}
}
示例3: setFocusBorder
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
private void setFocusBorder() {
InnerShadow innerFocus = new InnerShadow();
innerFocus.setColor(Color.rgb(104, 155, 201));
innerFocus.setBlurType(BlurType.ONE_PASS_BOX);
innerFocus.setRadius(6.5);
innerFocus.setChoke(0.7);
innerFocus.setOffsetX(0.0);
innerFocus.setOffsetY(0.0);
DropShadow outerFocus = new DropShadow();
outerFocus.setColor(Color.rgb(104, 155, 201));
outerFocus.setBlurType(BlurType.ONE_PASS_BOX);
outerFocus.setRadius(5.0);
outerFocus.setSpread(0.6);
outerFocus.setOffsetX(0.0);
outerFocus.setOffsetY(0.0);
outerFocus.setInput(innerFocus);
for (Node child : getChildren()) {
if (child instanceof StackPane) {
child.setEffect(outerFocus);
}
}
}
示例4: createIconContent
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public static Node createIconContent() {
Text sample = new Text("FX");
sample.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD,80));
sample.setStyle("-fx-font-size: 80px;");
sample.setFill(Color.web("#aaaaaa"));
final InnerShadow innerShadow = new InnerShadow();
innerShadow.setRadius(4);
innerShadow.setOffsetX(1);
innerShadow.setOffsetY(1);
innerShadow.setColor(Color.web("#333333"));
sample.setEffect(innerShadow);
return sample;
}
示例5: setStyle
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public void setStyle(Node control) {
InnerShadow innerShadow = new InnerShadow();
innerShadow.setBlurType(BlurType.GAUSSIAN);
innerShadow.setColor(Color.GREEN);
innerShadow.setRadius(6);
innerShadow.setChoke(0.5);
innerShadow.setOffsetX(1);
innerShadow.setOffsetY(2);
control.setEffect(innerShadow);
}
示例6: shadowandinner
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public void shadowandinner(Blend blend){
DropShadow shadow = new DropShadow();
shadow.setOffsetY(7.0f);
shadow.setColor(Color.DARKGRAY);
InnerShadow innerShadow = new InnerShadow();
innerShadow.setOffsetX(1.0f);
innerShadow.setOffsetY(1.0f);
innerShadow.setColor(Color.LIGHTGRAY);
blend.setMode(BlendMode.MULTIPLY);
blend.setBottomInput(shadow);
blend.setTopInput(innerShadow);
}
开发者ID:ProPra16,项目名称:programmierpraktikum-abschlussprojekt-proprawunderbar,代码行数:15,代码来源:UIRunner.java
示例7: initGraphics
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
private void initGraphics() {
size = getSkinnable().getPrefWidth() < getSkinnable().getPrefHeight() ? getSkinnable().getPrefWidth() : getSkinnable().getPrefHeight();
frame = new Circle(0.5 * size, 0.5 * size, 0.5 * size);
frame.setStroke(null);
frame.setVisible(getSkinnable().isFrameVisible());
main = new Circle(0.5 * size, 0.5 * size, 0.36 * size);
main.setStroke(null);
innerShadow = new InnerShadow();
innerShadow.setRadius(0.090 * main.getLayoutBounds().getWidth());
innerShadow.setColor(Color.BLACK);
innerShadow.setBlurType(BlurType.GAUSSIAN);
innerShadow.setInput(null);
glow = new DropShadow();
glow.setRadius(0.45 * main.getLayoutBounds().getWidth());
glow.setColor((Color) getSkinnable().getLedColor());
glow.setBlurType(BlurType.GAUSSIAN);
glow.setInput(innerShadow);
highlight = new Circle(0.5 * size, 0.5 * size, 0.29 * size);
highlight.setStroke(null);
getChildren().setAll(frame, main, highlight);
}
示例8: CodeBlock
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public CodeBlock() {
super();
p = new Polygon();
p.setStroke(Color.GRAY);
// override
rightCon.detouch();
rightCon.setWidth(BASIC_WIDTH - wLeft);
rightCon.setHeight(10);
AnchorPane.setTopAnchor(rightCon, hUpper);
AnchorPane.setLeftAnchor(rightCon, wLeft);
connector = new Connector();
connector.detouch();
connector.setWidth(200);
connector.setHeight(50);
connector.setHolder(myBlock);
connector.setPosition(Connector.Position.CENTER);
AnchorPane.setLeftAnchor(connector, 40.0);
AnchorPane.setTopAnchor(connector, 20.0);
Rectangle dip = new Rectangle();
dip.setWidth(198);
dip.setHeight(48);
dip.setFill(Color.web("FAFAFA"));
AnchorPane.setLeftAnchor(dip, 41.0);
AnchorPane.setTopAnchor(dip, 21.0);
InnerShadow innerShadow = new InnerShadow();
innerShadow.setOffsetX(2);
innerShadow.setOffsetY(2);
innerShadow.setColor(Color.web("0x3b596d"));
dip.setEffect(innerShadow);
getChildren().addAll(connector, dip);
}
示例9: createBlend
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public void createBlend() {
blend = new Blend();
blend.setMode(BlendMode.MULTIPLY);
DropShadow ds = new DropShadow();
ds.setColor(Color.rgb(254, 235, 66, 0.3));
ds.setOffsetX(5);
ds.setOffsetY(5);
ds.setRadius(5);
ds.setSpread(0.2);
blend.setBottomInput(ds);
DropShadow ds1 = new DropShadow();
ds1.setColor(Color.web("#d68268")); // #d68268 is pinkish orange//f13a00"));
ds1.setRadius(20);
ds1.setSpread(0.2);
Blend blend2 = new Blend();
blend2.setMode(BlendMode.MULTIPLY);
InnerShadow is = new InnerShadow();
is.setColor(Color.web("#feeb42")); // #feeb42 is mid-pale yellow
is.setRadius(9);
is.setChoke(0.8);
blend2.setBottomInput(is);
InnerShadow is1 = new InnerShadow();
is1.setColor(Color.web("#278206")); // # f13a00 is bright red // 278206 is dark green
is1.setRadius(5);
is1.setChoke(0.4);
blend2.setTopInput(is1);
Blend blend1 = new Blend();
blend1.setMode(BlendMode.MULTIPLY);
blend1.setBottomInput(ds1);
blend1.setTopInput(blend2);
blend.setTopInput(blend1);
}
示例10: drawMemory
import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
private final void drawMemory() {
final double SIZE = control.getPrefWidth() < control.getPrefHeight() ? control.getPrefWidth() : control.getPrefHeight();
final double WIDTH = control.getPrefWidth();
final double HEIGHT = control.getPrefHeight();
final Shape IBOUNDS = new Rectangle(0, 0, WIDTH, HEIGHT);
IBOUNDS.setOpacity(0.0);
domino.getChildren().clear();
domino.getChildren().add(IBOUNDS);
final Rectangle FRAME = new Rectangle(0.0, 0.0,
WIDTH, HEIGHT);
FRAME.setArcWidth(0.2647058823529412 * WIDTH);
FRAME.setArcHeight(0.1323529411764706 * HEIGHT);
FRAME.getStyleClass().add("domino-frame");
final InnerShadow FRAME_INNER_SHADOW = new InnerShadow();
FRAME_INNER_SHADOW.setWidth(0.1 * FRAME.getLayoutBounds().getWidth());
FRAME_INNER_SHADOW.setHeight(0.1 * FRAME.getLayoutBounds().getHeight());
FRAME_INNER_SHADOW.setOffsetX(0.0);
FRAME_INNER_SHADOW.setOffsetY(-0.01 * SIZE);
FRAME_INNER_SHADOW.setRadius(0.1 * FRAME.getLayoutBounds().getWidth());
FRAME_INNER_SHADOW.setColor(Color.color(0.8, 0.8, 0.8, 0.2));
FRAME_INNER_SHADOW.setBlurType(BlurType.GAUSSIAN);
FRAME_INNER_SHADOW.inputProperty().set(null);
FRAME.setEffect(FRAME_INNER_SHADOW);
final Rectangle MAIN = new Rectangle(0.03676470588235294 * WIDTH, 0.01838235294117647 * HEIGHT,
0.9264705882352942 * WIDTH, 0.9632352941176471 * HEIGHT);
MAIN.setArcWidth(0.23529411764705882 * WIDTH);
MAIN.setArcHeight(0.11764705882352941 * HEIGHT);
MAIN.getStyleClass().add("domino-main");
final InnerShadow MAIN_INNER_SHADOW = new InnerShadow();
MAIN_INNER_SHADOW.setWidth(0.05 * MAIN.getLayoutBounds().getWidth());
MAIN_INNER_SHADOW.setHeight(0.05 * MAIN.getLayoutBounds().getHeight());
MAIN_INNER_SHADOW.setOffsetX(0.0);
MAIN_INNER_SHADOW.setOffsetY(0.008 * SIZE);
MAIN_INNER_SHADOW.setRadius(0.05 * MAIN.getLayoutBounds().getWidth());
MAIN_INNER_SHADOW.setColor(Color.BLACK);
MAIN_INNER_SHADOW.setBlurType(BlurType.GAUSSIAN);
final InnerShadow MAIN_INNER_GLOW = new InnerShadow();
MAIN_INNER_GLOW.setWidth(0.025 * MAIN.getLayoutBounds().getWidth());
MAIN_INNER_GLOW.setHeight(0.025 * MAIN.getLayoutBounds().getHeight());
MAIN_INNER_GLOW.setOffsetX(0.0);
MAIN_INNER_GLOW.setOffsetY(-0.008 * SIZE);
MAIN_INNER_GLOW.setRadius(0.025 * MAIN.getLayoutBounds().getWidth());
MAIN_INNER_GLOW.setColor(Color.color(1, 1, 1, 0.5));
MAIN_INNER_GLOW.setBlurType(BlurType.GAUSSIAN);
MAIN_INNER_GLOW.inputProperty().set(MAIN_INNER_SHADOW);
MAIN.setEffect(MAIN_INNER_GLOW);
final Rectangle SEPARATOR = new Rectangle(0.1323529411764706 * WIDTH, 0.4742647058823529 * HEIGHT,
0.7647058823529411 * WIDTH, 0.025735294117647058 * HEIGHT);
SEPARATOR.setArcWidth(0.051470588235294115 * WIDTH);
SEPARATOR.setArcHeight(0.025735294117647058 * HEIGHT);
SEPARATOR.getStyleClass().add("domino-separator");
domino.getChildren().addAll(FRAME, MAIN, SEPARATOR);
domino.getChildren().addAll(createDotMap("domino-dot-off").values());
}