Language
|
||
Introduction |
H. Jyounishi, Tokyo Japan |
|
Frame (Index), No frame version:0.3(latest) |
1. Version up Latest version version 0.3 =>Revision History 2. Download The set of jar, src, images, sample draw file => DrawTopFile0_3_20180513.zip , DrawTopFile0_3_20161020.zip
• Execution Download DrawTopFile.zip and decompress it, then double-click DrawTopX-Y.jar for start. • Available OS Windows XP, Vista, Win7 • Trouble with Windows 7 Double-clicking the .jar file gives the error message: "Could
not find the main class:", and unable to run any Java executable jar
files. 3. Motivation return=>page top The purpose of this section is to describe the specification of a compact drawing tool prototype which is a small application and written for Java programming training. The size of the code is about 35,000 lines excluding blank and comment lines. The usability of the prototype is nearly equals to those of the well-known products and it supports the basic and commonly used capabilities which can be referred in the "Table of contents" on the left frame. Despite greatly improved CPU performance, the current drawing tools have not improved dramatically from the MacDraw. So, we examined what can be achieved by using the abundant CPU power. For instance, the following functions can significantly reduce the amount of the work to draw diagrams, flow charts etc. (1) Auto align The auto align capability controls the operation of a moving or resizing a selected shape. If the selected shape is being moved or resized by dragging with the mouse and the selected shape happens to be aligned with a neighboring shape within a given error margin, the auto_align capability will draw a red dashed line between the two shapes. And if the mouse button is released at this moment, then the selected shape will be aligned forcibly with the neighboring shape within round-off error (Auto align, Examples-1). (2) Connection point and connector When you create, move or resize a shape and you move the mouse to the shape's boundary, theormark will be displayed. The mark suggests that the mouse position is very close to the shape's boundary or the characteristic points of the shape. At this time, if you start or stop dragging the mouse, you can define the start point or end point of a line(curve) on the shape's boundary within round-off error (Selecting a point on a shape). This function is very useful in order to create a connector. It is not necessary to create a connection point beforehand, and can connect anywhere on the boundary of a shape.
(3) New type of connector • A connector in this prototype can be connected to an arbitrary point on a shape's boundary, and any number of connectors can be connected to the shape's boundary (Connector, Examples-1). • When you move or resize a shape, the connectors connecting to the shape also move their endpoints to keep their connection. At this time, the connectors can keeps their direction by sliding the connection points over the boundary of the shape (auto tracking option, auto tracking option: keep x/y direction). • A connector can be connected with other connector. When a shape is moved or resized, all connectors connecting to the shape directly or indirectly also move their endpoints to keep their connection(Example 1.3).
To get to know the contents and usability of this prototype, you only have to download the files and click the jar file to start. You can test the prototype easily using the sample drawing file which was used in the user's guide. =>Download
4. Implementation return=>page top (1) Mouse position monitor It is very important for a drawing tool to know whether the mouse hits
a shape object or not, and if the mouse hits a shape, where in the shape
object the mouse is located. To perform these operations, It is necessary
to calculate in real time whether or not the mouse hits any of shape objects
whenever the mouse has been moved. Here "the mouse hits" implies
that the mouse is located on a shape or the mouse is located very close
to a shape boundary, and "a shape object" represents a shape
element, a text area or a associated shape object (i.e. a selection box,
resize handles, start and end points of a curve, segment junction points of a polyline/piecewise
cubic curve, tangent line of a piecewise cubic curve and so on). (2) Parametric line/curve By using parametric curve, a point on the boundary of a shape can be expressed
by the link to the shape and the parameter value on its boundary curve.
This expression is very convenient because even if the shape is moved,
resized or modified, the point expressed by the parameter value always
lies on the boundary. This feature is very useful for simplifying the coding
of the connector controller. To enable this, we extended java.awt.geom
libraries to be able to handle parametric curve . 5. Data exchange with other applications return=>page top This application has minimal capability which is available to creating HTML and so on.
6. References return=>page top
7. Contact return=>page top Bugs in the code, mistakes in the documentation and so on. Mail:mail@627utech.com. H. Jyounishi, Tokyo Japan |
Copyright (c) 2009-2013 All other trademarks are property of their respective owners. |