Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
<-- ANALYTICS CODE - DO NOT EDIT --> <-- Google Analytics script BEGIN --> <-- Google Analytics script END --> | ||||||||
Line: 222 to 222 | ||||||||
If no specific modifier fits your task parameter, the default modifier will be used. The default modifier only has a dot to drop variables. Others modifiers include an editor at the right of the dot to enter values. You can implement a custom Modifier and register it in the system to be used whenever a parameter of the registered type is used. You can also write your specific Modifier for any of the already registered types. In that case, you can create and assign your modifier (and listeners ....) to your parameter in Task.getCustomModifiers() see Registering a modifier.
![]() | ||||||||
Deleted: | ||||||||
< < |
![]() | |||||||
The following behaviours and limitations are present in the provided modifiers:
| ||||||||
Changed: | ||||||||
< < | * Also, if you want to tweak a (registered) modifier (using a specific constructor, for example) you will also have to use Task.getCustomModifiers() | |||||||
> > |
| |||||||
| ||||||||
Line: 344 to 342 | ||||||||
Signature components | ||||||||
Deleted: | ||||||||
< < | TODO: REVIEW | |||||||
In case the default input area based on modifiers does not fit your needs, you can replace it by your own implementation, and register it so that the system opens the task dialog with your custom | ||||||||
Line: 353 to 350 | ||||||||
You can create a | ||||||||
Added: | ||||||||
> > | Also if you want to also do your own layout you can extend ==AdbtractTaskSignatureComponent. | |||||||
The JTaskSignatureComponent class implements the TaskSignatureComponent interface, which consists of four explicit contracts:
| ||||||||
Line: 364 to 362 | ||||||||
| ||||||||
Added: | ||||||||
> > | And, as a signature component acts as a container of modifiers, if you directly implement TaskSignatureComponent , you must also implement Disposable (to clean the modifiers when your task GUI is closed):
| |||||||
Conventions for labels for input parameters: to construct the labels of your parameters you can use the static function of class JTaskSignatureComponent public static JLabel getDecoratedLabel(TaskParameter tp, boolean isPrimeInput, String altName)it provides a decorated label (including tooltip) that follows the standard style. For the function to work properly your task parameters should be fully configured (for example, the parameter description will be the tooltip of the label) if present. For example, if you want to use a custom Signature Component that just wants to use JFilePathModifier for a parameter aimed for a file name, you could do it like this: | ||||||||
Line: 456 to 457 | ||||||||
and the two implicit contracts inherited by the Extension Registry
| ||||||||
Added: | ||||||||
> > | And, as a Task Panel acts as a container of modifiers (via a TaskSignatureComponent ), if you directly implement , you must also implement Disposable (to clean up the signature when your task GUI is closed and to clean the viewer you are shown in):
@Override public void dispose() { if (_component instanceof Disposable) { //_ component is a TaskSignatureComponent ((Disposable) _component).dispose(); } } | |||||||