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

Text.setContent method does not follow common JavaFX naming pattern

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: