close

Filter

loading table of contents...

Site Manager Developer Manual / Version 2210

Table Of Contents

5.1.1.2 String Editors

The following property editors are available for string fields:

Class Description
JTextFieldStringEditor

Simple text field. This is the default editor.

The JTextFieldStringEditor can be configured with the following attributes:

  • fontName="Name of the font"

  • This property is used for setting the font of the Text field in the Site Manager. It should be noted that the fonts depend on the particular configuration of the Java environment. If the font entered does not exist, all available fonts are shown in the log.

  • fontSize="Size of the font"

  • This parameter adjusts the font size of Text field in the Site Manager. The size can be set between 10 and 24. If there is no exactly matching character set for this font size, the font is scaled accordingly. This can cause an awkward appearance of the font.

  • spellCheckingEnabled="false"

  • This parameter disables spell checking for the Text field in the Site Manager. Spell checking is enabled by default.

ComboBoxStringEditor

A selection list. You can enable own entries in the combo box using the attribute fixedChoice with the <Property> element. "false" will allow you to type own entries in the combo box. "true" is default and will allow only the predefined items. You can limit the number of characters, which are allowed to be entered, by using the attribute columns.

Example:

<Property name="CopiesTo" editorClass="ComboBoxStringEditor" columns="15">

If you are using the columns attribute you have to take care for two things:

  1. Do not enter a <HistoryItem> or <FunctionItem> with a length longer than defined in columns.

  2. Be sure that no strings longer than defined in columns have been stored in the repository before. The best practice would be to configure a validator to guarantee correct server side storage.

You can disable spell checking using the attribute spellCheckingEnabled="false". Spell checking is enabled by default.

The selection options can be added with three different multiple child elements:

  • <HistoryItem value="abc"/>: Shows and uses exactly the values that are defined in the value attribute of this element.

  • <FunctionItem: You can use the attribute class to define the class which should be used when you select the entry. The attribute label (optional) defines the name of the function item which is shown in the combo box. Own classes must extend the abstract class hox.gui.editor.combobox.FunctionItem.

  • <LabeledItem value="60" label="One minute"/> Use the label attribute to define the text shown in the combo box. You will see the localized version of the value of the label attribute (localized via classes/hox/corem/editor/toolkit/property/property.properties). The value used is the one defined in the attribute value.

Examples:

<Property name="Name" editorClass="ComboBoxStringEditor">

<HistoryItem value="60"/>

</Property>

Will show 60 in the combo box and will write 60 into the property when you select it.

<Property name="Name" editorClass="ComboBoxStringEditor">

<FunctionItem class="myFunctionItems.MyStringClass" label="Select Me"/>

</Property>

Will show "Select Me" in the combo box and will write the result of the class MyStringClass into the property when you select the entry.

<Property name="Name" editorClass="ComboBoxStringEditor">

<LabeledItem value="60" label="One minute"/>

</Property>

Will show "One minute" in the combo box and will write 60 into the property when you select the entry.

JCheckBoxStringEditor A check box. If the box is chosen, "true" will be saved, otherwise "false".
JPasswordFieldStringEditor Text field which allows you to enter a password. Thus, the input characters will be displayed hidden.
JTextPaneStringEditor

Text field with more than one line. That is, if the length of your string exceeds the width of your string text field a new line will be started. Internally, this will not be stored as a line break. You can insert line breaks hitting the <Return> key. The length of the text is limited to the length defined in the document-type.xml file.

The JTextPaneStringEditor can be configured with the following attributes:

  • fontName="Name of the font"

  • This property is used for setting the font of the Text field in the Site Manager. It should be noted that the fonts depend on the particular configuration of the Java environment. If the font entered does not exist, all available fonts are shown in the log.

  • fontSize="Size of the font"

  • This parameter adjusts the font size of Text field in the Site Manager. The size can be set between 10 and 24. If there is no exactly matching character set for this font size, the font is scaled accordingly. This can cause an awkward appearance of the font.

  • spellCheckingEnabled="false"

  • This parameter disables spell checking for the Text field in the Site Manager. Spell checking is enabled by default.

Table 5.2. Property editors for strings


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.