javax.swing.text.html.StyleSheet.removeStyle()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(197)

本文整理了Java中javax.swing.text.html.StyleSheet.removeStyle()方法的一些代码示例,展示了StyleSheet.removeStyle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StyleSheet.removeStyle()方法的具体详情如下:
包路径:javax.swing.text.html.StyleSheet
类名称:StyleSheet
方法名:removeStyle

StyleSheet.removeStyle介绍

暂无

代码示例

代码示例来源:origin: freeplane/freeplane

  1. @Override
  2. protected void cancel() {
  3. super.cancel();
  4. final StyleSheet styleSheet = htmlEditorPanel.getDocument().getStyleSheet();
  5. styleSheet.removeStyle("p");
  6. styleSheet.removeStyle("BODY");
  7. getBase().getEditControl().cancel();
  8. }

代码示例来源:origin: org.fudaa.framework.fudaa/fudaa-common

  1. final String name = (String) rules.nextElement();
  2. ss.removeStyle(name);

代码示例来源:origin: freeplane/freeplane

  1. void setDefaultStyle(NodeModel node) {
  2. final StyleSheet styleSheet = noteViewerComponent.getDocument().getStyleSheet();
  3. styleSheet.removeStyle("body");
  4. styleSheet.removeStyle("p");
  5. // set default font for notes:
  6. final ModeController modeController = Controller.getCurrentModeController();
  7. String noteCssRule = getNoteCSSStyle(modeController, node, 1f, false);
  8. String bodyRule = new StringBuilder( "body {").append(noteCssRule).append("}\n").toString();
  9. styleSheet.addRule(bodyRule);
  10. if (ResourceController.getResourceController().getBooleanProperty(
  11. MNoteController.RESOURCES_USE_MARGIN_TOP_ZERO_FOR_NOTES)) {
  12. /* this is used for paragraph spacing. I put it here, too, as
  13. * the tooltip display uses the same spacing. But it is to be discussed.
  14. * fc, 23.3.2009.
  15. */
  16. String paragraphtRule = "p {margin-top:0;}\n";
  17. styleSheet.addRule(paragraphtRule);
  18. }
  19. }

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

  1. ss.removeStyle(name);

代码示例来源:origin: RPTools/maptool

  1. style.removeStyle(s);

代码示例来源:origin: freeplane/freeplane

  1. @Override
  2. protected void split() {
  3. super.split();
  4. final StyleSheet styleSheet = htmlEditorPanel.getDocument().getStyleSheet();
  5. styleSheet.removeStyle("p");
  6. styleSheet.removeStyle("body");
  7. getBase().getEditControl().split(HtmlUtils.unescapeHTMLUnicodeEntity(htmlEditorPanel.getDocumentText()),
  8. htmlEditorPanel.getCaretPosition());
  9. }

代码示例来源:origin: freeplane/freeplane

  1. @Override
  2. protected void submit() {
  3. super.submit();
  4. htmlEditorPanel.getDocument().getStyleSheet().removeStyle("p");
  5. htmlEditorPanel.getDocument().getStyleSheet().removeStyle("body");
  6. if (htmlEditorPanel.needsSaving()) {
  7. getBase().getEditControl().ok(HtmlUtils.unescapeHTMLUnicodeEntity(htmlEditorPanel.getDocumentText()));
  8. }
  9. else {
  10. getBase().getEditControl().cancel();
  11. }
  12. }

代码示例来源:origin: freeplane/freeplane

  1. final HTMLDocument document = (HTMLDocument) tip.getDocument();
  2. final StyleSheet styleSheet = document.getStyleSheet();
  3. styleSheet.removeStyle("p");
  4. styleSheet.removeStyle("body");
  5. styleSheet.addRule("p {margin-top:0;}\n");

代码示例来源:origin: freeplane/freeplane

  1. styleSheet.removeStyle("p");
  2. styleSheet.removeStyle("body");
  3. styleSheet.addRule(ruleBuilder.toString());
  4. final URL url = node.getMap().getURL();

相关文章