This is a description of the file format used for describing the applet GUI in the DXF applet. Please note that there are some example files which may be easier to understand or at least adopt to your needs than this reference:
The file format is XML based. The root tag is dxfapplet.
Some attributes may be internationalized. This is indicated by an i18n tag wrapped in ${ and }, i. e. ${tag}. If no predefined tag from the embedded applet's resources is used a resource has to be provided via a resource bundle class or property files which can be loaded by the applet from jars or from the codebase. Use the resourcebase applet tag for this resource to make the resource known to the applet.
See Internationalization Support for more info.
The are various tags defining the components of the GUI. They have each special attributes, but they also have attributes which are common and may be used on each of the components. They are described here:
| Top | Top component. |
| Bottom | Bottom component. |
| Left | Left component. |
| Right | Right component. |
| Center | In center. |
| North | At top. |
| South | At bottom. |
| West | At left. |
| East | At right. |
| Border definition | Description |
|---|---|
|
bevel(type) bevel(type,highlightColor,shadowColor) bevel(type,highlightOuterColor,highlightInnerColor,shadowOuterColor,shadowInnerColor) |
Bevel border. The type argument has two
possible values:
|
| compound(border1,border2) | Compound border. The border arguments are just definitions of other borders. |
|
empty() empty(top,left,bottom,right) |
Empty border. The first version uses standard margins, the second version allows to define each margin as a integer number giving the distance in pixels. |
|
etched() etched(highlightColor,shadowColor) etched(type) etched(type,highlightColor,shadowColor) |
Etched border. The first version uses standard settings,
the highlightColor
and shadowColor arguments allow to define the
colors either as a name
like white or a HTML-like color definition
like #RRGGBB
or rgb(r,g,b). The type argument has
two possible values:
|
|
line(color) line(color,thickness) |
Line border. The color parameter defines the color of the line either as a name like white or a HTML-like color definition like #RRGGBB or rgb(r,g,b). The thickness argument is an integer number defining the line width in pixels. |
| loweredbevel() | Lowered bevel border using the components color for highlight and shadow. |
| matte(top,left,bottom,right,color) | Matte border. The first four parameters define the margins, the last the color either as a name like white or a HTML-like color definition like #RRGGBB or rgb(r,g,b). The icon version of the matte border is not yet supported. |
| raisedbevel() | Raised bevel border using the components color for highlight and shadow. |
|
titled(title) titled(border,title) titled(border,title,justification,position) |
Titled border. The title has to be enclosed in
single quotes. It may be internationalized.
The border is just another
border definition. The possible values
for justification are
(compare TitledBorder documentation):
|
The rest of this page is a description of the possible XML-Tags, which mostly define components to insert into the GUI. The root tag is dxfapplet. Here is a short overview:
| action | Definition of actions to be used as menu entries. |
| dxfapplet | The root tag. |
| label | Inserts a javax.swing.JLabel component. |
| layerpanel | Adds a panel for layer visibility manipulation. |
| menu | Definition of a menu. |
| menubar | Definition of the menu bar. |
| modelmap | Inserts a model map showing the current viewport (only 2D). |
| modelview | Adds a DXF model view component. |
| panel | Inserts a javax.swing.JPanel component. |
| projectionpanel | Inserts a panel for projection manipulation. |
| res | Overwritten Swing UI resource. |
| separator | Separator in menus. |
| splitpane | Inserts a javax.swing.JSplitPane component. |
| statusbar | Adds a status bar. |
| tabbedpane | Inserts a javax.swing.JTabbedPane component. |
| ui | Overwrite Swing UI resources. |
| viewselect | Insert a view selection panel. |
The root of the XML tree.
| %0 | Full name of DXF file displayed. |
| %1 | Base name of DXF file displayed. |
| %2 | Applet version. |
This is the root, it is therefore not contained in any tags.
Contains UI resource setting for Swing.
No attributes defined.
UI resource setting for Swing.
| * | Stands for any number of characters, including none. Probably the most useful match character. |
| ? | Stands for any character. |
| [SET] | Defines a matching set of characters. SET may contain several concatenated characters like ABC (matching one of A, B, or C) or a range a characters denoted by eg A-C, which defines the same set. The Unicode order is used. If a - or a ] has to be included in the set if has to be the first character in the set. |
| [^SET] | Defines a matching set of not allowed characters. SET may contain several concatenated characters like ABC (matching everything else but A, B, or C) or a range a characters denoted by eg A-C, which defines the same set. The Unicode order is used. If a - or a ] has to be included in the set if has to be the first character in the set. |
| other | Any other character just stands for itself. |
| Color | The color value may be either given as a name like white or a HTML-like color definition like #RRGGBB or rgb(r,g,b). |
| Border | See the border attribute description. |
| String | The value is used directly. |
| Integer | A number without a dot. |
| Float | A number with an optional dot. |
| Boolean | One of the values true or false. |
| Gradient | Two floats and three colors, separated by commas. Use a color name like white or the HTML-like color definition #RRGGBB. |
| Dimension | Two integers (width and height), separated by a comma. |
| Insets | Four integers (top, left, bottom, right), separated by commas. |
| Fonts | Font definition for the java.awt.Font.decode() method: fontfamilyname-style-pointsize. |
| Arrays | It is possible to define arrays of values of the above types by concatenating them with a bar sign |. |
No contained tags defined.
Defines the menubar when running in frame mode. In inpage mode this is not used. May appear only once.
No attributes defined.
Defines a menu or a sub menu.
Inserts one or more actions into a menu.
| Name | Action | Basic I18n Resource Key Prefix | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Print view action | miPrint | |||||||||||||||||||||||||||||||||||||||||||
| close | Close window action | miCloseWindow | ||||||||||||||||||||||||||||||||||||||||||
| imgsave | All actions for saving on images (may depend on environment) | actionSaveImage (fills placeholder %0 with uppercase image format) | ||||||||||||||||||||||||||||||||||||||||||
| savebmp | Save view as BMP action (contained in imgsave). | actionSaveImage (fills placeholder %0 with uppercase image format) | ||||||||||||||||||||||||||||||||||||||||||
| savegif | Save view as GIF action (contained in imgsave). | actionSaveImage (fills placeholder %0 with uppercase image format) | ||||||||||||||||||||||||||||||||||||||||||
| savejpg | Save view as JPG action (contained in imgsave). | actionSaveImage (fills placeholder %0 with uppercase image format) | ||||||||||||||||||||||||||||||||||||||||||
| savepng | Save view as PNG action (contained in imgsave). | actionSaveImage (fills placeholder %0 with uppercase image format) | ||||||||||||||||||||||||||||||||||||||||||
| savepdf | Save view as PDF action. | actionSavePDF | ||||||||||||||||||||||||||||||||||||||||||
| saveps | Save view as Postscript action. | actionSavePostscript | ||||||||||||||||||||||||||||||||||||||||||
| savesvg | Save view as SVG action. | actionSaveSVG | ||||||||||||||||||||||||||||||||||||||||||
| paper( |
Shows a paper size indicator. This will only make sense if scaled
printing is enabled. For
The last parameter
If more than one paper action is used actions may be grouped so that at most one of the actions in the group is active by adding a group name in brackets to each of the actions in the group, e.g. p[GROUP1] for a portrait orientation and l[GROUP1] for a landscape orientation where only one of both (or none) is displayed. |
actionPaperSize_P (only portrait) actionPaperSize_L (only landscape) actionPaperSize_C (only cross) actionPaperSize_PC (portrait w/ cross) actionPaperSize_LC (landscape w/ cross) ... actionPaperSize_PLC (portrait, landscape and cross) |
No contained tags defined.
Inserts a separator into a menu.
No attributes defined.
No contained tags defined.
Inserts a JSplitPane into the surrounding container.
All common component attributes are allowed.
Inserts a status bar into the surrounding container. May only appear once.
All common component attributes are allowed.
No contained tags defined.
Inserts a panel for setting the layers of the model visible or invisible into the surrounding container.
All common component attributes are allowed.
No contained tags defined.
Inserts a panel with BorderLayout into the surrounding container.
No attributes defined.
Inserts a label into the surrounding container.
All common component attributes are allowed.
No contained tags defined.
Inserts a panel allowing to select various views. It is only defined for 3D views, i.e. the value of the attribute type of the modelview tag has to be 3D+.
All common component attributes are allowed.
No contained tags defined.
Inserts a panel allowing to manipulate the projection. It is only defined for 3D views, i.e. the value of the attribute type of the modelview tag has to be 3D+.
All common component attributes are allowed.
No contained tags defined.
Inserts a component showing the complete model and the current viewport as it is displayed in the modelview. It is only defined for 2D views, i.e. the value of the attribute type of the modelview tag has to be 2D, 2D+, 2D3D, or 2D3D+.
All common component attributes are allowed.
No contained tags defined.
Inserts a javax.swing.JTabbedPane component.
All common component attributes are allowed.
| top | Place tabs at top side. |
| bottom | Place tabs at bottom side. |
| left | Place tabs at left side. |
| right | Place tabs at right side. |
| wrap | Wrap tabs into new row/column. |
| scroll | Show scroll arrows. |
No contained tags defined.
Inserts the view for the model into the surrounding container. It has to appear once.
All common component attributes are allowed.
| 2D | Simple 2D view, using 2D data. With 2D data it is not always possible to display all 3D DXF files correctly, but it uses half as much memory and draws faster. Use only with 2D files. |
| 2D+ | 2D view with toolbar, using 2D data. With 2D data it is not always possible to display all 3D DXF files correctly, but it uses half as much memory and draws faster. Use only with 2D files. |
| 3D+ | 3D view with toolbar, similar to DXF Viewer with 3D data. |
| 2D3D | Same as 2D, but using 3D data. This avoids the problems with incorrect displays while using the double amount of memory. |
| 2D3D+ | Same as 2D+, but using 3D data. This avoids the problems with incorrect displays while using the double amount of memory. |
| NE | Upper right |
| NW | Upper left |
| SE | Lower right |
| SW | Lower left |
| dynamic | Dynamically reduced. Depends on visible data. (Default) |
| static | Statically reduced. Does always draw a fixed part of the model. |
| off | The model is always drawn completely. |
| State Name | Description | Basic I18n Resource Key Prefix |
|---|---|---|
| all | Mask for all possible states and actions. | n.a. |
| zoomin | Zoom in state (dragged rectangle becomes new view). | zoomInState |
| zoomout | Zoom out state (view is put into dragged rectangle). | zoomOutState |
| zoom | Zoom state (dragging mouse zooms around center). | scaleState |
| zoominout | Mask for both zoom in and out states. | n.a. |
| zoomall | Mask for all zoom (in, out, by mouse) states. | n.a. |
| movez | Move Z state (move through model by mouse dragging (only 3D)). | distanceState |
| pan | Pan state (drag model with mouse). | panState |
| rotate | Rotate state (rotate model with mouse). | rotateState |
| picking | Picking state (get information of picked entity, requires allowpicking attribute to be true). | pickState |
| perspective | Perspective view state (only 3D). | perspectiveState |
| projective | Projective view state (only 3D). | projectionState |
| viewstates | Mask for perspective and projective view state | n.a. |
| reset | Reset view to initial action. |
resetAction (2D) resetXAction (3D) resetYAction (3D) resetZAction (3D) |
| backward | Go back to last view action. | backwardAction |
| forward | Go forward to next view action. | forwardAction |
| history | Mask for reset, backward and forward actions. | n.a. |
| rotateccw | Rotate 90° counterclockwise action. | rotateCcwAction |
| rotatecw | Rotate 90° clockwise action. | rotateCwAction |
| rotatestep | Mask for rotateccw and rotatecw actions. | n.a. |
| fit | Fit to size action. | fitToSizeAction |
| search | Text search action. | textSearchAction |
No contained tags defined.