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

Text.setContent method does not follow common JavaFX naming pattern

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • fx2.0
    • fx2.0
    • javafx

      In the early access release the Text class contains a method which is named in an inconsistent non-intuitive fashion. Today we have

      Tab.setText
      TextArea.setText
      TableColumn.setText

      Which are all for setting the text displayed by the instance of the class. However, the API also includes the following method name

      Text.setContent

      Since Text.setContent does exactly what all the other setText methods do, I suggest changing the name to

      Text.setText

      This has the additional benefit of aligning the Text class method names as follows

      Text.setText
      Text.setTextAlignment
      Text.setTextOrigin

      which is much easier to remember than

      Text.setContent
      Text.setTextAlignment
      Text.setTextOrigin

            thor Thor Johannesson (Inactive)
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: