TIP JHotDrawPlugin is not installed on Foswiki.org.

JHotDrawPlugin

screenshot.png

This plugin encapsulates the JHot Draw Java Applet.

JHot Draw is a simple drawing editor that supports diagramming in a style similar to that found in MS Powerpoint and MS Word. Various shaped figures can be placed in the drawing and text annotations joined to them.

A drawing can also have a "map" which makes figures in the drawing sensitive to the mouse cursor. A map is automatically added to an image when a URL is attached to any of the figures.

How you edit a drawing depends on whether the drawing has a map and the setting of the "EDIT_BUTTON" option. A drawing with no map can be edited simply by clicking on the drawing. A drawing with a map can be edited by clicking the edit button or, failing that, on the boundary of the image.

Browser support for Java 1.1 or later is required.

Syntax

  • Write the macro %DRAWING{name}% anywhere in a Foswiki topic. You can name the drawing anything you like, subject to the usual rules for naming attachments.

Tools

The tools on the left create or manipulate figures.
Selection selects, moves or resizes a figure; the shift-key toggles the selection. Dragging the selection tool in the background selects the figures within the dragged rectangle.
Text creates a new or edits an existing text figure
Connected Text creates a new text figure and attaches it to the clicked figure. Once a text figure is attached it remains connected to the figure.
Rectangle creates a rectangle figure
Round Rectangle creates a round rectangle figure
Ellipse creates an ellipse figure
Line creates a line figure
Connection Line creates or adjusts connections between figures. A connection is split into segments by dragging a point on the connection. To join two segments click the end point of a segment
Elbow Connection Line creates an elbow connection and offers the same features as the ordinary connection tool
Scribble creates a scribble figure; dragging the mouse creates a smooth line while successive clicks yields a polyline figure. A two-button click terminates the figure.
Polygon creates a polygon figure; dragging the mouse creates a smooth border while successive clicks yields a polyline border. A two-button click or the ESCAPE key terminates the figure.
Border decorates the clicked figure with a border
URL adds a sensitive area to the figure that will redirect to a URL. If an image contains any sensitive areas it can only be selected for edit by clicking on the boundary or (if enabled) the attached Edit button. You can use wikiwords and web.topic wiki link expressions as well as full URLs.

Handles

When selected, figures provide different handles to manipulate them.
  • the white squares let you to manipulate the shape of a figure
  • the green squares on connections let you to reconnect them with another figure.
  • the yellow circles on polygon figures let you change the size and rotation of the figure
  • yellow circles on rounded rectangles let you change the radius of the corners
  • the yellow circles on connections let you manipulate the position of connection segments.

Commands

Commands are invoked from the button bar at the bottom or from the menu bar at the top.

The standard commands that are provided include cut, copy, paste, duplicate, delete, group, ungroup, bring to front, and send to back.

Attributes

Attributes, such as fill color, text color or arrow tip, can be changed through the attributes menus.

JHotDrawPlugin Settings

Extra colors to be added to the menu of colors in the applet, as a comma-separated list with colors in HTML format (see StandardColors)
  • Set EXTRA_COLORS = Aquamarine=#70DB93,New Tan=#EBC79E,Sea Green=#238E68,Motorola Blue=#3ff
Set to 1 if an "Edit" button is to be generated attached to the image. You will still be able to edit it by clicking on the boundary of the image.
  • Set EDIT_BUTTON = 1
Edit text defined here so you can change it for local languages. Text is shown when you hover over the image, and for the edit button. %F% will be replaced by the drawing name.
  • Set EDIT_TEXT = Edit drawing '%F%' (requires a Java 1.1 enabled browser)

Plugin Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

  • To test if the plugin is correctly installed, view this topic in the installation and you should see a placeholder box below.
    %DRAWING{empty}%
  • Here's an example using an image map. Move the mouse over the image and watch the status bar. %DRAWING{example}%

  • If you add a map to a drawing by setting a URL on any of the figures a map file is created. If you subsequently remove all the URLs from figures in the drawing the map still exists, but is now empty. There is no way to remove the map other than by manually moving the attachment.

  • ALERT! Upgrading from older versions of the plugin requires that you manually delete the file templates/jhotdraw.pattern.tmpl. Otherwise the plugin fails on any attempt to edit a drawing

Plugin Info

