Changes between Version 4 and Version 5 of Paose/Documentation/Howto-Renew


Ignore:
Timestamp:
Jun 7, 2013, 2:25:18 PM (12 years ago)
Author:
Lawrence Cabac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Paose/Documentation/Howto-Renew

    v4 v5  
     1[[PageOutline]]
     2
    13= Compiling Renew Source =
    24''(for version 2.4)''
     
    2426The script, which requires ''wget'' to be installed, has been tested on Linux and OS X. It should work without problem on win/cygwin (http://www.cygwin.com).
    2527
     28= Netcomponents =
     29
     30== Creating a New Netcomponent Repository ==
     31
     32Netcomponent Repositories can be integrated in two different ways: in a simple way and in an elaborated way as plugin for Renew.
     33
     34=== Simple NC Repository ===
     35
     36see also Chapter 2.7.6 of the [http://www.informatik.uni-hamburg.de/TGI/renew/userguide/node49.html Renew User Guide]
     37
     38A folder that contains at least one Renew net drawing (''.rnw'' file), a file called ''.sequence'' and subfolder called ''images'', which again contains at least one image called ''generic.gif'', suffices as a NC Repository. It can be directly used in Renew by using the command ''Tools > Netcomponents > select from directory''. A NC repository will be available as a tool palette in Renew. By using the available tools from the palette the net associated with the tool will be included in your drawing.
     39
     40==== Exmple Folder Structure ====
     41
     42Here is a minimalistic folder structure for an NC repository.
     43
     44{{{
     45 tools/
     46 ├── .sequence
     47 ├── example-nc.rnw
     48 └── images
     49     └── generic.gif
     50}}}
     51
     52==== Details ====
     53
     54* In order to fit nicely into the GUI all images should be of the size 24x24 in pixels.
     55* The net component ''example-nc'' (defined by the net drawing ''example-nc.rnw'') will appear in the tool tip as ''NC example-nc''.
     56* If an image in images with the name ''example-nc.gif'' exists the image will be used in as tool button icon or generic.gif instead.
     57* The file ''.sequence'' allows to sort the tool buttons in a predefined order. Add the names of the drawing (without ''.rnw'') to the file, only one name per line. All non-mentioned NCs will be added to the end of the palette.
     58* The NC will be added to the drawing at the location of the mouse click, i.e. coordinates x=0, y=o (upper left corner) of the NC will be on mouse position. You might have to adjust the location of the figures in the NC drawing to achieve a comfortable behavior.
     59
     60=== NC Plugin ===
     61
     62In order to create a plugin that provides a NC repository you have to provide a repository directory - in the fashion described above - and a plugin configuration file (''plugin.cfg'').
     63
     64There are several nice and interesting things about repository plugins:
     65
     66* Since they do not need any Java code, they can be built without any compilation.
     67* Just drop a folder containing the ''plugin.cfg'' and a tools directory into the ''plugins'' folder of Renew
     68* It will be loaded on the next start or on the fly with the command ''load'' (e.g. ''load *'').
     69* Components in the ''tools'' directory can be adjusted on the fly; just unload the palette and reload the modified version.
     70
     71==== Example plugin.cfg ====
     72{{{
     73mainClass = de.renew.netcomponents.PalettePlugin
     74name = Example Components
     75provides = de.renew.custom.example-components
     76requires = de.renew.util,de.renew.simulator,ch.ifa.draw,de.renew.formalism,de.renew.misc,de.renew.gui,de.renew.nc
     77de.renew.nc.dir-prop-name=de.renew.custom.example-components.dir
     78de.renew.nc.init-prop-name=de.renew.custom.example-components.init
     79de.renew.custom.example-components.dir = tools
     80de.renew.custom.example-components.init = false
     81version = 0.1
     82versionDate = 7 June 2013
     83versionText = An example repository
     84}}}
     85
     86==== Exmple Folder Structure ====
     87
     88{{{
     89example-plugin
     90├── plugin.cfg
     91└── tools
     92    ├── .sequence
     93    ├── example-nc.rnw
     94    └── images
     95        ├── example-nc.gif
     96        └── generic.gif
     97}}}
     98
     99