當前位置: 首頁>>代碼示例>>Java>>正文


Java DropShadow.setOffsetX方法代碼示例

本文整理匯總了Java中javafx.scene.effect.DropShadow.setOffsetX方法的典型用法代碼示例。如果您正苦於以下問題:Java DropShadow.setOffsetX方法的具體用法?Java DropShadow.setOffsetX怎麽用?Java DropShadow.setOffsetX使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.effect.DropShadow的用法示例。


在下文中一共展示了DropShadow.setOffsetX方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: graphicMods

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
/**
 * Modifies the GUI with minor fixes and styles.
 */
private void graphicMods() {
    taskListsScrollPane.setFitToWidth(true);
    tasksScrollPane.setFitToWidth(true);

    //Colors
    tasksScrollPane.setStyle("-fx-background-color: transparent;");
    tasksAnchorPane.setStyle("-fx-background-color: white;");

    //Effect for the title
    DropShadow shadow = new DropShadow();
    shadow.setOffsetY(1.0);
    shadow.setOffsetX(1.0);
    shadow.setColor(Color.GRAY);
    titleTaskList.setEffect(shadow);
}
 
開發者ID:Soheibooo,項目名稱:EMBER,代碼行數:19,代碼來源:MainController.java

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

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

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

示例5: writeNodes

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
/**
 * You can write ImageView, Text, Labels, and other Nodes to the
 * OutputPanel with this method.
 * 
 * @param nodes
 */
public void writeNodes(Node ... nodes){

	HBox hBox = new HBox();
	for(Node node: nodes){
		if(node instanceof Text){
			DropShadow ds = new DropShadow();
			ds.setColor(Color.GRAY);
			ds.setOffsetX(3);
			ds.setOffsetY(3);
			node.setEffect(ds);
		}
		hBox.getChildren().add(node);
	}
	rePosScroll = true;
	vBox.getChildren().add(hBox);
	rePosScroll = true;
}
 
開發者ID:Tokanagrammar,項目名稱:tokanagrammar-dev,代碼行數:24,代碼來源:OutputPanel.java

示例6: createIconContent

import javafx.scene.effect.DropShadow; //導入方法依賴的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("#333333"));
    final DropShadow dropShadow = new DropShadow();
    dropShadow.setOffsetX(4);
    dropShadow.setOffsetY(6);
    dropShadow.setColor(Color.rgb(0,0,0,0.7));
    sample.setEffect(dropShadow);
    return sample;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:13,代碼來源:DropShadowSample.java

