Tags:
create new tag
, view all tags

TWiki Draw Plugin

This plugin encapsulates the TWikiDraw Java Applet first developed by TWiki:Main/PeterThoeny from the original JHotDraw.

JHotDraw is a simple drawing editor that supports drawing 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.

Unique to TWikiDrawPlugin, 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 required.

Syntax Rules

  • Write the command %DRAWING{name}% anywhere in a TWiki topic. You can name the drawing anything you like, allowed characters are A-Z a-z 0-9 _ - . . If you have only one drawing in the topic you can simply write %DRAWING% .

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 filled red handles enable you to manipulate the shape of a figure
  • the blue circle handle is a connection handle. It allows you to create connections between figures.
  • the framed red handles are null handles. They only show the selection status of a figure but don't support any manipulation.
  • the green handles are shown on connections. They enable you to reconnect them with another figure.
  • the yellow handle enables you to change the font size of a text figure or the size of the radius of a rounded rectangle.

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.

TWikiDrawPlugin Settings

  • Set SHORTDESCRIPTION = Drawing editor
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

  • Download the ZIP file from the Plugin web (see below). Contents:
    File: Description:
    data/TWiki/TWikiDrawPlugin.txt  
    lib/TWiki/Plugins/TWikiDrawPlugin.pm  
    lib/TWiki/Plugins/TWikiDrawPlugin/source.zip Zip of java sources
    pub/TWiki/TWikiDrawPlugin/ATEXT1.gif  
    pub/TWiki/TWikiDrawPlugin/ATEXT2.gif  
    pub/TWiki/TWikiDrawPlugin/ATEXT3.gif  
    pub/TWiki/TWikiDrawPlugin/BORDDEC1.gif  
    pub/TWiki/TWikiDrawPlugin/BORDDEC2.gif  
    pub/TWiki/TWikiDrawPlugin/BORDDEC3.gif  
    pub/TWiki/TWikiDrawPlugin/CONN1.gif  
    pub/TWiki/TWikiDrawPlugin/CONN2.gif  
    pub/TWiki/TWikiDrawPlugin/CONN3.gif  
    pub/TWiki/TWikiDrawPlugin/DIAMOND2.gif  
    pub/TWiki/TWikiDrawPlugin/DIAMOND3.gif  
    pub/TWiki/TWikiDrawPlugin/ELLIPSE1.gif  
    pub/TWiki/TWikiDrawPlugin/ELLIPSE2.gif  
    pub/TWiki/TWikiDrawPlugin/ELLIPSE3.gif  
    pub/TWiki/TWikiDrawPlugin/ERASER2.gif  
    pub/TWiki/TWikiDrawPlugin/ERASER3.gif  
    pub/TWiki/TWikiDrawPlugin/example.draw  
    pub/TWiki/TWikiDrawPlugin/example.map  
    pub/TWiki/TWikiDrawPlugin/example.gif  
    pub/TWiki/TWikiDrawPlugin/LINE1.gif  
    pub/TWiki/TWikiDrawPlugin/LINE2.gif  
    pub/TWiki/TWikiDrawPlugin/LINE3.gif  
    pub/TWiki/TWikiDrawPlugin/OCONN1.gif  
    pub/TWiki/TWikiDrawPlugin/OCONN2.gif  
    pub/TWiki/TWikiDrawPlugin/OCONN3.gif  
    pub/TWiki/TWikiDrawPlugin/PERT2.gif  
    pub/TWiki/TWikiDrawPlugin/PERT3.gif  
    pub/TWiki/TWikiDrawPlugin/POLYGON1.gif  
    pub/TWiki/TWikiDrawPlugin/POLYGON2.gif  
    pub/TWiki/TWikiDrawPlugin/POLYGON3.gif  
    pub/TWiki/TWikiDrawPlugin/RECT1.gif  
    pub/TWiki/TWikiDrawPlugin/RECT2.gif  
    pub/TWiki/TWikiDrawPlugin/RECT3.gif  
    pub/TWiki/TWikiDrawPlugin/RRECT1.gif  
    pub/TWiki/TWikiDrawPlugin/RRECT2.gif  
    pub/TWiki/TWikiDrawPlugin/RRECT3.gif  
    pub/TWiki/TWikiDrawPlugin/SCRIBBL1.gif  
    pub/TWiki/TWikiDrawPlugin/SCRIBBL2.gif  
    pub/TWiki/TWikiDrawPlugin/SCRIBBL3.gif  
    pub/TWiki/TWikiDrawPlugin/SEL1.gif  
    pub/TWiki/TWikiDrawPlugin/SEL2.gif  
    pub/TWiki/TWikiDrawPlugin/SEL3.gif  
    pub/TWiki/TWikiDrawPlugin/TEXT1.gif  
    pub/TWiki/TWikiDrawPlugin/TEXT2.gif  
    pub/TWiki/TWikiDrawPlugin/TEXT3.gif  
    pub/TWiki/TWikiDrawPlugin/TOBACK2.gif  
    pub/TWiki/TWikiDrawPlugin/TOBACK3.gif  
    pub/TWiki/TWikiDrawPlugin/TOFRONT2.gif  
    pub/TWiki/TWikiDrawPlugin/TOFRONT3.gif  
    pub/TWiki/TWikiDrawPlugin/TRIANGLE2.gif  
    pub/TWiki/TWikiDrawPlugin/TRIANGLE3.gif  
    pub/TWiki/TWikiDrawPlugin/URL1.gif  
    pub/TWiki/TWikiDrawPlugin/URL2.gif  
    pub/TWiki/TWikiDrawPlugin/URL3.gif  
    pub/TWiki/TWikiDrawPlugin/twikidraw.jar JAR file for applet
    templates/twikidraw.tmpl Template for drawing editor
    TWikiDrawPlugin_installer.pl Install script

  • Unzip TWikiDrawPlugin.zip in your twiki installation directory.
  • To test if the plugin is correctly installed, view this topic in the installation and you should see a placeholder box below. Click on it.

    Edit
    Sandbox.TWikiDrawingExamplesEdit drawing `empty` (requires a Java 1.1 enabled browser)Edit drawing `empty` (requires a Java 1.1 enabled browser)Edit drawing `empty` (requires a Java 1.1 enabled browser)Edit drawing `empty` (requires a Java 1.1 enabled browser)
  • Here's an example using an image map. Move the mouse over the image and watch the status bar.
    Edit
    ReOpenDifferentProjectSomeDayOhNoNotAgainAnotherDayDifferentProjectReAssignReAssignReAssignReCycleSackTheFixerWasteOfTimeReAssignUnVerifItsOkVeriFriedUnApproReSolvedOpeNedDooPlicateReJectPostPoneGoAheadAnalYsedAsSignNewBugForWardGetHelpPreAnalysisTestTopicEdit drawing `example` (requires a Java 1.1 enabled browser)Edit drawing `example` (requires a Java 1.1 enabled browser)Edit drawing `example` (requires a Java 1.1 enabled browser)Edit drawing `example` (requires a Java 1.1 enabled browser)

