当前位置: 首页>>代码示例>>Java>>正文


Java DropShadow.setSpread方法代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:cis422s14team5,项目名称:WatchlistPro,代码行数:25,代码来源:AquaCheckBoxSkin.java

示例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);
        }
    }
}
 
开发者ID:cis422s14team5,项目名称:WatchlistPro,代码行数:25,代码来源:AquaCheckBoxSkin.java

示例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()));
}
 
开发者ID:ulriknyman,项目名称:H-Uppaal,代码行数:34,代码来源:LocationPresentation.java

示例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);
    }
 
开发者ID:Naoghuman,项目名称:Incubator,代码行数:35,代码来源:BackgroundImagesPresenter.java

示例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);
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:12,代码来源:ControlsCssStylesFactory.java

示例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);
}
 
开发者ID:domkog,项目名称:OcrePlayer,代码行数:15,代码来源:Header.java

示例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);
}
 
开发者ID:domkog,项目名称:OcrePlayer,代码行数:13,代码来源:ContentPane.java

示例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);
}
 
开发者ID:AlmasB,项目名称:FXTutorials,代码行数:35,代码来源:Main.java

示例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);
}
 
开发者ID:ipfaffen,项目名称:prishonor,代码行数:13,代码来源:ElementPortal.java

示例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);
}
 
开发者ID:ipfaffen,项目名称:prishonor,代码行数:10,代码来源:ElementExplosion.java

示例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;
}
 
开发者ID:danielkihlgren,项目名称:stagedisplayviewer,代码行数:15,代码来源:FxUtils.java

示例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);
}
 
开发者ID:domkog,项目名称:OcrePlayer,代码行数:49,代码来源:OptionButton.java

示例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);
	}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:42,代码来源:MainScene.java


注:本文中的javafx.scene.effect.DropShadow.setSpread方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。