本文整理匯總了Java中javafx.scene.effect.DropShadow.setSpread方法的典型用法代碼示例。如果您正苦於以下問題:Java DropShadow.setSpread方法的具體用法?Java DropShadow.setSpread怎麽用?Java DropShadow.setSpread使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.effect.DropShadow
的用法示例。
在下文中一共展示了DropShadow.setSpread方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setSelectedFocusBorder
import javafx.scene.effect.DropShadow; //導入方法依賴的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);
}
}
}
示例2: setFocusBorder
import javafx.scene.effect.DropShadow; //導入方法依賴的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);
}
}
}
示例3: initializeIdLabel
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initializeIdLabel() {
final Location location = controller.getLocation();
final Label idLabel = controller.idLabel;
final DropShadow ds = new DropShadow();
ds.setRadius(2);
ds.setSpread(1);
idLabel.setEffect(ds);
idLabel.textProperty().bind((location.idProperty()));
// Center align the label
idLabel.widthProperty().addListener((obsWidth, oldWidth, newWidth) -> idLabel.translateXProperty().set(newWidth.doubleValue() / -2));
idLabel.heightProperty().addListener((obsHeight, oldHeight, newHeight) -> idLabel.translateYProperty().set(newHeight.doubleValue() / -2));
final ObjectProperty<Color> color = location.colorProperty();
final ObjectProperty<Color.Intensity> colorIntensity = location.colorIntensityProperty();
// Delegate to style the label based on the color of the location
final BiConsumer<Color, Color.Intensity> updateColor = (newColor, newIntensity) -> {
idLabel.setTextFill(newColor.getTextColor(newIntensity));
ds.setColor(newColor.getColor(newIntensity));
};
updateColorDelegates.add(updateColor);
// Set the initial color
updateColor.accept(color.get(), colorIntensity.get());
// Update the color of the circle when the color of the location is updated
color.addListener((obs, old, newColor) -> updateColor.accept(newColor, colorIntensity.get()));
}
示例4: initializeClippedBackgroundImage
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initializeClippedBackgroundImage() {
DebugConsole.getDefault().info(this.getClass(), "Initialize ClippedBackgroundImage"); // NOI18N
// The ClippedBackgroundImage
final String imageName = this.getPropertyBackground(KEY__BACKGROUND__1366x768_IMAGE);
final String widthAsString = this.getPropertyBackground(KEY__BACKGROUND__1366x768_WIDTH);
final String heigthAsString = this.getPropertyBackground(KEY__BACKGROUND__1366x768_HEIGHT);
// final String imageName = this.getPropertyBackground(KEY__BACKGROUND__3840x2160_IMAGE);
// final String widthAsString = this.getPropertyBackground(KEY__BACKGROUND__3840x2160_WIDTH);
// final String heigthAsString = this.getPropertyBackground(KEY__BACKGROUND__3840x2160_HEIGHT);
final Image iClippedBackgroundImage = ResourcesFacade.getDefault().getImageLoader().loadBackground(
imageName, widthAsString, heigthAsString);
final double fitHeight = Double.parseDouble(heigthAsString);
final double fitWidth = Double.parseDouble(widthAsString);
ivClippedBackgroundImage.setFitHeight(fitHeight);
ivClippedBackgroundImage.setFitWidth(fitWidth);
ivClippedBackgroundImage.setImage(iClippedBackgroundImage);
// clip image by circle
final Circle clipCircle = new Circle(300.0d);
clipCircle.setLayoutX(fitWidth / 2);
clipCircle.setLayoutY(fitHeight / 2);
ivClippedBackgroundImage.setClip(clipCircle);
// The border for the ClippedBackgroundImage
final DropShadow dropShadow = new DropShadow();
dropShadow.setRadius(5.0);
dropShadow.setColor(Color.CORNFLOWERBLUE);
dropShadow.setSpread(0.15);
cClippedBackgroundImage.setEffect(dropShadow);
}
示例5: setStyle
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public void setStyle(Node control) {
DropShadow dropShadow = new DropShadow();
dropShadow.setBlurType(BlurType.ONE_PASS_BOX);
dropShadow.setColor(Color.GREEN);
dropShadow.setRadius(10);
dropShadow.setSpread(0.5);
dropShadow.setOffsetX(10);
dropShadow.setOffsetY(15);
control.setEffect(dropShadow);
}
示例6: Header
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public Header() {
super();
this.setMinWidth(1200);
this.setMinHeight(50);
this.setMaxHeight(50);
this.getStyleClass().add("header");
DropShadow ds = new DropShadow();
ds.setColor(Color.web("#8B929B"));
ds.setSpread(0.6);
ds.setHeight(40);
this.setEffect(ds);
}
示例7: ContentPane
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public ContentPane() {
super();
this.getStyleClass().add("contentPane");
DropShadow ds = new DropShadow();
ds.setColor(Color.web("#B4B9C1"));
ds.setSpread(0.6);
ds.setWidth(40);
ds.setHeight(40);
this.setEffect(ds);
}
示例8: MenuBox
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public MenuBox(String title, MenuItem... items) {
Rectangle bg = new Rectangle(300, 600);
bg.setOpacity(0.2);
DropShadow shadow = new DropShadow(7, 5, 0, Color.BLACK);
shadow.setSpread(0.8);
bg.setEffect(shadow);
Text text = new Text(title + " ");
text.setFont(font);
text.setFill(Color.WHITE);
Line hSep = new Line();
hSep.setEndX(250);
hSep.setStroke(Color.DARKGREEN);
hSep.setOpacity(0.4);
Line vSep = new Line();
vSep.setStartX(300);
vSep.setEndX(300);
vSep.setEndY(600);
vSep.setStroke(Color.DARKGREEN);
vSep.setOpacity(0.4);
VBox vbox = new VBox();
vbox.setAlignment(Pos.TOP_RIGHT);
vbox.setPadding(new Insets(60, 0, 0, 0));
vbox.getChildren().addAll(text, hSep);
vbox.getChildren().addAll(items);
setAlignment(Pos.TOP_RIGHT);
getChildren().addAll(bg, vSep, vbox);
}
示例9: configure
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
@Override
protected void configure() {
// Invisble at first.
setVisible(false);
dropShadow = new DropShadow();
dropShadow.setSpread(1);
dropShadow.setBlurType(BlurType.GAUSSIAN);
// Brightness effect.
spriteImage.setEffect(dropShadow);
}
示例10: configure
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
@Override
protected void configure() {
dropShadow = new DropShadow();
dropShadow.setSpread(1);
dropShadow.setBlurType(BlurType.GAUSSIAN);
// Brightness effect.
spriteImage.setEffect(dropShadow);
}
示例11: createLowerKey
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public Text createLowerKey() {
Text lowerKey = new Text();
lowerKey.setFont(Font.font(FONT_FAMILY.toString(), FontWeight.MEDIUM, MAX_FONT_SIZE.toInt()));
lowerKey.setFill(Color.WHITE);
lowerKey.setWrappingWidth(getWrappingWidth());
lowerKey.setTextAlignment(getAlignment());
DropShadow ds = new DropShadow();
ds.setOffsetY(0.0);
ds.setOffsetX(0.0);
ds.setColor(Color.BLACK);
ds.setSpread(0.5);
lowerKey.setEffect(ds);
return lowerKey;
}
示例12: OptionButton
import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public OptionButton(OptionPane pane, String img, String label, String contentID, boolean newInstance) {
super();
this.setAlignment(Pos.CENTER);
this.setContentDisplay(ContentDisplay.CENTER);
this.contentID = contentID;
if(img != null && !img.equalsIgnoreCase("")) {
this.img = new Image(OcrePlayer.class.getClassLoader().getResourceAsStream("resources/icons/" + img));
this.imgView = new ImageView(this.img);
this.setGraphic(this.imgView);
}
this.setMinSize(100, 100);
this.setMaxSize(100, 100);
this.getStyleClass().add("option_Button");
DropShadow ds = new DropShadow();
ds.setColor(Color.web("#B4B9C1"));
ds.setSpread(0.5);
ds.setWidth(40);
ds.setHeight(40);
this.setEffect(ds);
this.setOnAction((e) -> {
if(newInstance)
try {
OcrePlayer.contentManager.changeContent(OcrePlayer.contentManager.get(contentID).getClass().newInstance());
} catch (Exception e1) {
e1.printStackTrace();
}
else OcrePlayer.contentManager.changeContent(this.contentID);
});
this.setOnMouseEntered((e) -> {
pane.headerTxt.setText(label);
});
this.setOnMouseExited((e) -> {
pane.headerTxt.setText("Menu");
});
this.setPickOnBounds(false);
}
示例13: createBlend
import javafx.scene.effect.DropShadow; //導入方法依賴的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);
}