Known Problems

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.

Plugin Info

Plugin Author: TWiki:Main/CrawfordCurrie http://www.c-dot.co.uk
Plugin Version: 1.101
Change History:  
  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
  1 Oct 2001: Updated this text
  23 Sep 2001: Initial version
Dependencies: Java 1.1 enabled browser
None
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/TWikiDrawPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/TWikiDrawPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

  • TWikiDrawPlugin is based on Erich Gamma's JHotDraw 5.1. (JHotDraw is copyright 1996, 1997 by IFA Informatik and Erich Gamma, erich_gamma@acmPLEASENOSPAM.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. )
  • TWikiDrawPlugin uses ACME Labs' GifEncoder to convert a drawing into a GIF file format. (GifEncoder is Copyright ©1996,1998 by Jef Poskanzer, jef@acmePLEASENOSPAM.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. )
  • TWikiDrawPlugin uses some ideas of KmWiki drawing applet.
  • Copyright 2000 by Peter Thoeny, Peter@ThoenyPLEASENOSPAM.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.
  • Modifications Copyright © 2001 Motorola. All Rights Reserved.
  • Modifications © 2003-2004 Copyright Crawford Currie http://www.c-dot.co.uk

-- TWiki:Main/CrawfordCurrie - 11:22:35 14 September 2004

Topic attachments
I Attachment History Action Size Date Who Comment
GIFgif ATEXT1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif ATEXT2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif ATEXT3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif BORDDEC1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif BORDDEC2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif BORDDEC3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif CONN1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif CONN2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif CONN3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif DIAMOND2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif DIAMOND3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif ELLIPSE1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif ELLIPSE2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif ELLIPSE3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif ERASER2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif ERASER3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif LINE1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif LINE2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif LINE3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif OCONN1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif OCONN2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif OCONN3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif PERT2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif PERT3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif POLYGON1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif POLYGON2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif POLYGON3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif RECT1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif RECT2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif RECT3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif RRECT1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif RRECT2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif RRECT3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif SCRIBBL1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif SCRIBBL2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif SCRIBBL3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif SEL1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif SEL2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif SEL3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TEXT1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TEXT2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TEXT3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TOBACK2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TOBACK3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TOFRONT2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TOFRONT3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TRIANGLE2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif TRIANGLE3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif URL1.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif URL2.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
GIFgif URL3.gif   manage 0.2 K 2004-09-14 - 10:22 UnknownUser  
Unknown file formatdraw empty.draw r17 r16 r15 r14 r13 manage 3.6 K 2008-07-21 - 12:20 UnknownUser TWiki Draw draw file
GIFgif empty.gif r18 r17 r16 r15 r14 manage 4.9 K 2008-07-21 - 12:21 UnknownUser TWiki Draw GIF file
Mapmap empty.map r11 r10 r9 r8 r7 manage 0.6 K 2008-07-21 - 12:21 UnknownUser TWiki Draw map file
Unknown file formatdraw example.draw r16 r15 r14 r13 r12 manage 26.4 K 2013-06-14 - 18:50 UnknownUser TWiki Draw draw file
GIFgif example.gif r15 r14 r13 r12 r11 manage 15.9 K 2013-06-14 - 18:50 UnknownUser TWiki Draw GIF file
Mapmap example.map r11 r10 r9 r8 r7 manage 3.3 K 2013-06-14 - 18:50 UnknownUser TWiki Draw map file
Unknown file formatjar twikidraw.jar   manage 177.6 K 2004-09-14 - 10:22 UnknownUser  
Unknown file formatold twikidraw.jar.old   manage 169.1 K 2005-02-19 - 01:59 UnknownUser  
Edit | Attach | Watch | Print version | History: r104 < r103 < r102 < r101 < r100 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r104 - 2013-06-14 - StephenBrown
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.