Difference: DpHipeTools (11 vs. 12)

Revision 122008-02-15 - NicolaDeCandussio

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Adding Tools to HIPE

Line: 108 to 108
  Modifier.
Changed:
<
<
One of the Modifier in the input area for the crop task:
>
>
The first Modifier of the input area for the crop task:
  crop_modifier.jpg

Currently the system contains basic implementation for the simple types Integer, Float, Long, Double so there's still a lot of space for improvements and contribution.

Changed:
<
<
If your Task Parameter doesn't follow into the mentioned types you need to:
>
>
If your Task Parameter isn't one of the mentioned types you need to:
 
  • Implement a Modifier
  • Register it to the system.

Implement a Modifier

Changed:
<
<
The modifier interface consists of two explicit contracts
>
>
The Modifier interface consists of two explicit contracts
 
  • Support the drag and drop features (the set/getVariableSelection)
  • Support the inspection for Object (the set/getObject)
and two implicit contracts inherited by the ExtensionRegistry
Line: 155 to 155
 

Signature Components

Deleted:
<
<
 
Changed:
<
<
>
>
In case the default input area based on Modifiers doesn't fit your needs you can just replace it by your own implementation.
  Rotate Alternative Signature:
rotate.jpg
Changed:
<
<
For that you can implement a herschel.ia.task.gui.dialog.SignatureComponent and register it as follows (again in the __init__.py):
>
>
If this is the case you need to:
  • Implement a Task Signature Component
  • Register it to the system.

Implement a Task Signature Component

The TaskSignatureComponent interface consists of four explicit contracts
  • Support the setVariableSelection for initial assignment from the Tool Window
  • Assign the Signature to display ( the setSignature)
  • Return a map of parameters and assigned values ( the getParameters note return value ca be simplified to Map<TaskParameter, VariableSelection> )
  • Clear and check user inputs (used by the default buttons)
and the two implicit contracts inherited by the ExtensionRegistry
  • Be JComponent
  • Have an empty constructor

Register a Task Signature Component

The registration of the Task Signature Component is done again in the __init__.py via theExtensionRegistry with the usual syntax (please note the name of the factory: factory.editor.tool.task.signature).

 
    REGISTRY.register(COMPONENT,Extension(

Changed:
<
<
id, # string implSignatureComponent, # string "factory.editor.tool.task", implTask)); # string
>
>
"Rotate Signature", "herschel.ia.task.example.RotateSignatureComponent", "factory.editor.tool.task.signature", "herschel.ia.image.Rotate"))
  , where:
  • id is a unique identifier
  • implSignatureComponent - implementation of SignatureComponent interface
  • implTask - implementation of your task for which this input dialog applies
Changed:
<
<
An example (which you can find in the prototype):
>
>
See also the Extension Registry documentation for more details.

Task Dialogs

Eventually, if the above options still do not accomodate you needs you can replace the the default Task Panel with your own implemetation

If this is the case you need to:

  • Implement a Task Panel
  • Register it to the system.

Implement a Task Panel

The TaskPanel interface consists of three explicit contracts
  • Support the setVariableSelection for initial assignment from the Tool Window
  • Assign the Task to display ( the setTask)
  • Set the SiteEvent handler for notifying request of execution (the setSiteEventHandler)
and the two implicit contracts inherited by the ExtensionRegistry
  • Be JComponent
  • Have an empty constructor

Register a Task Panel

The registration of the Task Panel Component is done again in the __init__.py via theExtensionRegistry with the usual syntax (please note the name of the factory: factory.editor.tool.task.signature).

 
    REGISTRY.register(COMPONENT,Extension(

Changed:
<
<
"herschel.ia.gui.components.editor.tasks.RotateSignatureComponent", "herschel.ia.gui.components.editor.tasks.RotateSignatureComponent",
>
>
"Default Task Panel", "herschel.ia.task.gui.dialog.JTaskPanel",
  "factory.editor.tool.task",
Changed:
<
<
"herschel.ia.image.Rotate"));
>
>
"herschel.ia.task.Task"));
 
Added:
>
>
, where:
  • id is a unique identifier
  • implSignatureComponent - implementation of SignatureComponent interface
  • implTask - implementation of your task for which this input dialog applies
  See also the Extension Registry documentation for more details.
Deleted:
<
<
Note that your GUI component must have a default constructor!
 
Deleted:
<
<

Task Dialogs

The default dialog provided by the system is result of the composition of a main input area (TaskSignatureComponent) and a panel containing the buttons (JTaskButtonsPanel). The main panel is based
 

Task compliance

  • write user documentation (jtags)! That will be automatically picked up whenever a user asks the system for help on your task.
 
This site is powered by the TWiki collaboration platform Powered by Perl