SVGGlyph build() { return new SVGGlyph(glyphId, name, svgPathContent, Color.BLACK); } }
/** * load a single svg icon from a file * * @param url of the svg icon * @return SVGGLyph node * @throws IOException */ public static SVGGlyph loadGlyph(URL url) throws IOException { String urlString = url.toString(); String filename = urlString.substring(urlString.lastIndexOf('/') + 1); int startPos = 0; int endPos = 0; while (endPos < filename.length() && filename.charAt(endPos) != '-') { endPos++; } int id = Integer.parseInt(filename.substring(startPos, endPos)); startPos = endPos + 1; while (endPos < filename.length() && filename.charAt(endPos) != '.') { endPos++; } String name = filename.substring(startPos, endPos); return new SVGGlyph(id, name, extractSvgPath(getStringFromInputStream(url.openStream())), Color.BLACK); }
/** * init fxml when loaded. */ @PostConstruct public void init() { for (int i = 0; i < 100; i++) { contentList.getItems().add("Item " + i); } contentList.setMaxHeight(3400); JFXScrollPane.smoothScrolling((ScrollPane) scroll.getChildren().get(0)); SVGGlyph arrow = new SVGGlyph(0, "FULLSCREEN", "M402.746 877.254l-320-320c-24.994-24.992-24.994-65.516 0-90.51l320-320c24.994-24.992 65.516-24.992 90.51 0 24.994 24.994 " + "24.994 65.516 0 90.51l-210.746 210.746h613.49c35.346 0 64 28.654 64 64s-28.654 64-64 64h-613.49l210.746 210.746c12.496 " + "12.496 18.744 28.876 18.744 45.254s-6.248 32.758-18.744 45.254c-24.994 24.994-65.516 24.994-90.51 0z", Color.WHITE); arrow.setSize(20, 16); backButton.setGraphic(arrow); backButton.setRipplerFill(Color.WHITE); } }
arrow = new SVGGlyph(0, "clock", "M512 310.857v256q0 8-5.143 13.143t-13.143 5.143h-182.857q-8 "
decorator.setGraphic(new SVGGlyph(""));
arrow = new SVGGlyph(0, "calendar", "M320 384h128v128h-128zM512 384h128v128h-128zM704 384h128v128h-128zM128 "
public JFXDefaultChip(JFXChipView<T> view, T item) { super(view, item); JFXButton closeButton = new JFXButton(null, new SVGGlyph()); closeButton.getStyleClass().add("close-button"); closeButton.setOnAction((event) -> view.getChips().remove(item)); String tagString = null; if (getItem() instanceof String) { tagString = (String) getItem(); } else { tagString = view.getConverter().toString(getItem()); } Label label = new Label(tagString); label.setWrapText(true); root = new HBox(label, closeButton); getChildren().setAll(root); label.setMaxWidth(100); } }
private void initializeButtons() { SVGGlyph full = new SVGGlyph(0, "FULLSCREEN", "M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z", Color.WHITE); full.setSize(16, 16); SVGGlyph minus = new SVGGlyph(0, "MINUS", "M804.571 420.571v109.714q0 22.857-16 38.857t-38.857 16h-694.857q-22.857 0-38.857-16t-16-38.857v-109.714q0-22.857 16-38.857t38.857-16h694.857q22.857 0 38.857 16t16 38.857z", minus.setSize(12, 2); minus.setTranslateY(4); SVGGlyph resizeMax = new SVGGlyph(0, "RESIZE_MAX", "M726 810v-596h-428v596h428zM726 44q34 0 59 25t25 59v768q0 34-25 60t-59 26h-428q-34 0-59-26t-25-60v-768q0-34 25-60t59-26z", Color.WHITE); resizeMax.setSize(12, 12); SVGGlyph resizeMin = new SVGGlyph(0, "RESIZE_MIN", "M80.842 943.158v-377.264h565.894v377.264h-565.894zM0 404.21v619.79h727.578v-619.79h-727.578zM377.264 161.684h565.894v377.264h-134.736v80.842h215.578v-619.79h-727.578v323.37h80.842v-161.686z", Color.WHITE); resizeMin.setSize(12, 12); SVGGlyph close = new SVGGlyph(0, "CLOSE", "M810 274l-238 238 238 238-60 60-238-238-238 238-60-60 238-238-238-238 60-60 238 238 238-238z",
SVGGlyph arrow = new SVGGlyph(0, "FULLSCREEN", "M402.746 877.254l-320-320c-24.994-24.992-24.994-65.516 0-90.51l320-320c24.994-24.992 65.516-24.992 90.51 0 24.994 24.994 "
protected BorderPane createCalendarArrowsPane() { SVGGlyph leftChevron = new SVGGlyph(0, "CHEVRON_LEFT", "M 742,-37 90,614 Q 53,651 53,704.5 53,758 90,795 l 652,651 q 37,37 90.5,37 53.5,0 90.5,-37 l 75,-75 q 37,-37 37,-90.5 0,-53.5 -37,-90.5 L 512,704 998,219 q 37,-38 37,-91 0,-53 -37,-90 L 923,-37 Q 886,-74 832.5,-74 779,-74 742,-37 z", Color.GRAY); SVGGlyph rightChevron = new SVGGlyph(0, "CHEVRON_RIGHT", "m 1099,704 q 0,-52 -37,-91 L 410,-38 q -37,-37 -90,-37 -53,0 -90,37 l -76,75 q -37,39 -37,91 0,53 37,90 l 486,486 -486,485 q -37,39 -37,91 0,53 37,90 l 76,75 q 36,38 90,38 54,0 90,-38 l 652,-651 q 37,-37 37,-90 z",
public HeaderControl(ArrowPosition pos) { getStyleClass().setAll("control-buttons-tab"); isLeftArrow = pos == ArrowPosition.LEFT; arrowButton = new SVGGlyph(); arrowButton.pseudoClassStateChanged(isLeftArrow ? left : right, true); arrowButton.getStyleClass().setAll("tab-down-button");
button.setScaleX(0); button.setScaleY(0); SVGGlyph glyph = new SVGGlyph(-1, "test", "M1008 6.286q18.857 13.714 15.429 36.571l-146.286 877.714q-2.857 16.571-18.286 25.714-8 4.571-17.714 4.571-6.286 "
final SVGGlyph arrow = new SVGGlyph("M366 698l196-196-196-196 60-60 256 256-256 256z", Color.BLACK); arrow.setSizeForWidth(6); arrow.setMouseTransparent(true);
tabLabel.getStyleClass().setAll("tab-label"); closeButton = new JFXButton(null, new SVGGlyph()); closeButton.getStyleClass().add("tab-close-button"); closeButton.setOnAction(action->{
SVGGlyph dropIcon = new SVGGlyph(0, "ANGLE_RIGHT", "M340 548.571q0 7.429-5.714 13.143l-266.286 266.286q-5.714 5.714-13.143 5.714t-13.143-5.714l-28.571-28.571q-5.714-5.714-5.714-13.143t5.714-13.143l224.571-224.571-224.571-224.571q-5.714-5.714-5.714-13.143t5.714-13.143l28.571-28.571q5.714-5.714 13.143-5.714t13.143 5.714l266.286 266.286q5.714 5.714 5.714 13.143z",
SVGGlyph build() { return new SVGGlyph(glyphId, name, svgPathContent, Color.BLACK); } }
/** * load a single svg icon from a file * * @param url of the svg icon * @return SVGGLyph node * @throws IOException */ public static SVGGlyph loadGlyph(URL url) throws IOException { String urlString = url.toString(); String filename = urlString.substring(urlString.lastIndexOf('/') + 1); int startPos = 0; int endPos = 0; while (endPos < filename.length() && filename.charAt(endPos) != '-') { endPos++; } int id = Integer.parseInt(filename.substring(startPos, endPos)); startPos = endPos + 1; while (endPos < filename.length() && filename.charAt(endPos) != '.') { endPos++; } String name = filename.substring(startPos, endPos); return new SVGGlyph(id, name, extractSvgPath(getStringFromInputStream(url.openStream())), Color.BLACK); }
public JFXDefaultChip(JFXChipView<T> view, T item) { super(view, item); JFXButton closeButton = new JFXButton(null, new SVGGlyph()); closeButton.getStyleClass().add("close-button"); closeButton.setOnAction((event) -> view.getChips().remove(item)); String tagString = null; if (getItem() instanceof String) { tagString = (String) getItem(); } else { tagString = view.getConverter().toString(getItem()); } Label label = new Label(tagString); label.setWrapText(true); root = new HBox(label, closeButton); getChildren().setAll(root); label.setMaxWidth(100); } }
private void initializeButtons() { SVGGlyph full = new SVGGlyph(0, "FULLSCREEN", "M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z", Color.WHITE); full.setSize(16, 16); SVGGlyph minus = new SVGGlyph(0, "MINUS", "M804.571 420.571v109.714q0 22.857-16 38.857t-38.857 16h-694.857q-22.857 0-38.857-16t-16-38.857v-109.714q0-22.857 16-38.857t38.857-16h694.857q22.857 0 38.857 16t16 38.857z", minus.setSize(12, 2); minus.setTranslateY(4); SVGGlyph resizeMax = new SVGGlyph(0, "RESIZE_MAX", "M726 810v-596h-428v596h428zM726 44q34 0 59 25t25 59v768q0 34-25 60t-59 26h-428q-34 0-59-26t-25-60v-768q0-34 25-60t59-26z", Color.WHITE); resizeMax.setSize(12, 12); SVGGlyph resizeMin = new SVGGlyph(0, "RESIZE_MIN", "M80.842 943.158v-377.264h565.894v377.264h-565.894zM0 404.21v619.79h727.578v-619.79h-727.578zM377.264 161.684h565.894v377.264h-134.736v80.842h215.578v-619.79h-727.578v323.37h80.842v-161.686z", Color.WHITE); resizeMin.setSize(12, 12); SVGGlyph close = new SVGGlyph(0, "CLOSE", "M810 274l-238 238 238 238-60 60-238-238-238 238-60-60 238-238-238-238 60-60 238 238 238-238z",
protected BorderPane createCalendarArrowsPane() { SVGGlyph leftChevron = new SVGGlyph(0, "CHEVRON_LEFT", "M 742,-37 90,614 Q 53,651 53,704.5 53,758 90,795 l 652,651 q 37,37 90.5,37 53.5,0 90.5,-37 l 75,-75 q 37,-37 37,-90.5 0,-53.5 -37,-90.5 L 512,704 998,219 q 37,-38 37,-91 0,-53 -37,-90 L 923,-37 Q 886,-74 832.5,-74 779,-74 742,-37 z", Color.GRAY); SVGGlyph rightChevron = new SVGGlyph(0, "CHEVRON_RIGHT", "m 1099,704 q 0,-52 -37,-91 L 410,-38 q -37,-37 -90,-37 -53,0 -90,37 l -76,75 q -37,39 -37,91 0,53 37,90 l 486,486 -486,485 q -37,39 -37,91 0,53 37,90 l 76,75 q 36,38 90,38 54,0 90,-38 l 652,-651 q 37,-37 37,-90 z",