List of usage examples for javafx.scene.text Font getDefault
public static synchronized Font getDefault()
From source file:de.pixida.logtest.designer.automaton.ConfigFrame.java
ConfigFrame(final String aTitle) { Validate.notNull(aTitle);/*from ww w .j a va 2 s . c o m*/ this.title = aTitle; this.setHbarPolicy(ScrollBarPolicy.NEVER); this.setFitToWidth(true); final int insets = 10; this.vbox.setPadding(new Insets(insets)); final int spacing = 8; this.vbox.setSpacing(spacing); final Text titleText = new Text(this.title); final int titleFontSize = 14; titleText.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, titleFontSize)); this.vbox.getChildren().add(titleText); this.setContent(this.vbox); final int minWidth = 200; this.setMinWidth(minWidth); }
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 . java 2s . com*/ 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:se.trixon.filebydate.ui.MainApp.java
private void createUI() { mRoot = new BorderPane(); Scene scene = new Scene(mRoot); //scene.getStylesheets().add("css/modena_dark.css"); mDefaultFont = Font.getDefault(); initActions();//from w w w . j a va 2s .c om mListView = new ListView<>(); mListView.setItems(mItems); mListView.setCellFactory((ListView<Profile> param) -> new ProfileListCell()); Label welcomeLabel = new Label(mBundle.getString("welcome")); welcomeLabel.setFont(Font.font(mDefaultFont.getName(), FontPosture.ITALIC, 18)); mListView.setPlaceholder(welcomeLabel); mPreviewPanel = new PreviewPanel(); mRoot.setCenter(mListView); mRoot.setBottom(mPreviewPanel); mStage.setScene(scene); setRunningState(RunState.STARTABLE); }
From source file:se.trixon.mapollage.ui.MainApp.java
private void createUI() { mRoot = new BorderPane(); Scene scene = new Scene(mRoot); //scene.getStylesheets().add("css/modena_dark.css"); mDefaultFont = Font.getDefault(); initActions();//from w w w.j a v a 2s . co m mListView = new ListView<>(); mListView.setItems(mItems); mListView.setCellFactory((ListView<Profile> param) -> new ProfileListCell()); Label welcomeLabel = new Label(mBundle.getString("welcome")); welcomeLabel.setFont(Font.font(mDefaultFont.getName(), FontPosture.ITALIC, 18)); mOpenButton = mProgressPanel.getOpenButton(); mOpenButton.setOnAction((ActionEvent event) -> { SystemHelper.desktopOpen(mDestination); }); mOpenButton.setGraphic( mFontAwesome.create(FontAwesome.Glyph.GLOBE).size(ICON_SIZE_TOOLBAR / 2).color(mIconColor)); mListView.setPlaceholder(welcomeLabel); mRoot.setCenter(mListView); mStage.setScene(scene); setRunningState(RunState.STARTABLE); }