|
|
Contents |
Property EditorsProperty editors are used in the Properties view to edit property values.
You can either edit a value
directly in
the property table or use a custom property editor by clicking on the
ellipsis
button ( The type of the editor depends
on the data type of the property.
JFormDesigner has built-in
property editors for all standard
data types. Custom JavaBeans can provide their own property editors.
Take a look at the API documentation of Built-in property editorsJFormDesigner has built-in property editors for following data types:
ActionMap (javax.swing)This (read-only) custom editor allows you to see the actions registered for a component in its action map. The information in the column "Key Stroke" comes from the input map of the component and shows which key strokes are assigned to actions. The JComponent property "actionMap" is read-only. Select the Show read-only Properties button in the Properties view toolbar to make it visible.
Border (javax.swing)You can either select a border from the combo box in the properties table or use the custom editor.
In the custom editor you can edit all border properties. Use the combo box at the top of the dialog to choose a border type. In the mid area of the dialog you can edit the border properties. This area is different for each border type. At the bottom, you can see a preview of the border. Following border types are
supported:
Color (java.awt)In the properties table, you can either enter RGB values, color names, system color names or Swing UIManager color names. When using a RGB value, you can also specify the alpha value by adding a fourth number.
The custom editor supports various ways to specify a color. Besides RGB, you can select a color from the AWT, System or Swing palettes.
ComboBoxModel (javax.swing)This custom editor allows you to specify string values for a combo box.
Cursor (java.awt)This editor allows you to choose a predefined cursor.
Dimension (java.awt)Either edit the dimension in the property table or use the custom editor.
Font (java.awt)You can either use absolute fonts, derived fonts or predefined fonts of the look and feel. Derived fonts are recommended if you just need a bold/italic or a larger/smaller font (e.g. for titles), because derived fonts are computed based on the current look and feel. If your application runs on several look and feels (e.g. several operating systems), derived fonts ensure that the font family stays consistent. In the properties table, you can quickly change the style (bold and italic) and the size of the font.
In the custom editor you can choose one of the tabs to specify either absolute fonts, derived fonts or predefined fonts.
Icon (javax.swing) and Image (java.awt)This custom editor allows you to choose an icon. Either use an icon from the classpath, from the file system or from the Swing UIManager (look and feel). It is recommended to use the classpath and embed your icons into your application JAR.
InputMap (javax.swing)This (read-only) custom editor allows you to see the key strokes registered for a component in its input map. The information in the column "Action" comes from the action map of the component and shows which action classes are assigned to key strokes. The JComponent property "inputMap" is read-only. Select the Show read-only Properties button in the Properties view toolbar to make it visible.
Insets (java.awt)Either edit the insets in the property table or use the custom editor.
KeyStroke (javax.swing)In the properties table, you can enter a string representation of the keystroke. E.g. "Ctrl+C" or "Ctrl+Shift+S". The custom editor supports two ways to specify a keystroke. Either type any key stroke combination if the focus is in the first field or use the controls below. The KeyStroke editor supports menu shortcut modifier key (Command key on Mac OS X, Ctrl key otherwise).
ListModel (javax.swing)This custom editor allows you to specify string values for a list.
Object (java.lang)This editor allows you to reference any (non-visual)
JavaBean as a property value. Often used for
Paint (java.awt)This editor allows you to specify a Following paint types are supported:
Point (java.awt)Either edit the point in the property table or use the custom editor.
Rectangle (java.awt)Either edit the rectangle in the property table or use the custom editor.
SpinnerModel (javax.swing)
This custom editor allows you to specify a spinner model (used by
String (java.lang)Either edit the string in the property table or use the custom editor. Switch the "allow new-line" check box on, if you want enter new lines.
TableModel (javax.swing)This custom editor allows you to specify values for a table.
TreeModel (javax.swing)This custom editor allows you to specify string values for a tree.
|