Change History:  
11 Aug 2015 Foswikitask:Item13613: JHotDrawPlugin is required to enable GET and strikeone to work with Foswiki 2.0 and newer.
Foswikitask:Item13614: JHotDrawPlugin should hide the created attachments
Foswikitask:Item10963: Put parentheses around qw() as it throws a warning on Perl 5.14
29 Oct 2010 Foswikitask:Item2614: Fix so the plugin will work with all setting of validation methis, strikeone, embedded, and none.
Foswikitask:Item9917: Fix so plugin can save and exit in Foswiki 1.1.X. This also adds a dependency of JQueryPlugin and ZonePlugin for the plugin to be used in old 1.0 installations only.
Foswikitask:Item8387: Plugin now works in other skins than Pattern and Nat.
Foswikitask:Item8558: Added all the graphic files used on plugin topic as attachments in meta. Replaced some small icons by the best version
13 Jan 2010 Foswikitask:Item2624: Help Foswiki:Extensions.JHotDrawPlugin work correctly under Foswiki:Extensions.NatSkin
11 Jan 2010 Foswikitask:Item2620 and Foswikitask:Item2614. Documented that upgraders must delete any old templates/jhotdraw.pattern.tmpl file. Documented that because of a bug the plugin only works with 1.0.7 or later and with {Validation}{Method} = 'strikeone'. Provided links to older versions for those not yet at Foswiki 1.0.7.
13 Oct 2009 Foswikitask:Item2160: compatibility with 1.0.7, plus UI and upload performance improvements
16 Jun 2009 Foswikitask:Item8079: handling of drawing names with spaces and other converted characters corrected
05 Feb 2009 Foswikitask:Item997: must be able to show edit link correctly on imported TWiki drawings. Foswikitask:Item997: fixed problem with links in maps when the link had no trailing anchor introduced in previous version. The fix also enables using macros in links.
31 Jan 2009 Foswikitask:Item415: must check user is authenticated as well as checking change access
9 Dec 2008 Foswikitask:Item3345: Foswikitask:Item4823: improved the upload safety Foswikitask:Item364: rebranded Foswikitask:Item5527: support hierarchical webs in map
8570 TWikibug:Item1528 - Minor pattern skin template update for TWikiDrawPlugin
8569 TWikibug:Item1528 - Adding pattern skin template to TWikiDrawPlugin
7926 TWikibug:Item1206 - minor formatting fix
7907 TWikibug:Item1206 - merged minor documentation fixes that were causing confusion about latest version of the plugin.
7761 TWikibug:Item1124 - checked in jar file, even though it is built, because most people don't have ANT and it's a source of error for people using SVN checkouts.
6340 TWikibug:Item196 - added screenshot to TWikiDrawPlugin
5245 Added anchor support to wikilinks
5243 Added support for web.topic wiki links, and remove url encoding, which was breaking
5223 Documentation fixes, adding gifs.
5057 Minor changes for prettification, and added ,v files
5053 Validated XHTML
5051 Updated template for Cairo
5049 Updates for 2004 Cairo release
5048 Cairo readiness
4878 Various minor fixes, and added stand-alone (first) version
4788 Added "overwrite" to installation copy
4781 Moved topic to TWiki web, incorporated changes from Dev topic
4777 Initial revision
11 Mar 2005 Fixes for: text not sticking to boxes, blank lines in text, and lost text styles
22 Nov 2004 Unicode fixes courtesy of Won-kyu Park
16 Aug 2004 Map support finally released
17 Feb 2003 Bug fixes; incoporated TWiki:Main/BertrandDelacretaz's fix for too many colours in GIF. He had problems when saving images from macosx / JDK 1.3.1 and modified the applet to reduce the number of colors before converting to GIF, if needed. Without this he would sometimes get the "too many colors for a GIF" error when saving drawings.
30 Sep 2002 Add support for URLs, EXTRA_COLORS, fixed a number of outstanding bugs
20 Feb 2002 Merged TWiki:Main/RobWalker's fixes for text attached to figures
01 Oct 2001 Updated this text
23 Sep 2001 Initial version
2000 Peter Thoeny created TWikiDraw based on JHotDraw (TWikiDraw applet that allows you to save a drawing as a .draw and a .gif file. New %DRAWING% variable to insert a drawing into any TWiki topic. New oopstwikidraw.tmpl template that contains the TWikiDraw applet.
Dependencies: Java enabled browser
NameVersionDescription
Foswiki::Plugins::ZonePlugin>=1.0Required
Support: http://foswiki.org/Support/JHotDrawPlugin

  • JHotDraw is Copyright 1996, 1997 by IFA Informatik and Erich Gamma, erich_gamma@acm.org . It is hereby granted that this software can be used, copied, modified, and distributed without fee provided that this copyright notice appears in all copies.
  • JHotDrawPlugin uses ACME Labs' GifEncoder to convert a drawing into a GIF file format. (GifEncoder is Copyright ©1996,1998 by Jef Poskanzer, jef@acme.com . All rights reserved. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. )
  • JHotDrawPlugin uses some ideas of KmWiki drawing applet.
  • Copyright 2000 by Peter Thoeny, Peter@Thoeny.com. It is hereby granted that this software can be used, copied, modified, and distributed without fee provided that this copyright notice appears in all copies.
  • Copyright © 2001 Motorola. All Rights Reserved.
  • Copyright © 2003-2008 Crawford Currie http://www.c-dot.co.uk
  • Foswiki version: © 2008-2010 Foswiki Contributors

PackageForm edit

Author Foswiki::Main.CrawfordCurrie, http://www.c-dot.co.uk, based on Peter Thoeny's 2001 original (thanks Peter!)
Version 2.0
Release 11 Aug 2015
Copyright Foswiki Contributors, All Rights Reserved
License GPL (GNU General Public License)
Home http://foswiki.org/Extensions/JHotDrawPlugin
Support http://foswiki.org/Support/JHotDrawPlugin
Repository https://github.com/foswiki/JHotDrawPlugin
ExtensionClassification Interface and Visualisation, User interactivity
ExtensionType PluginPackage
Compatibility
ImageUrl screenshot.png
DemoUrl http://
SupportUrl JHotDrawPlugin
ModificationPolicy PleaseFeelFreeToModify
I Attachment Action Size Date Who Comment
JHotDrawPlugin.md5md5 JHotDrawPlugin.md5 manage 165 bytes 11 Aug 2015 - 15:52 KennethLavrsen  
JHotDrawPlugin.sha1sha1 JHotDrawPlugin.sha1 manage 189 bytes 11 Aug 2015 - 15:52 KennethLavrsen  
JHotDrawPlugin.tgztgz JHotDrawPlugin.tgz manage 409 K 11 Aug 2015 - 15:52 KennethLavrsen  
JHotDrawPlugin.zipzip JHotDrawPlugin.zip manage 443 K 11 Aug 2015 - 15:51 KennethLavrsen  
JHotDrawPlugin_installerEXT JHotDrawPlugin_installer manage 9 K 11 Aug 2015 - 15:52 KennethLavrsen  
Topic revision: r21 - 11 Aug 2015, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy