本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}