Using the Symbol Editor > Using More Features of the Symbol Editor > Working with Interactors > Creating a Rotation Interactor

A rotation interactor is used to revolve a symbol object when the mouse hovers over an object in a symbol. The rotation interactor changes the value of the parameter to which it is bound. This change in parameter value is used to make a rotation transformation on the object bound to the parameter. For example, if you rotate the mouse over a dial symbol, the dial knob rotates with the mouse.

To add a rotation interactor to a symbol, do the following:

  1. In the Symbol Editor, create a new symbol. For more information, see Making a New Symbol.
  2. Import the nobvista.svg image from the <installdir>/jviews-diagrammer81/bin/symboleditor/data/examples directory. The SVG image creates an SVG object. For more information, see Importing a Vector Graphic.
  3. Delete the Text and Shape objects. SVG is now the base object.
  4. Ungroup the SVG object.
  5. Create a float parameter rotation. For more information, see Creating a New Parameter.
  6. Select the GeneralPath5 dial knob object.

images/diasym_svggeneralpath5.png

Figure 2.13 The GeneralPath5 object
  1. In the Transform tab of the Styling Customizer, bind the Angle field to rotation. For more information, see Transforming an Object.
  2. Select Center Relative to Base in the Transform tab.
  3. Select the SVG object.
  4. Select the Interactor tab.
  5. Set the following values:
  6. Test this symbol by clicking the Preview button.

images/diasym_interactornob.png

Figure 2.14 A Rotation Interactor

When you test this symbol, click on the symbol and drag the mouse in circles. The dial now follows the movement of the mouse.

Note
Objects with an associated interactor are indicated with a star images/diasym_interatorindiate.png in the Symbol Outline pane.