Changing component properties
You can change properties for a component by using the Properties view.
The entries in the Properties view show the properties available on the selected component, which are determined by introspection of the class. By default, the properties shown in this view are those that have both a get and a set method, meaning that they can be read and written.
To view and change the properties for a component:
- Open a Java class in the visual editor.
- In the Design view or Java Beans view, select the component whose properties you want to view or change.
Tip: Here are some tips for working with the Properties view:
- A plus sign (+) next to a property name indicates that property itself has other properties. Click the plus sign to expand the view and see all the bean properties. A keyboard shortcut for clicking the plus sign is the right arrow key.
- A right angle bracket (>) next to a property name indicates that the property is explicitly set in code, not returned from the live bean. If you select the property that is flagged with the > symbol, the line of Java code that sets the value is highlighted in the Source view. To toggle the > symbol on or off, select Show set values from the Properties view menu.
- To distinguish null values from empty values, select Show null values from the Properties view menu. The characters <null> will then display in the Value column when the result of calling the property's get method on the Java bean returns null.
- To show more advanced properties, click the Properties menu button and select Show Advanced Properties from the Properties view menu.
- To show properties that are read only (only have a get method), select Show read only properties from the Properties view menu.
- Select the property that you want to update, and update the Value column with the new property value.
- To set a value to be explicitly null, click the Set the Active Property Being Edited to Null button on the Properties view toolbar. The set method will be called with a null argument.
- To restore a property to its default value, click the Restore Default Value button on the Properties view toolbar. When a value is restored to its default value the statement that sends the set method is deleted from the source, and the set method is explicitly called with the original default value, to restore the component to its default state. The original value is also sent to the component if you delete the set method in the Source view.
- Some properties, such as color, have their own custom property editors that open when you click the ellipse button in the value column. If the property editor does not open in front of the main workbench window, select the property editor on the task bar and restore it.
Directly editing items in the Design view
Some text properties can be directly edited on the Design view of the visual editor.
Parent topic
Developing Java classes with the visual editor
Related concepts
The visual editor Properties view
Related tasks
Adding a component to a class
Deleting components from a class
Reordering components in a class
Resizing visual components