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


Java DropShadow.setHeight方法代码示例

本文整理汇总了Java中javafx.scene.effect.DropShadow.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java DropShadow.setHeight方法的具体用法?Java DropShadow.setHeight怎么用?Java DropShadow.setHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.effect.DropShadow的用法示例。


在下文中一共展示了DropShadow.setHeight方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Toast

import javafx.scene.effect.DropShadow; //导入方法依赖的package包/类
public Toast(final String msg) {
    label = new Label(msg);
    String style =  "-fx-background-color:black;" +
            "-fx-background-radius:10;" +
            "-fx-font: 16px \"Microsoft YaHei\";" +
            "-fx-text-fill:white;-fx-padding:10;";
    label.setStyle(style);
    DropShadow dropShadow = new DropShadow();
    dropShadow.setBlurType(BlurType.THREE_PASS_BOX);
    dropShadow.setWidth(40);
    dropShadow.setHeight(40);
    dropShadow.setRadius(19.5);
    dropShadow.setOffsetX(0);
    dropShadow.setOffsetY(00);
    dropShadow.setColor(Color.color(0, 0, 0));
    label.setEffect(dropShadow);
}
 
开发者ID:linchaolong,项目名称:ApkToolPlus,代码行数:18,代码来源:Toast.java

示例2: 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

示例3: 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

示例4: MDIIcon

import javafx.scene.effect.DropShadow; //导入方法依赖的package包/类
/**
     * *************************** CONSTRUCTOR
     */
    public MDIIcon(ImageView imgLogo, MDICanvas mdiCanvas, String name) throws Exception {
        super();
        HBox hBox = new HBox();
        hBox.setStyle("-fx-alignment:center-left");

        getStyleClass().add("taskBarIcon");
//        styleProperty().bind(StylesCSS.taskBarIconStyleProperty);

        //setStyle(cssDefault);
        hBox.setSpacing(10d);
        hBox.setPadding(new Insets(0, 10, 0, 10));
        this.mdiCanvas = mdiCanvas;
        lblName = new Label(name);
        lblName.getStyleClass().add("titleText");
        //lblName.styleProperty().bind(StylesCSS.taskBarIconTextStyleProperty);
        addEventHandler(MouseEvent.MOUSE_CLICKED, handleMaximize);

        btnClose = new Button("", getImageFromAssets("close.png"));
        btnClose.getStyleClass().add("controlButtons");
//        btnClose.styleProperty().bind(StylesCSS.controlButtonsStyleProperty);
//Adding the shadow when the mouse cursor is on
        final DropShadow shadowCloseBtn = new DropShadow();
        shadowCloseBtn.setHeight(10d);
        shadowCloseBtn.setWidth(10d);
        btnClose.addEventHandler(MouseEvent.MOUSE_ENTERED, e -> btnClose.setEffect(shadowCloseBtn));
//Removing the shadow when the mouse cursor is off
        btnClose.addEventHandler(MouseEvent.MOUSE_EXITED, e -> {
            btnClose.setEffect(null);
            System.out.println("Height:" + getParent().getLayoutBounds().getHeight());
        });
        btnClose.addEventHandler(MouseEvent.MOUSE_CLICKED, handleClose);
        hBox.getChildren().addAll(imgLogo == null ? new ImageView() : new ImageView(imgLogo.getImage()), lblName, btnClose);
        setGraphic(hBox);
    }
 
开发者ID:lincolnminto,项目名称:javaFXMDI,代码行数:38,代码来源:MDIIcon.java

示例5: setupEffects

import javafx.scene.effect.DropShadow; //导入方法依赖的package包/类
private void setupEffects(ExileToolsHit item) {
	stackPane.setEffect(null);
	if (item.wtbCtr() > 0) {
		int depth = 20; // Setting the uniform variable for the glow width and height
		DropShadow borderGlow = new DropShadow();
		borderGlow.setOffsetY(0f);
		borderGlow.setOffsetX(0f);
		borderGlow.setColor(Color.GREY);
		borderGlow.setWidth(depth);
		borderGlow.setHeight(depth);
		stackPane.setEffect(borderGlow);
	}
}
 
开发者ID:thirdy,项目名称:blackmarket,代码行数:14,代码来源:ItemGridCell.java

示例6: 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


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