javafx

web端生成的带有echarts图表的html页面,嵌入在(javaFx)webview中显示错位问题

假如想象 提交于 2021-02-10 06:02:05
web项目需要嵌入到手机APP的webview里面以及 windows客户端应用( JavaFx )的webview里面,这个时候就出现了问题。 echarts渲染的时候根据浏览器不同的内核显示是有区别的。 项目里面的echarts折线图显示的效果是这样的 这个效果在网页上面,跟Android app的webview里面显示是没问题的,但是在window显示的echarts折线图显示是错位的,柱状图也显示错位了。 后来查Echarts的api时发现4.x有新特性,在初始化是可以配置渲染方式为canvas或者svg,默认为canvas。 初始化代码: var mychart = echarts.init(document.getElementById('demo'), null, {renderer: 'svg'}); 在看了下项目显示效果折线是没问题了,但是折线上面的一个标记的特殊的点什么的位置之前是在canvas渲染模式下调整好的,到了svg渲染模式下全变化了,这个需要在从新调整,有时候这个点在不同的环境里面显示的还不一样,得通过修改echarts的options配置来达到显示的最优解。 另外一点要注意的就是修改成svg以后,rich富文本设置的效果就没有效果了, svg渲染下不支持rich 了。 还有一点很重要的就是:

Javafx font derive bold

99封情书 提交于 2021-02-10 05:21:07
问题 I wanted to change a (loaded) text font dinamically for my javafx application, so I did this code: Font font = Font.loadFont(Fonts.class.getClassLoader().getResource("path/font.woff").toExternalForm(), 25); Font bold = Font.font(font.getFamily(), FontWeight.BOLD, font.getSize()); Font italic = Font.font(font.getFamily(), FontPosture.ITALIC, font.getSize()); Font boldItalic = Font.font(font.getFamily(), FontWeight.BOLD, FontPosture.ITALIC, font.getSize()); but when I try to change the text

JavaFx + Felix on windows WinPlatformFactory not found

試著忘記壹切 提交于 2021-02-09 07:01:18
问题 I have a desktop application that uses Apache felix and swing, with embebed javafx UIs, javafx is being loaded into the project by a maven embebed dependency, and it works fine on mac. But when i run it on windows it gives me the following error: java.lang.ClassNotFoundException: com.sun.glass.ui.win.WinPlatformFactory not found by my-software [38] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574) at org.apache.felix.framework

ScalaFX - How to get the title of a Scene using a method

自作多情 提交于 2021-02-08 18:27:21
问题 I am using ScalaFX and trying to learn how it works. As an exerpiment (not what I will do in production) I want a method that gets the title of a window. So here is my Graph.scala file: package graphing import scalafx.application.JFXApp import scalafx.scene.Scene import scalafx.scene.paint.Color class Graph { val app = new JFXApp { stage = new JFXApp.PrimaryStage { title = "First GUI" scene = new Scene { fill = Color.Coral } } } def getTitle() = { app.stage.getTitle } def generateChart(args:

How do I import JavaFX into Eclipse?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-08 17:01:24
问题 I have the latest JDK (update 65), but Eclipse doesn't even recognize JavaFX when I try to import it. How do I fix this and import it? 回答1: After following these steps Go Help Go Eclipse MarketPlace Search e(fx)clipse Install it you can import javafx and if you want to add on your project just follow: Java Build Path -> Libraries -> Add Libraries -> JavaFx SDK 回答2: Follow the steps: Go Help Go Eclipse MarketPlace... Search e(fx)clipse Install It 回答3: Do these following steps: Open Eclipse ->

How do I import JavaFX into Eclipse?

此生再无相见时 提交于 2021-02-08 17:01:16
问题 I have the latest JDK (update 65), but Eclipse doesn't even recognize JavaFX when I try to import it. How do I fix this and import it? 回答1: After following these steps Go Help Go Eclipse MarketPlace Search e(fx)clipse Install it you can import javafx and if you want to add on your project just follow: Java Build Path -> Libraries -> Add Libraries -> JavaFx SDK 回答2: Follow the steps: Go Help Go Eclipse MarketPlace... Search e(fx)clipse Install It 回答3: Do these following steps: Open Eclipse ->

How do I import JavaFX into Eclipse?

戏子无情 提交于 2021-02-08 16:59:36
问题 I have the latest JDK (update 65), but Eclipse doesn't even recognize JavaFX when I try to import it. How do I fix this and import it? 回答1: After following these steps Go Help Go Eclipse MarketPlace Search e(fx)clipse Install it you can import javafx and if you want to add on your project just follow: Java Build Path -> Libraries -> Add Libraries -> JavaFx SDK 回答2: Follow the steps: Go Help Go Eclipse MarketPlace... Search e(fx)clipse Install It 回答3: Do these following steps: Open Eclipse ->

How do I import JavaFX into Eclipse?

邮差的信 提交于 2021-02-08 16:59:09
问题 I have the latest JDK (update 65), but Eclipse doesn't even recognize JavaFX when I try to import it. How do I fix this and import it? 回答1: After following these steps Go Help Go Eclipse MarketPlace Search e(fx)clipse Install it you can import javafx and if you want to add on your project just follow: Java Build Path -> Libraries -> Add Libraries -> JavaFx SDK 回答2: Follow the steps: Go Help Go Eclipse MarketPlace... Search e(fx)clipse Install It 回答3: Do these following steps: Open Eclipse ->

Display OpenCV Mat with JavaFX

99封情书 提交于 2021-02-08 14:15:18
问题 I would like to display Mat objects from OpenCV directly with JavaFX. I have seen that it is possible to convert a Mat object into a BufferedImage . But as far as I know you can't display a BufferedImage with JavaFX, so another conversion would have to take place. Is there a way to directly convert it into a data structure that is displayable by JavaFX? 回答1: I have found a direct way to convert a Mat object to a JavaFX Image object. MatOfByte byteMat = new MatOfByte(); Highgui.imencode(".bmp"

Display OpenCV Mat with JavaFX

故事扮演 提交于 2021-02-08 14:14:56
问题 I would like to display Mat objects from OpenCV directly with JavaFX. I have seen that it is possible to convert a Mat object into a BufferedImage . But as far as I know you can't display a BufferedImage with JavaFX, so another conversion would have to take place. Is there a way to directly convert it into a data structure that is displayable by JavaFX? 回答1: I have found a direct way to convert a Mat object to a JavaFX Image object. MatOfByte byteMat = new MatOfByte(); Highgui.imencode(".bmp"