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


Java Text.setEffect方法代码示例

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


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

示例1: InnerShadowSample

import javafx.scene.text.Text; //导入方法依赖的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: LettersPane

import javafx.scene.text.Text; //导入方法依赖的package包/类
public LettersPane() {
    setId("LettersPane");
    setPrefSize(480,480);
    setFocusTraversable(true);
    setOnMousePressed(new EventHandler<MouseEvent>() {
        
        @Override public void handle(MouseEvent me) {
            requestFocus();
            me.consume();
        }
    });
    setOnKeyPressed(new EventHandler<KeyEvent>() {
        
        @Override public void handle(KeyEvent ke) {
            createLetter(ke.getText());
            ke.consume();
        }
    });
    // create press keys text
    pressText = new Text("Press Keys");
    pressText.setTextOrigin(VPos.TOP);
    pressText.setFont(new Font(Font.getDefault().getFamily(), 40));
    pressText.setLayoutY(5);
    pressText.setFill(Color.rgb(80, 80, 80));
    DropShadow effect = new DropShadow();
    effect.setRadius(0);
    effect.setOffsetY(1);
    effect.setColor(Color.WHITE);
    pressText.setEffect(effect);
    getChildren().add(pressText);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:32,代码来源:KeyStrokeMotion.java

示例3: createIconContent

import javafx.scene.text.Text; //导入方法依赖的package包/类
public static Node createIconContent() {
    Text sample = new Text("FX");
    sample.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD,60));
    sample.setStyle("-fx-font-size: 80px;");
    sample.setFill(Color.web("#333333"));
    final Reflection reflection = new Reflection();
    reflection.setTopOffset(-28d);
    reflection.setFraction(0.5);
    sample.setEffect(reflection);
    return sample;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:12,代码来源:ReflectionSample.java

示例4: createIconContent

import javafx.scene.text.Text; //导入方法依赖的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

示例5: createIconContent

import javafx.scene.text.Text; //导入方法依赖的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 GaussianBlur GaussianBlur = new GaussianBlur();
        GaussianBlur.setRadius(15);
        sample.setEffect(GaussianBlur);
        return sample;
    }
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:12,代码来源:GaussianBlurSample.java

示例6: DropShadowSample

import javafx.scene.text.Text; //导入方法依赖的package包/类
public DropShadowSample() {
    Text sample = new Text(0,40,"DropShadow Effect");
    sample.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD,36));
    final DropShadow dropShadow = new DropShadow();
    sample.setEffect(dropShadow);
    getChildren().add(sample);
    // REMOVE ME
    setControls(
            new SimplePropertySheet.PropDesc("Radius", dropShadow.radiusProperty(), 0d, 20d),
            new SimplePropertySheet.PropDesc("Offset X", dropShadow.offsetXProperty(), -10d, 10d),
            new SimplePropertySheet.PropDesc("Offset Y", dropShadow.offsetYProperty(), -10d, 10d),
            new SimplePropertySheet.PropDesc("Spread", dropShadow.spreadProperty(), 0d, 1d),
            new SimplePropertySheet.PropDesc("Color", dropShadow.colorProperty())
    );
    // END REMOVE ME
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:17,代码来源:DropShadowSample.java

示例7: createIconContent

import javafx.scene.text.Text; //导入方法依赖的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

示例8: init

import javafx.scene.text.Text; //导入方法依赖的package包/类
@Override
protected void init() {
    String tooltip = "999";
    Text icon = new Text(tooltip);
    icon.setFill(Color.BISQUE);
    DropShadow ds = new DropShadow();
    ds.setOffsetY(3.0F);
    ds.setColor(Color.GOLDENROD);
    icon.setEffect(ds);
    initializeButton(tooltip, icon);
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:12,代码来源:TempPopulationNinesBC.java

示例9: init

import javafx.scene.text.Text; //导入方法依赖的package包/类
@Override
protected void init() {
    String tooltip = "Dense";
    Text icon = new Text(tooltip);
    icon.setFill(Color.BISQUE);

    DropShadow ds = new DropShadow();
    ds.setOffsetY(3.0F);
    ds.setColor(Color.GOLDENROD);
    icon.setEffect(ds);
    initializeButton(tooltip, icon);
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:13,代码来源:TempDenseBC.java

示例10: createText

import javafx.scene.text.Text; //导入方法依赖的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


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