示例7: createBean

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private static Group createBean(double rotate, double translateX, double translateY) {
    javafx.scene.shape.Ellipse bean1 = new javafx.scene.shape.Ellipse(16, 10);
    javafx.scene.shape.Ellipse bean1end = new javafx.scene.shape.Ellipse( 4,3, 3.2, 1.8);
    bean1end.setFill(Color.WHITESMOKE);
    bean1.setFill(Color.BROWN);
    javafx.scene.Group group = new javafx.scene.Group(bean1, bean1end);
    group.setRotate(rotate);
    group.setTranslateX(translateX+57);
    group.setTranslateY(translateY+57);
    DropShadow dropShadow = new DropShadow();
    dropShadow.setOffsetX(2);
    dropShadow.setOffsetY(3);
    group.setEffect(dropShadow);
    return group;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:16,代碼來源:ChangeListenerSample.java

示例8: createText

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private Text createText(String name) {
	//DropShadow effect
	DropShadow dropShadow = new DropShadow();
	dropShadow.setOffsetX(5);
	dropShadow.setOffsetY(5);
	//Adding text and DropShadow effect to it
	Text text = new Text(name);
	text.setFont(Font.font("Courier New", FontWeight.BOLD, 28));
	text.setEffect(dropShadow);
	return text;
}
 
開發者ID:LtubSalad,項目名稱:voogasalad-ltub,代碼行數:12,代碼來源:PasswordManager.java

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

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

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

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private Node gaussianBlur() {
    Text t2 = new Text();
    t2.setX(10.0f);
    t2.setY(250.0f);
    t2.setCache(true);
    t2.setText("Gaussian Blur");
    t2.setFill(Color.RED);
    t2.setFont(Font.font("null", FontWeight.BOLD, 36));
    
    DropShadow shadow = new DropShadow();
    shadow.setOffsetY(3.0);
    shadow.setOffsetX(3.0);
    shadow.setColor(Color.GRAY);
    shadow.setInput(new GaussianBlur());
    
    Reflection rf = new Reflection();
    rf.setFraction(1.5);
    rf.setInput(shadow);
    
    t2.setEffect(rf);
    return t2;
}
 
開發者ID:SaiPradeepDandem,項目名稱:javafx-demos,代碼行數:23,代碼來源:BlurEffectDemo.java

示例13: getSurfaceObserver

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public SurfaceListener<T> getSurfaceObserver() {
	SurfaceListener<T> l = new SurfaceListener<T>() {
		public void changed(ChangeType changeType, Node n, String id, Rectangle2D r1, Rectangle2D r2) {
			switch(changeType) {
		    	case REMOVE_DISCARD: {
		    		content.getChildren().remove(n);
		    		requestLayout();
		    		break;
		    	}
		    	case RESIZE_RELOCATE: {
		    		n.resizeRelocate(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight());
					requestLayout();
			        
			        break;
		    	}
		    	case ADD_COMMIT: {
		    		content.getChildren().add(n);
		    		n.resizeRelocate(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight());
					requestLayout();
			        break;
		    	}
		    	case MOVE_BEGIN: {
		    		DropShadow shadow = new DropShadow();
		    		shadow.setOffsetX(10);
		    		shadow.setOffsetY(10);
		    		shadow.setRadius(5);
		    		shadow.setColor(Color.GRAY);
		    		n.setEffect(shadow);
		    		n.toFront();
		    		n.setOpacity(.5);
		    		break;
		    	}
		    	case RELOCATE_DRAG_TARGET: {
		    		n.resizeRelocate(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight());
					requestLayout();
		    		break;
		    	}
		    	case RESIZE_DRAG_TARGET: {
		    		n.resizeRelocate(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight());
					requestLayout();
			        break;
		    	}
		    	case MOVE_END: {
		    		n.setOpacity(1);
		    		n.setEffect(null);
		    		break;
		    	}
		    	case ANIMATE_RESIZE_RELOCATE: {
		    		n.resizeRelocate(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight());
					requestLayout();
			        break;
		    	}
		    	default: break;
	    	}
		}
	};
	return l;
}
 
開發者ID:fxpresso,項目名稱:Mosaic,代碼行數:59,代碼來源:MosaicPane.java

示例14: getToDayControl

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public Group getToDayControl(){
    String[] months = {"Jan", "Feb","Mar", "Apr", "May",          "Jun", "Jul","Aug", "Sep", "Oct", "Nov","Dec"};
    Calendar cal =  Calendar.getInstance();
 
    Group ctrl = new Group();
    Rectangle rect = new Rectangle();
    rect.setWidth(WIDTH);
    rect.setHeight(HEIGHT);
    rect.setArcHeight(10.0);
    rect.setArcWidth(10.0);
 
    Rectangle headerRect = new Rectangle();
    headerRect.setWidth(WIDTH);
    headerRect.setHeight(30);
    headerRect.setArcHeight(10.0);
    headerRect.setArcWidth(10.0);
 
    Stop[] stops = new Stop[] { new Stop(0, Color.color(0.31, 0.31, 0.31, 0.443)), new Stop(1,  Color.color(0, 0, 0, 0.737))};
    LinearGradient lg = new LinearGradient( 0.482, -0.017, 0.518, 1.017, true, CycleMethod.REFLECT, stops);
    headerRect.setFill(lg);
 
    Rectangle footerRect = new Rectangle();
    footerRect.setY(headerRect.getBoundsInLocal().getHeight() -4);
    footerRect.setWidth(WIDTH);
    footerRect.setHeight(125);
    footerRect.setFill(Color.color(0.51,  0.671,  0.992));
 
    final Text currentMon = new Text(months[(cal.get(Calendar.MONTH) )]);
    currentMon.setFont(Font.font("null", FontWeight.BOLD, 24));
    currentMon.setTranslateX((footerRect.getBoundsInLocal().getWidth() - currentMon.getBoundsInLocal().getWidth())/2.0);
    currentMon.setTranslateY(23);
    currentMon.setFill(Color.WHITE);
 
    final Text currentDate = new          Text(Integer.toString(cal.get(Calendar.DATE)));
    currentDate.setFont(new Font(100.0));
    currentDate.setTranslateX((footerRect.getBoundsInLocal().getWidth() - currentDate.getBoundsInLocal().getWidth())/2.0);
    currentDate.setTranslateY(120);
    currentDate.setFill(Color.WHITE);
 
    ctrl.getChildren().addAll(rect, headerRect, footerRect , currentMon,currentDate);
 
    DropShadow ds = new DropShadow();
    ds.setOffsetY(3.0);
    ds.setOffsetX(3.0);
    ds.setColor(Color.GRAY);
    ctrl.setEffect(ds);
 
    return ctrl;
}
 
開發者ID:mars-sim,項目名稱:mars-sim,代碼行數:50,代碼來源:TodaysDateWiget.java

示例15: 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.setOffsetX方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。