Available Methods
- getParent ( )
- setDisable ( )
- addEventHandler ( )
- setVisible ( )
- setOpacity ( )
- setTranslateY ( )
- setTranslateX ( )
- setScaleX ( )
- getLayoutX ( )
- setScaleY ( )
- localToScene ( )
- setLayoutX ( )
- prefWidth ( )
- getId ( )
- getBoundsInParent ( )
- sceneToLocal ( )
- setOnMouseClicked ( )
- isVisible ( )
- setEffect ( )
- prefHeight ( )
- setOnMouseEntered ( )
- removeEventHandler ( )
- setOnMousePressed ( )
- setLayoutY ( )
- getLayoutY ( )
- addEventFilter ( )
- requestFocus ( )
- pseudoClassStateChanged ( )
- scaleXProperty ( )
- contains ( )
- getScene ( )
- setOnMouseDragged ( )
- setOnMouseExited ( )
- minWidth ( )
- localToScreen ( )
- setManaged ( )
- setStyle ( )
- getTranslateX ( )
- isFocused ( )
- getClass ( )
- scaleYProperty ( )
- opacityProperty ( )
- getUserData ( )
- minHeight ( )
- getPseudoClassStates ( )
- setOnMouseReleased ( )
- isMouseTransparent ( )
- getProperties ( )
- setMouseTransparent ( )
- rotateProperty ( )
- resizeRelocate ( )
Related Classes
- java.io.File
- java.util.Optional
- java.util.logging.Level
- javafx.scene.Scene
- javafx.stage.Stage
- javafx.application.Platform
- javafx.scene.control.Label
- javafx.scene.control.Button
- javafx.collections.ObservableList
- javafx.event.ActionEvent
- javafx.collections.FXCollections
- javafx.scene.image.Image
- javafx.scene.paint.Color
- javafx.fxml.FXMLLoader
- javafx.event.EventHandler
- javafx.fxml.FXML
- javafx.scene.control.TextField
- javafx.scene.Parent
- javafx.scene.layout.VBox
- javafx.scene.layout.StackPane
- javafx.scene.layout.HBox
- javafx.scene.image.ImageView
- javafx.geometry.Insets
- javafx.scene.input.MouseEvent
- javafx.geometry.Pos
Java Code Examples for javafx.scene.Node#getClass()
The following examples show how to use
javafx.scene.Node#getClass() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JavaFXElementPropertyAccessor.java From marathonv5 with Apache License 2.0 | 5 votes |
private Class<?> findJavaClass(Node n) { Class<?> c = n.getClass(); if (this instanceof IPseudoElement) { c = ((IPseudoElement) this).getPseudoComponent().getClass(); } while (c.getPackage() == null || !c.getPackage().getName().startsWith("javafx.scene")) { c = c.getSuperclass(); } return c; }
Example 2
Source File: SysInfoPane.java From Recaf with MIT License | 4 votes |
/** * Converts the UI to markdown text. * Section headers are declared with {@link SubLabeled}. * Section Key/Value pairs are declared with two consecutive {@link Label}. * * @return Markdown string containing all UI elements. */ public String buildClipboard() { // Data collection Map<String, Map<String, String>> data = new LinkedHashMap<>(); // Current section title/map String currentSection = null; Map<String, String> currentMap = null; // Current section key boolean labelIsKey = true; String currentKey = null; for(Node node : getChildren()) { // header if(node.getClass() == SubLabeled.class) { if(currentMap != null) { data.put(currentSection, currentMap); } SubLabeled header = (SubLabeled) node; currentSection = header.getPrimaryText(); currentMap = new LinkedHashMap<>(); } // items (key:value), one follows the other else if(node.getClass() == Label.class) { String text = ((Label) node).getText(); if(labelIsKey) { currentKey = text; } else { currentMap.put(currentKey, text); } // Swap since we do KEY -> VALUE, KEY -> VALUE labelIsKey = !labelIsKey; } } // Put to string StringBuilder sb = new StringBuilder(); data.forEach((section, map) -> { sb.append("**").append(section).append("**\n") .append("| ").append(String.join(" | ", map.keySet())).append(" |\n") .append("| ").append(map.keySet().stream() .map(s -> "--------").collect(Collectors.joining(" | "))).append(" |\n") .append("| `").append(String.join("` | `", map.values())).append("` |\n\n"); }); return sb.toString(); }