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


Java InnerShadow.setOffsetX方法代码示例

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


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

示例1: InnerShadowSample

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public InnerShadowSample() {
    Text sample = new Text(0,100,"Shadow");
    sample.setFont(Font.font("Arial Black",80));
    sample.setFill(Color.web("#BBBBBB"));
    final InnerShadow innerShadow = new InnerShadow();
    innerShadow.setRadius(5d);
    innerShadow.setOffsetX(2);
    innerShadow.setOffsetY(2);
    sample.setEffect(innerShadow);
    getChildren().add(sample);
    // REMOVE ME
    setControls(
            new SimplePropertySheet.PropDesc("Text Fill", sample.fillProperty()),
            new SimplePropertySheet.PropDesc("Inner Shadow Radius", innerShadow.radiusProperty(), 0d,60d),
            new SimplePropertySheet.PropDesc("Inner Shadow Offset X", innerShadow.offsetXProperty(), -10d, 10d),
            new SimplePropertySheet.PropDesc("Inner Shadow Offset Y", innerShadow.offsetYProperty(), -10d, 10d),
            new SimplePropertySheet.PropDesc("Inner Shadow Color", innerShadow.colorProperty())
    );
    // END REMOVE ME
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:21,代码来源:InnerShadowSample.java

示例2: FocusBorder

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public FocusBorder() {
    InnerShadow innerFocus = new InnerShadow();
    innerFocus.setColor(Color.rgb(104, 155, 201, 0.8));
    innerFocus.setBlurType(BlurType.ONE_PASS_BOX);
    innerFocus.setRadius(5.0);
    innerFocus.setChoke(0.8);
    innerFocus.setOffsetX(0.0);
    
    setSpread(0.6);
    setColor(Color.rgb(120, 171, 217));
    setBlurType(BlurType.ONE_PASS_BOX);
    setRadius(6.5);
    setOffsetX(0.0);
    setOffsetY(0.0);
    setInput(innerFocus);
}
 
开发者ID:cis422s14team5,项目名称:WatchlistPro,代码行数:17,代码来源:FocusBorder.java

示例3: setSelectedFocusBorder

import javafx.scene.effect.InnerShadow; //导入方法依赖的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.InnerShadow; //导入方法依赖的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: createIconContent

import javafx.scene.effect.InnerShadow; //导入方法依赖的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("#aaaaaa"));
    final InnerShadow innerShadow = new InnerShadow();
    innerShadow.setRadius(4);
    innerShadow.setOffsetX(1);
    innerShadow.setOffsetY(1);
    innerShadow.setColor(Color.web("#333333"));
    sample.setEffect(innerShadow);
    return sample;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:14,代码来源:InnerShadowSample.java

示例6: setStyle

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public void setStyle(Node control) {
    InnerShadow innerShadow = new InnerShadow();

    innerShadow.setBlurType(BlurType.GAUSSIAN);
    innerShadow.setColor(Color.GREEN);
    innerShadow.setRadius(6);
    innerShadow.setChoke(0.5);
    innerShadow.setOffsetX(1);
    innerShadow.setOffsetY(2);
    control.setEffect(innerShadow);
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:12,代码来源:ControlsCssStylesFactory.java

示例7: shadowandinner

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public void shadowandinner(Blend blend){
    DropShadow shadow = new DropShadow();
    shadow.setOffsetY(7.0f);
    shadow.setColor(Color.DARKGRAY);

    InnerShadow innerShadow = new InnerShadow();
    innerShadow.setOffsetX(1.0f);
    innerShadow.setOffsetY(1.0f);
    innerShadow.setColor(Color.LIGHTGRAY);

    blend.setMode(BlendMode.MULTIPLY);
    blend.setBottomInput(shadow);
    blend.setTopInput(innerShadow);
}
 
开发者ID:ProPra16,项目名称:programmierpraktikum-abschlussprojekt-proprawunderbar,代码行数:15,代码来源:UIRunner.java

示例8: CodeBlock

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public CodeBlock() {
    super();

    p = new Polygon();
    p.setStroke(Color.GRAY);

    // override
    rightCon.detouch();
    rightCon.setWidth(BASIC_WIDTH - wLeft);
    rightCon.setHeight(10);
    AnchorPane.setTopAnchor(rightCon, hUpper);
    AnchorPane.setLeftAnchor(rightCon, wLeft);

    connector = new Connector();
    connector.detouch();
    connector.setWidth(200);
    connector.setHeight(50);
    connector.setHolder(myBlock);
    connector.setPosition(Connector.Position.CENTER);
    AnchorPane.setLeftAnchor(connector, 40.0);
    AnchorPane.setTopAnchor(connector, 20.0);

    Rectangle dip = new Rectangle();
    dip.setWidth(198);
    dip.setHeight(48);
    dip.setFill(Color.web("FAFAFA"));
    AnchorPane.setLeftAnchor(dip, 41.0);
    AnchorPane.setTopAnchor(dip, 21.0);
    InnerShadow innerShadow = new InnerShadow();
    innerShadow.setOffsetX(2);
    innerShadow.setOffsetY(2);
    innerShadow.setColor(Color.web("0x3b596d"));
    dip.setEffect(innerShadow);

    getChildren().addAll(connector, dip);
}
 
开发者ID:jointry,项目名称:jointry,代码行数:37,代码来源:CodeBlock.java

示例9: init

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
@Override
public void init() {
    setPrefWidth(210);
    setPrefHeight(210);

    // visible background for widget
    Rectangle bg = new Rectangle();
    bg.setArcWidth(20);
    bg.setArcHeight(20);
    bg.setHeight(210);
    bg.setWidth(210);
    bg.setStroke(Color.BLACK);
    bg.setFill(Color.rgb(255, 255, 255, .70));
    getChildren().add(bg);

    // hello world
    InnerShadow innerShadow = new InnerShadow();
    innerShadow.setOffsetX(4.0f);
    innerShadow.setOffsetY(4.0f);

    Text t = new Text();
    t.setEffect(innerShadow);
    t.setX(25);
    t.setY(110);
    t.setText("Hello World");
    t.setFill(Color.GREEN);
    t.setFont(Font.font(null, FontWeight.BOLD, 30));
    getChildren().add(t);

    Button button = new Button();
    button.setText("Close widget");
    button.setLayoutX(50);
    button.setLayoutY(50);
    button.setOnAction((ActionEvent actionEvent) -> {
        System.out.println("close window ");
        getParentStage().close();
    });
    getChildren().add(button);

}
 
开发者ID:ewidgetfx,项目名称:ewidgetfx,代码行数:41,代码来源:HelloWorldWidget.java

示例10: innerShadow

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
public static void innerShadow(Node node) {
    InnerShadow is = new InnerShadow();
    is.setOffsetX(2.0f);
    is.setOffsetY(2.0f);
    node.setEffect(is);
}
 
开发者ID:badernageral,项目名称:bgfinancas,代码行数:7,代码来源:Efeitos.java

示例11: hitPerformTestButton

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
@FXML
void hitPerformTestButton(ActionEvent event) {
	buttonStateManager.reportStartOfTest();
	if (hideTestResultAnimation.getStatus().equals(Status.STOPPED))
		performTestPane.dividerPositionProperty().set(0.5);
	hideTestResultAnimation.stop();
	testResultText = "Testing...";
	testResultColor = Color.RED;
	performTestStatusFakeButton.setText(testResultText);
	InnerShadow shadow = new InnerShadow(10, testResultColor);
	shadow.setOffsetY(0f);
	shadow.setOffsetX(0f);
	performTestStatusFakeButton.setEffect(shadow);
	performTestPane.showDetailNodeProperty().set(true);
	Task<Void> task = new Task<Void>() {
        @Override
        protected Void call() throws Exception {
        	if (elementWorkingCopy instanceof Action) {
    		    Action action = (Action) elementWorkingCopy;
    		    action.execute();
    		    Platform.runLater(() -> {
					testResultText = "Done";
				    testResultColor = Color.PALEGREEN;
				});
    		} else if (elementWorkingCopy instanceof Checker) {
    			Checker checker = (Checker) elementWorkingCopy;
    			boolean result = checker.check();
    			Platform.runLater(() -> {
	    			if (result) {
	    				testResultText = "True";
	    				testResultColor = Color.DEEPSKYBLUE;
	    			} else {
	    				testResultText = "False";
	    				testResultColor = Color.HOTPINK;
	    			}
    			});
    		} else if (elementWorkingCopy instanceof Counter) {
    			Counter counter = (Counter) elementWorkingCopy;
    			int count = counter.count();
    			Platform.runLater(() -> {
	    			testResultText = String.valueOf(count);
	    			testResultColor = Color.VIOLET;
    			});
    		}
            return null;
        }
    };
    task.stateProperty().addListener(new ChangeListener<Worker.State>() {
		@Override
		public void changed(ObservableValue<? extends State> observable, State oldValue,
				State newValue) {
			if(newValue==Worker.State.SUCCEEDED){
				shadow.setColor(testResultColor);
				performTestStatusFakeButton.setEffect(shadow);
				performTestStatusFakeButton.setText("Test result: " + testResultText + ".");
				hideTestResultAnimation.play();
				buttonStateManager.reportEndOfTest();
            } else if (newValue==Worker.State.FAILED){
				if (task.getException() == null) {
					throw new RuntimeException("GUI Testing task failed for some reason for "
							+ elementWorkingCopy.getClass().getSimpleName());
				} else {
					throw new RuntimeException(task.getException());
				}
            }
		}
    });
    new Thread(task).start();
}
 
开发者ID:ubershy,项目名称:StreamSis,代码行数:70,代码来源:ElementEditorController.java

示例12: drawMemory

import javafx.scene.effect.InnerShadow; //导入方法依赖的package包/类
private final void drawMemory() {
    final double SIZE = control.getPrefWidth() < control.getPrefHeight() ? control.getPrefWidth() : control.getPrefHeight();
    final double WIDTH = control.getPrefWidth();
    final double HEIGHT = control.getPrefHeight();

    final Shape IBOUNDS = new Rectangle(0, 0, WIDTH, HEIGHT);
    IBOUNDS.setOpacity(0.0);

    domino.getChildren().clear();
    domino.getChildren().add(IBOUNDS);

    final Rectangle FRAME = new Rectangle(0.0, 0.0,
                                          WIDTH, HEIGHT);
    FRAME.setArcWidth(0.2647058823529412 * WIDTH);
    FRAME.setArcHeight(0.1323529411764706 * HEIGHT);
    FRAME.getStyleClass().add("domino-frame");

    final InnerShadow FRAME_INNER_SHADOW = new InnerShadow();
    FRAME_INNER_SHADOW.setWidth(0.1 * FRAME.getLayoutBounds().getWidth());
    FRAME_INNER_SHADOW.setHeight(0.1 * FRAME.getLayoutBounds().getHeight());
    FRAME_INNER_SHADOW.setOffsetX(0.0);
    FRAME_INNER_SHADOW.setOffsetY(-0.01 * SIZE);
    FRAME_INNER_SHADOW.setRadius(0.1 * FRAME.getLayoutBounds().getWidth());
    FRAME_INNER_SHADOW.setColor(Color.color(0.8, 0.8, 0.8, 0.2));
    FRAME_INNER_SHADOW.setBlurType(BlurType.GAUSSIAN);
    FRAME_INNER_SHADOW.inputProperty().set(null);
    FRAME.setEffect(FRAME_INNER_SHADOW);

    final Rectangle MAIN = new Rectangle(0.03676470588235294 * WIDTH, 0.01838235294117647 * HEIGHT,
                                         0.9264705882352942 * WIDTH, 0.9632352941176471 * HEIGHT);
    MAIN.setArcWidth(0.23529411764705882 * WIDTH);
    MAIN.setArcHeight(0.11764705882352941 * HEIGHT);
    MAIN.getStyleClass().add("domino-main");

    final InnerShadow MAIN_INNER_SHADOW = new InnerShadow();
    MAIN_INNER_SHADOW.setWidth(0.05 * MAIN.getLayoutBounds().getWidth());
    MAIN_INNER_SHADOW.setHeight(0.05 * MAIN.getLayoutBounds().getHeight());
    MAIN_INNER_SHADOW.setOffsetX(0.0);
    MAIN_INNER_SHADOW.setOffsetY(0.008 * SIZE);
    MAIN_INNER_SHADOW.setRadius(0.05 * MAIN.getLayoutBounds().getWidth());
    MAIN_INNER_SHADOW.setColor(Color.BLACK);
    MAIN_INNER_SHADOW.setBlurType(BlurType.GAUSSIAN);

    final InnerShadow MAIN_INNER_GLOW = new InnerShadow();
    MAIN_INNER_GLOW.setWidth(0.025 * MAIN.getLayoutBounds().getWidth());
    MAIN_INNER_GLOW.setHeight(0.025 * MAIN.getLayoutBounds().getHeight());
    MAIN_INNER_GLOW.setOffsetX(0.0);
    MAIN_INNER_GLOW.setOffsetY(-0.008 * SIZE);
    MAIN_INNER_GLOW.setRadius(0.025 * MAIN.getLayoutBounds().getWidth());
    MAIN_INNER_GLOW.setColor(Color.color(1, 1, 1, 0.5));
    MAIN_INNER_GLOW.setBlurType(BlurType.GAUSSIAN);
    MAIN_INNER_GLOW.inputProperty().set(MAIN_INNER_SHADOW);
    MAIN.setEffect(MAIN_INNER_GLOW);

    final Rectangle SEPARATOR = new Rectangle(0.1323529411764706 * WIDTH, 0.4742647058823529 * HEIGHT,
                                              0.7647058823529411 * WIDTH, 0.025735294117647058 * HEIGHT);
    SEPARATOR.setArcWidth(0.051470588235294115 * WIDTH);
    SEPARATOR.setArcHeight(0.025735294117647058 * HEIGHT);
    SEPARATOR.getStyleClass().add("domino-separator");

    domino.getChildren().addAll(FRAME, MAIN, SEPARATOR);
    domino.getChildren().addAll(createDotMap("domino-dot-off").values());
}
 
开发者ID:SaiPradeepDandem,项目名称:javafx-demos,代码行数:64,代码来源:DominoSkin.java


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