Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8103765

Impact of Builders removal on FXML

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • None

      Loading of FXML file depends on Builders for such classes that do not provide either default no-arg constructor or do not provide valueOf(String) method (for fx:value attribute) or do not provide static no-arg factory method (fx:factory attribute). FXML uses some builders that were implemented as convenience for developers to create JavaFX objects. Planned removal of Builders would impact also FXML. Here is small analysis of what classes couldn't be created in FXML if Builders are removed from JavaFX API. (Note that classes that are not listed is possible to create by other means)

      Classes that will not be possible to create when loading FXML file if Builders are removed:

      javafx.beans.property.adapter.JavaBeanBooleanProperty
      javafx.beans.property.adapter.JavaBeanDoubleProperty
      javafx.beans.property.adapter.JavaBeanFloatProperty
      javafx.beans.property.adapter.JavaBeanIntegerProperty
      javafx.beans.property.adapter.JavaBeanLongProperty
      javafx.beans.property.adapter.JavaBeanObjectProperty
      javafx.beans.property.adapter.JavaBeanStringProperty
      javafx.beans.property.adapter.ReadOnlyJavaBeanBooleanProperty
      javafx.beans.property.adapter.ReadOnlyJavaBeanDoubleProperty
      javafx.beans.property.adapter.ReadOnlyJavaBeanFloatProperty
      javafx.beans.property.adapter.ReadOnlyJavaBeanIntegerProperty
      javafx.beans.property.adapter.ReadOnlyJavaBeanLongProperty
      javafx.beans.property.adapter.ReadOnlyJavaBeanObjectProperty
      javafx.beans.property.adapter.ReadOnlyJavaBeanStringProperty
      javafx.geometry.BoundingBox
      javafx.geometry.Dimension2D
      javafx.geometry.Insets
      javafx.geometry.Point2D
      javafx.geometry.Point3D
      javafx.geometry.Rectangle2D
      javafx.scene.SubScene
      javafx.scene.chart.AreaChart
      javafx.scene.chart.BarChart
      javafx.scene.chart.BubbleChart
      javafx.scene.chart.LineChart
      javafx.scene.chart.ScatterChart
      javafx.scene.chart.StackedAreaChart
      javafx.scene.chart.StackedBarChart
      javafx.scene.control.RadioMenuItem
      javafx.scene.control.ResizeFeaturesBase
      javafx.scene.control.cell.PropertyValueFactory
      javafx.scene.control.cell.TreeItemPropertyValueFactory
      javafx.scene.input.InputMethodTextRun
      javafx.scene.input.Mnemonic
      javafx.scene.input.TouchPoint
      javafx.scene.layout.Background
      javafx.scene.layout.BackgroundFill
      javafx.scene.layout.BackgroundImage
      javafx.scene.layout.BackgroundPosition
      javafx.scene.layout.BackgroundSize
      javafx.scene.layout.Border
      javafx.scene.layout.BorderImage
      javafx.scene.layout.BorderStroke
      javafx.scene.layout.BorderStrokeStyle
      javafx.scene.layout.BorderWidths
      javafx.scene.media.AudioClip
      javafx.scene.media.Media
      javafx.scene.media.MediaPlayer
      javafx.scene.paint.Stop
      javafx.scene.web.PromptData

      Following list of classes shows classes that is not possible to create even now when Builders are still part of JavaFX API:

      javafx.animation.KeyFrame
      javafx.animation.KeyValue
      javafx.application.HostServices
      javafx.application.Platform
      javafx.beans.WeakInvalidationListener
      javafx.beans.binding.Bindings
      javafx.beans.binding.When
      javafx.beans.value.WeakChangeListener
      javafx.collections.FXCollections
      javafx.collections.WeakListChangeListener
      javafx.collections.WeakMapChangeListener
      javafx.collections.WeakSetChangeListener
      javafx.concurrent.EventHelper
      javafx.css.ParsedValue
      javafx.css.SimpleStyleableBooleanProperty
      javafx.css.SimpleStyleableDoubleProperty
      javafx.css.SimpleStyleableFloatProperty
      javafx.css.SimpleStyleableIntegerProperty
      javafx.css.SimpleStyleableLongProperty
      javafx.css.SimpleStyleableObjectProperty
      javafx.css.SimpleStyleableStringProperty
      javafx.embed.swing.DataFlavorUtils
      javafx.embed.swing.SwingCursors
      javafx.embed.swing.SwingDnD
      javafx.embed.swing.SwingDragSource
      javafx.embed.swing.SwingEvents
      javafx.embed.swing.SwingFXUtils
      javafx.embed.swt.SWTCursors
      javafx.embed.swt.SWTEvents
      javafx.embed.swt.SWTFXUtils
      javafx.event.WeakEventHandler
      javafx.fxml.ParseTraceElement
      javafx.print.JobSettings
      javafx.print.PageLayout
      javafx.print.PageRange
      javafx.print.Paper
      javafx.print.PaperSource
      javafx.print.PrintResolution
      javafx.print.Printer
      javafx.print.PrinterAttributes
      javafx.print.PrinterJob
      javafx.scene.CssStyleHelper
      javafx.scene.PropertyHelper
      javafx.scene.SnapshotResult
      javafx.scene.canvas.GraphicsContext
      javafx.scene.control.ControlUtils
      javafx.scene.control.TablePosition
      javafx.scene.control.TableUtil
      javafx.scene.control.TreeTablePosition
      javafx.scene.control.TreeUtil
      javafx.scene.control.cell.CellUtils
      javafx.scene.control.cell.MapValueFactory
      javafx.scene.image.WritableImage
      javafx.scene.input.Clipboard
      javafx.scene.input.DataFormat
      javafx.scene.input.Dragboard
      javafx.scene.input.PickResult
      javafx.scene.layout.CornerRadii
      javafx.scene.media.AudioEqualizer
      javafx.scene.media.AudioTrack
      javafx.scene.media.MediaPlayerShutdownHook
      javafx.scene.media.SubtitleTrack
      javafx.scene.media.VideoTrack
      javafx.scene.shape.PredefinedMeshManager
      javafx.scene.web.PopupFeatures
      javafx.scene.web.WebHistory
      javafx.stage.Screen
      javafx.stage.Window
      javafx.util.Pair
      javafx.util.converter.FormatStringConverter


      Special case are classes Scene, Font and Image that have own Builders implemented in FXML due to implementation details.

            ekrejcir Eva Krejčířová (Inactive)
            mkubec Milan Kubec
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: