Below is the code from SimpleSingleCustomizerSample.java that creates and configures the JCustomizer and the JCustomizerPane.
Try this:
- using Java Web Start.
- Select the JCustomizer by clicking it. Then the handles appear. You can move and resize the component with the mouse. When you release the JCustomizer it snaps to the grid. If you resize the frame the grid adjusts to its size.
AbstractTextCustomizer
is a base class to write customizers for components, which can display
texts, with inline-editing support. The framework provides 3 implementations:
Below is the code from TextCustomizersSample.java that creates and configures the text customizers.
Try this:
- using Java Web Start.
- Double-click a text editor to edit its text and resize the JHtmlCustomizer to see how the text wraps automatically!
Implementing your own text customizer can be quite easy. Have a look at the source code of JLabelCustomizer for an example. (The source code gets shipped with the library or can be retrieved from the Subversion repository of the SoftSmithy project).