close

Filter

loading table of contents...

Site Manager Developer Manual / Version 2204

Table Of Contents

5.1.1.4 Date Editors

The following editors are available for entering dates:

Class

Description

DatePickEditor

A graphical date selector.

JTextFieldDateEditor

Simple text field. This is the default editor. Using the attribute format, the date format can be defined. The default is 'dd.MM.yyyy HH:mm'.

ComboBoxDateEditor

This editor is used to configure predefined dates which can be chosen from a combo box. If this class is used, the attribute fixedChoice can be added to 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. Two different sub elements of <Property> can be chosen:

  • <HistoryItem>

The attribute value can be used to define a specific date. The date format of these entries can be configured with the attribute format of the element <Property>, with default 'dd.MM.yyyy HH:mm'. All letters defined in the class java.text.SimpleDateFormat can be used to define the format.

Example:

<Property name="Date" editorClass="ComboBoxDateEditor" format="dd.MM.yyyy">

<HistoryItem value="01.01.2001"/>

</Property>

Thus, "01.01.2001" is shown in the selection list of the combo box.

  • <FunctionItem>

The attribute class can be used to define some variable dates which depends on the actual date. The attribute label (optional) defines the name of the function item. To do so, the following classes can be used:

  • NotApplicable: No date is shown.

  • Tomorrow: The date of tomorrow is chosen.

  • Today: The date of today is chosen.

  • NextWeek: The date of today in a week is chosen.

  • NextMonth: The date of today in a month is chosen.

  • NextYear: The date of today in a year is chosen.

  • EndOfMonth: The date of the end of this month is chosen.

  • EndOfYear: The date of the end of this year is chosen.

The whole qualified name of the class must be used (see example below). Own classes can be written, which must implement the interface hox.gui.editor.combobox.FunctionItem.

Example:

<Property name="Date" editorClass="ComboBoxDateEditor" format="dd.MM.yyyy">

<FunctionItem class="hox.corem.editor.toolkit.property.items.Tomorrow"/>

</Property>

Thus, "Tomorrow" is shown in the combo box. If you choose this entry, the date of tomorrow is shown in the format defined in <Property>.

Table 5.4. Property editors for dates


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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