当前位置: 首页 > news >正文

英文网站建站公司石家庄有做网站的公司吗

英文网站建站公司,石家庄有做网站的公司吗,网页设计的代码,电脑网站大全JavaFX教程 - JavaFX HTMLEditor HTMLEditor控件是一个富文本编辑器,具有以下功能。 粗体斜体下划线删除线字体系列字体大小前景色背景颜色缩进项目符号列表编号列表对齐水平线复制文本片段粘贴文本片段 HTMLEditor类返回HTML字符串中的编辑内容。 创建HTML编辑器…

JavaFX教程 - JavaFX HTMLEditor

HTMLEditor控件是一个富文本编辑器,具有以下功能。

  • 粗体
  • 斜体
  • 下划线
  • 删除线
  • 字体系列
  • 字体大小
  • 前景色
  • 背景颜色
  • 缩进
  • 项目符号列表
  • 编号列表
  • 对齐
  • 水平线
  • 复制文本片段
  • 粘贴文本片段

HTMLEditor类返回HTML字符串中的编辑内容。

创建HTML编辑器

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;public class Main extends Application {@Overridepublic void start(Stage stage) {HTMLEditor htmlEditor = new HTMLEditor();htmlEditor.setPrefHeight(245);Scene scene = new Scene(htmlEditor);       stage.setScene(scene);stage.show();} public static void main(String[] args) {launch(args);}
}

上面的代码生成以下结果。

null

HTML内容

要将内容设置为HTMLEditor类,请使用setHtmlText方法。

htmlEditor.setHtmlText(INITIAL_TEXT);
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;public class Main extends Application {@Overridepublic void start(Stage stage) {HTMLEditor htmlEditor = new HTMLEditor();htmlEditor.setPrefHeight(245);String INITIAL_TEXT = "Lorem ipsum dolor sit "+ "amet, consectetur adipiscing elit. Nam tortor felis, pulvinar "+ "aliquam sagittis gravida eu dolor. Etiam sit amet ipsum "+ "sem.";htmlEditor.setHtmlText(INITIAL_TEXT);Scene scene = new Scene(htmlEditor);       stage.setScene(scene);stage.show();} public static void main(String[] args) {launch(args);}
}

上面的代码生成以下结果。

null

格式

我们可以使用此字符串中的HTML标记为最初渲染的内容应用特定的格式。

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;public class Main extends Application {@Overridepublic void start(Stage stage) {HTMLEditor htmlEditor = new HTMLEditor();htmlEditor.setPrefHeight(245);String INITIAL_TEXT = "Lorem ipsum dolor sit "+ "amet, consectetur adipiscing elit. <i>Nam tortor felis</i>, pulvinar "+ "<UL><li>a</li><li>a</li><li>a</li></UL>"+ "aliquam sagittis gravida <b>eu dolor</b>. Etiam sit amet ipsum "+ "sem.";htmlEditor.setHtmlText(INITIAL_TEXT);Scene scene = new Scene(htmlEditor);       stage.setScene(scene);stage.show();} public static void main(String[] args) {launch(args);}
}

上面的代码生成以下结果。

null

获取HTML内容

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.VBox;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;public class Main extends Application {@Overridepublic void start(Stage stage) {HTMLEditor htmlEditor = new HTMLEditor();htmlEditor.setPrefHeight(245);String INITIAL_TEXT = "Lorem ipsum dolor sit "+ "amet, consectetur adipiscing elit. <i>Nam tortor felis</i>, pulvinar "+ "<UL><li>a</li><li>a</li><li>a</li></UL>"+ "aliquam sagittis gravida <b>eu dolor</b>. Etiam sit amet ipsum "+ "sem.";htmlEditor.setHtmlText(INITIAL_TEXT);Button showHTMLButton = new Button("Produce HTML Code");showHTMLButton.setOnAction((ActionEvent arg0) -> {System.out.println(htmlEditor.getHtmlText());});VBox vbox = new VBox();vbox.getChildren().addAll(htmlEditor,showHTMLButton);Scene scene = new Scene(vbox);       stage.setScene(scene);stage.show();} public static void main(String[] args) {launch(args);}
}

上面的代码生成以下结果。

null

http://www.15wanjia.com/news/155193.html

相关文章:

  • 网站服务器 2核建设购物网站的方案
  • 培训网站建设情况ppt模板制作教程步骤
  • 哪里有网站推广优化美图秀秀网页版入口
  • 校园二级网站建设成都网站工作室
  • 个人做网站的必要性做a 免费网站
  • 新闻类网站源码学做陶艺作品的网站
  • 如何自己弄一个网站深圳设计周展会2024时间
  • 南京做企业网站公司哪家好企业网站标题如何设置
  • 北京建设商业网站js做网站登录框验证码
  • 用wordpress制作网站如何在自己的网站上做h5页面
  • 深圳专业做网站专业郑州seo外包顾问
  • 网站设置字体样式网站seo做哪些工作
  • 南沙企业网站建设建大型网站公司
  • 新闻类的网站如何做优化网站筛选功能
  • 临海建设局官方网站北京建设信源公司网站
  • 动漫制作专业就业惠州seo关键词排名
  • 高端婚恋网站排名网站维护需要用到哪些知识
  • 天津网站设计公司排名工作管理app
  • 优秀网站特点网站开发 弹窗
  • 好的设计作品网站wordpress最漂亮主题
  • 如何在网站上添加qq中国法律服务网app最新下载
  • 视频网站开发工程师有什么软件可以制作图片
  • 福州网站制作策划网站备案信息如何注销吗
  • c 网站开发模板苏州做网站的哪个公司比较好
  • 帮别人做网站需要什么能力网站设计连接数据库怎么做
  • 成都装修网站制作什么是二次开发
  • 湖北中英双语网站建设小学网站模板免费下载
  • 网站搭建详细步骤手机网站注意哪些问题
  • 网站如何备案icp企业为什么要用钉钉
  • 网站系统容量评估潍坊网站定制模板建站