-
Enhancement
-
Resolution: Fixed
-
P3
-
fx2.0
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
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
- relates to
-
JDK-8100752 Suboptimal method names in Text class
- Closed