List of usage examples for javafx.scene.text FontWeight BOLD
FontWeight BOLD
To view the source code for javafx.scene.text FontWeight BOLD.
Click Source Link
From source file:Main.java
static Node gaussianBlur() { Text t2 = new Text(); t2.setX(10.0f);//from w w w . j a v a 2 s . co m t2.setY(140.0f); t2.setCache(true); t2.setText("Gaussian Blur"); t2.setFill(Color.RED); t2.setFont(Font.font("null", FontWeight.BOLD, 36)); t2.setEffect(new GaussianBlur()); return t2; }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = SceneBuilder.create().width(320).height(343) .root(GroupBuilder.create()/*from ww w .ja va 2s. c o m*/ .children( RectangleBuilder.create().width(320).height(45) .fill(LinearGradientBuilder.create().endX(0.0).endY(1.0) .stops(new Stop(0, Color.web("0xAEBBCC")), new Stop(1, Color.web("0x6D84A3"))) .build()) .build(), TextBuilder .create().layoutX(65).layoutY(12).textOrigin(VPos.TOP).fill(Color.WHITE) .text("Audio Configuration") .font(Font.font("SansSerif", FontWeight.BOLD, 20)).build(), RectangleBuilder .create().x(0).y(43).width(320).height(300).fill(Color.rgb(199, 206, 213)) .build(), RectangleBuilder .create().x(9).y(54).width(300).height(130).arcWidth(20).arcHeight(20) .fill(Color.WHITE).stroke(Color.color(0.66, 0.67, 0.69)).build(), textDb = TextBuilder.create().layoutX(18).layoutY(69).textOrigin(VPos.TOP) .fill(Color.web("#131021")) .font(Font.font("SansSerif", FontWeight.BOLD, 18)).build(), slider = SliderBuilder.create().layoutX(135).layoutY(69).prefWidth(162) .min(acModel.minDecibels).max(acModel.maxDecibels).build(), LineBuilder .create().startX(9).startY(97).endX(309).endY(97) .stroke(Color.color(0.66, 0.67, 0.69)).build(), TextBuilder.create().layoutX(18).layoutY(113).textOrigin(VPos.TOP) .fill(Color.web("#131021")).text("Muting") .font(Font.font("SanSerif", FontWeight.BOLD, 18)).build(), mutingCheckBox = CheckBoxBuilder.create().layoutX(280).layoutY(113).build(), LineBuilder.create().startX(9).startY(141).endX(309).endY(141) .stroke(Color.color(0.66, 0.67, 0.69)).build(), TextBuilder.create().layoutX(18).layoutY(154).textOrigin(VPos.TOP) .fill(Color.web("#131021")).text("Genre") .font(Font.font("SanSerif", FontWeight.BOLD, 18)).build(), genreChoiceBox = ChoiceBoxBuilder.create().layoutX(204).layoutY(154).prefWidth(93) .items(acModel.genres).build()) .build()) .build(); textDb.textProperty().bind(acModel.selectedDBs.asString().concat(" dB")); slider.valueProperty().bindBidirectional(acModel.selectedDBs); slider.disableProperty().bind(acModel.muting); mutingCheckBox.selectedProperty().bindBidirectional(acModel.muting); acModel.genreSelectionModel = genreChoiceBox.getSelectionModel(); acModel.addListenerToGenreSelectionModel(); acModel.genreSelectionModel.selectFirst(); stage.setScene(scene); stage.setTitle("Audio Configuration"); stage.show(); }
From source file:de.pixida.logtest.designer.automaton.RectangularNode.java
RectangularNode(final Graph graph, final ContentDisplayMode aContentDisplayMode, final int zIndex) { super(graph); Validate.notNull(aContentDisplayMode); this.contentDisplayMode = aContentDisplayMode; this.rectangle.setStroke(BORDER_COLOR_DEFAULT); final Font titleFont = Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, 10.0); this.titleText.setFont(titleFont); final Font contentFont = Font.font(titleFont.getFamily(), FontWeight.NORMAL, titleFont.getSize()); this.contentText.setFont(contentFont); this.textFlow.getChildren().addAll(this.titleText, this.separatorText, this.contentText); this.textFlow.layoutXProperty().bind(this.rectangle.xProperty()); this.textFlow.layoutYProperty().bind(this.rectangle.yProperty()); final double insetTop = 0.0; final double insetRight = 3.0; final double insetBottom = 3.0; final double insetLeft = 3.0; this.textFlow.setPadding(new Insets(insetTop, insetRight, insetBottom, insetLeft)); this.textFlow.setMouseTransparent(true); this.contentDisplayMode.init(this.textFlow, this.rectangle); if (this.contentDisplayMode.isResizable()) { // this.createResizeSpots(); }/*from w w w . j a v a 2 s .co m*/ this.registerPart(this.rectangle, zIndex); this.registerPart(this.textFlow, zIndex); this.registerActionHandler(this.rectangle); this.loadDimensionsFromJson(new JSONObject()); this.setColor(Color.WHITE); this.setContent(null); }
From source file:Main.java
static Node reflection() { Text t = new Text(); t.setX(10.0f);//from www . j a va 2s . co m t.setY(50.0f); t.setCache(true); t.setText("Reflections on JavaFX..."); t.setFill(Color.RED); t.setFont(Font.font("null", FontWeight.BOLD, 30)); Reflection r = new Reflection(); r.setFraction(0.7f); t.setEffect(r); t.setTranslateY(400); return t; }
From source file:com.cooksys.postmaster.PostmasterModelSingleton.java
public static PostmasterModelSingleton getInstance() { if (_instance == null) { try {/*w w w . ja v a2 s . co m*/ //see if we can read the object from the file first FileInputStream fileInputStream = new FileInputStream(POSTMASTER_DATA_FILE); ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream); _instance = (PostmasterModelSingleton) objectInputStream.readObject(); //fill in transient variables from their serializable counterparts _instance.createTransientPropertyInstances(); for (ParsedHttpRequest request : _instance.requestList) { _instance.incomingMessagesList.add(request.getRequestLine()); } int index = 0; for (ParsedHttpResponse response : _instance.responseList) { Text defaultResponseText = new Text(response.getName()); if (index == _instance.defaultResponseIndex) { defaultResponseText.setFont(Font.font(null, FontWeight.BOLD, 12)); } _instance.savedResponsesList.add(defaultResponseText); index++; } _instance.messageConsole.set(_instance.messageConsoleSerializable); } catch (FileNotFoundException ex) { //File does not exist, so create a new instance _instance = new PostmasterModelSingleton(); } catch (IOException | ClassNotFoundException ex) { //for these exceptions, just create a new instance Logger.getLogger(PostmasterModelSingleton.class.getName()).log(Level.SEVERE, null, ex); _instance = new PostmasterModelSingleton(); } } return _instance; }
From source file:Main.java
static Node motionBlur() { Text t = new Text(); t.setX(20.0f);//from ww w. j ava 2 s .co m t.setY(80.0f); t.setText("Motion Blur"); t.setFill(Color.RED); t.setFont(Font.font("null", FontWeight.BOLD, 60)); MotionBlur mb = new MotionBlur(); mb.setRadius(15.0f); mb.setAngle(45.0f); t.setEffect(mb); t.setTranslateX(520); t.setTranslateY(100); return t; }
From source file:Main.java
private VBox addVBox() { VBox vbox = new VBox(); vbox.setPadding(new Insets(10)); // Set all sides to 10 vbox.setSpacing(8); // Gap between nodes Text title = new Text("Data"); title.setFont(Font.font("Arial", FontWeight.BOLD, 14)); vbox.getChildren().add(title);/*from w ww . j a v a2 s.c o m*/ Hyperlink options[] = new Hyperlink[] { new Hyperlink("Sales"), new Hyperlink("Marketing"), new Hyperlink("Distribution"), new Hyperlink("Costs") }; for (int i = 0; i < 4; i++) { // Add offset to left side to indent from title VBox.setMargin(options[i], new Insets(0, 0, 0, 8)); vbox.getChildren().add(options[i]); } return vbox; }
From source file:Main.java
static Node lighting() { Light.Distant light = new Light.Distant(); light.setAzimuth(-135.0f);//from w w w. j av a 2 s . c om Lighting l = new Lighting(); l.setLight(light); l.setSurfaceScale(5.0f); Text t = new Text(); t.setText("JavaFX\nLighting!"); t.setFill(Color.RED); t.setFont(Font.font("null", FontWeight.BOLD, 70)); t.setX(500.0f); t.setY(100.0f); t.setTextOrigin(VPos.TOP); t.setEffect(l); t.setTranslateX(0); t.setTranslateY(320); return t; }
From source file:Main.java
static Node innerShadow() { InnerShadow is = new InnerShadow(); is.setOffsetX(2.0f);//w ww .j a va 2 s . com is.setOffsetY(2.0f); Text t = new Text(); t.setEffect(is); t.setX(20); t.setY(100); t.setText("Inner Shadow"); t.setFill(Color.RED); t.setFont(Font.font("null", FontWeight.BOLD, 80)); t.setTranslateX(300); t.setTranslateY(300); return t; }
From source file:Main.java
private void addStackPane(HBox hb) { StackPane stack = new StackPane(); Rectangle helpIcon = new Rectangle(30.0, 25.0); helpIcon.setFill(new LinearGradient(0, 0, 0, 1, true, CycleMethod.NO_CYCLE, new Stop[] { new Stop(0, Color.web("#4977A3")), new Stop(0.5, Color.web("#B0C6DA")), new Stop(1, Color.web("#9CB6CF")), })); helpIcon.setStroke(Color.web("#D0E6FA")); helpIcon.setArcHeight(3.5);/*from w ww . j a v a2 s . c om*/ helpIcon.setArcWidth(3.5); Text helpText = new Text("?"); helpText.setFont(Font.font("Verdana", FontWeight.BOLD, 18)); helpText.setFill(Color.WHITE); helpText.setStroke(Color.web("#7080A0")); stack.getChildren().addAll(helpIcon, helpText); stack.setAlignment(Pos.CENTER_RIGHT); // Add offset to right for question mark to compensate for RIGHT // alignment of all nodes StackPane.setMargin(helpText, new Insets(0, 10, 0, 0)); hb.getChildren().add(stack); HBox.setHgrow(stack, Priority.ALWAYS); }