|
Table of Contents
-
The Browser Descriptor
-
<browser> Element
-
<role> Element
-
<root> Element
-
<node> Element
-
<jar> Element
-
<zip> Element
-
<include> Element
-
<type-system> Element
-
<code> Element
-
<wrapper> Element
-
<panel> Element
-
<table> Element
-
<icon> Element
-
<icon-file> Element
-
<menu> Element
-
<item> Element
-
<drop-action> Element
-
<info> Element
-
<mnemonic> Element
-
<accelerator> Element
The Browser Descriptor
The goal of this document is to provide information on the way to
configure the Browser framework.
<browser> Element
browser |
Description | The browser element is the root element of the
Browser Descriptor.
|
XML DTD |
<!ELEMENT browser (root? , (jar | zip | include | node | type-system | role )*) >
|
Parent(s) |
None.
|
Attributes |
None.
|
Children Elements |
-
root :
The root element allows to configure the initial context (i.e. The object at the top level).
-
role :
The role element allows to define different configurations for the same node.
-
node :
The node element allows to define a configuration for a specific object.
-
jar :
The jar element contains a Jar file definition. It represents the Jar archive that
the Java Virtual Machine (JVM) would load for accessing the plug-in resources.
In other words, this archive represents the plug-in.
-
zip :
The zip element represents a zip archive. All the Jar archives containing into this
Zip archive will be loaded into the Java Virtual Machive (JVM) which launches the Browser.
-
include :
The include element allows you to include an external browser configuration file.
-
type-system :
The type-system element specifies a new type system.
|
Example |
<browser>
<include url="..." />
<root>...</root>
<node type-name="java.lang.Object">...</node>
<node type-name="java.util.Properties">...</node>
<jar url="..." />
<type-system id="OMG IDL">...</type-system>
<role id="role1" >
<node type-name="java.lang.Object">...</node>
</role>
<role id="role2" >
<node type-name="java.lang.Object">...</node>
</role>
</browser>
|
<role> Element
role |
Description | The role element defines a group which allows user to define different behaviours for a same node. It consists of a list of node elements.
|
XML DTD |
<!ELEMENT role (root? , node*)>
<!ATTLIST role
id ID #REQUIRED
extends IDREFS #IMPLIED
kind (contrete | abstract) "concrete"
>
|
Parent(s) |
browser
|
Attributes |
-
id ID :
The identifier of the role.
-
extends IDREFS :
It represents a list of role identifiers (separated by commas) from which the defined role inherits.
-
kind (contrete | abstract) :
It specifies if this role is concrete or abstract. The default value is concrete . Only the concrete roles are displayed into the graphical role menu.
|
Children Elements |
|
Example |
<role id="role1" >
<root>...</root>
<node type-name="java.lang.Object">...</node>
</role>
<role id="role2" kind="abstract">
<node type-name="java.lang.Object">...</node>
<node type-name="java.lang.Integer">...</node>
</role>
<role id="role3" >...</role>
<role id="role4" extends="role2,role3" >
<node type-name="java.util.Properties">...</node>
</role>
|
<root> Element
root |
Description | The root element defines a context which is displayed at the root of the browser.
|
XML DTD |
<!ELEMENT root (code)>
|
Parent(s) |
browser ,
role
|
Attributes |
None.
|
Children Elements |
|
Example |
<root><code>...</code></root>
|
<node> Element
node |
Description | The node element represents the configuration for a specific entity. You may define a node for every kind of objects.
Warning: Currently, only the Java type system is supported. In the future releases, we will also support OMG IDL type, Fractal type, ...
|
XML DTD |
<!ELEMENT node (jar*, wrapper?, panel?, icon?, menu?, drop-action*, info?) >
<!ATTLIST node
type-system CDATA #FIXED "Java"
type-name CDATA #REQUIRED
>
|
Parent(s) |
browser
role
|
Attributes |
-
type-system CDATA :
The identifier of the type system used to identify the entity.
The default value is Java and it is also the only supported type for the moment.
-
type-name CDATA :
The identifier of the recognized object in this type system.
|
Children Elements |
-
jar :
The jar element contains a Jar file definition. It represents the Jar archive that
the Java Virtual Machine (JVM) would load for accessing the plug-in resources.
In other words, this archive represents the plug-in.
-
wrapper :
The wrapper element defines the wrapper to use to browse the resource.
-
panel :
The panel element defines the panel to associate to the described object.
-
icon :
The icon element defines the icon to use to represent this type of node.
-
menu :
The menu element describes the content of a contextual menu for acting with the resource.
-
drop-action :
The drop-action element defines the Drag and Drop action.
-
info :
The info element defines a class which provides a short description of a resource.
|
Example |
<node type-name="java.util.Properties">
<jar url="file:PropertiesPlugin.jar" />
<wrapper><code>...</code></wrapper>
<icon><code>...</code></icon>
<panel><code>...</code></panel>
<menu>...</menu>
<drop-action label="..."><code>...</code></menu>
</node>
|
<jar> Element
jar |
Description |
The jar element defines the archive where the plug-in classes and resources are located.
It will be loaded in the Java Virtual Machine (JVM). This element is only needed if the plug-in resources
are not present in the Browser classpath.
|
XML DTD |
<!ELEMENT jar EMPTY >
<!ATTLIST jar
url CDATA #REQUIRED
>
|
Parent(s) |
browser
node
|
Attributes |
|
Children Elements |
None.
|
Example |
<jar url="file:CCM_plugin.jar" />
<jar url="http://openccm.objectweb.org/CORBA_plugin.jar" />
|
<zip> Element
zip |
Description |
The zip element defines an archive containing the Jar archives where the plug-in classes and resources are located.
All the Jar archives found into this Zip archive will be loaded into the Java Virtual Machine (JVM) which launches the Browser.
|
XML DTD |
<!ELEMENT zip EMPTY >
<!ATTLIST zip
url CDATA #REQUIRED
>
|
Parent(s) |
browser
|
Attributes |
|
Children Elements |
None.
|
Example |
<zip url="file:CCM_demo.aar" />
<zip url="http://openccm.objectweb.org/CCM_demo.zip" />
|
<include> Element
include |
Description |
The include element describes an external Browser
configuration to include into the current configuration.
|
XML DTD |
<!ELEMENT include EMPTY >
<!ATTLIST include
url CDATA #REQUIRED
>
|
Parent(s) |
browser
|
Attributes |
|
Children Elements |
None.
|
Example |
<include url="file:CCMConfig.xml" />
<include url="http://openccm.objectweb.org/CCMConfig.xml" />
|
<type-system> Element
type-system |
Description |
The type-system element defines a type system for identifying a kind of node.
|
XML DTD |
<!ELEMENT type-system (code) >
<!ATTLIST type-system
id CDATA #REQUIRED
>
|
Parent(s) |
browser
|
Attributes |
|
Children Elements |
|
Example |
<type-system id="OMG IDL"><code>...</code></type-system>
|
<code> Element
code |
Description |
The code element describes a piece of code to interpret.
Warning: For the moment, only Java language is supported to describe a code element.
The value of this element must be a Java class name.
|
XML DTD |
<!ELEMENT code (#PCDATA) >
<!ATTLIST code
language ( Java | JavaIDLScript | Python ) "Java"
>
|
Parent(s) |
root
type-system
wrapper
panel
icon
item
drop-action
info
|
Attributes |
|
Children Elements |
None.
|
Example |
<code>org.objectweb.util.browser.core.panel.WhitePanel</code>
<code language="Java">myPackage.MyClass</code>
|
<wrapper> Element
wrapper |
Description | The wrapper element defines the wrapper code to use to access children entities of the described object.
Indeed, it specifies the way for retrieving children entities of the current node. For example, the
org.omg.CORBA.CosNaming.NamingContext object's wrapper gives all the CORBA object
references bound in a naming context.
|
XML DTD |
<!ELEMENT wrapper (code) >
|
Parent(s) |
node
|
Attributes |
None.
|
Children Elements |
|
Example |
<wrapper><code>...</code></wrapper>
|
<panel> Element
panel |
Description |
The panel element defines the panel for displaying exhaustive information about a resource.
A panel element may be a simple code element or it may be composed of
a list of Panel elements and/or Table elements.
|
XML DTD |
<!ELEMENT panel (code | (panel | table)+) >
<!ATTLIST panel
inherit-type-panel (true | false) "false"
>
|
Parent(s) |
node
|
Attributes |
|
Children Elements |
-
code :
The code element specifies the implementation of the panel to use.
-
panel :
The panel element specifies the sub panel contains in the defined composite panel.
-
table :
The table element describes an array into the defined composite panel.
|
Example |
<panel><code>...</code></wrapper>
<panel inherit-type-panel="true" >
<panel><code>...</code></panel>
<table><code>...</code></table>
<panel><code>...</code></panel>
</panel>
|
<table> Element
table |
Description | The table element defines a panel which represents an array of data.
|
XML DTD |
<!ELEMENT table (code) >
|
Parent(s) |
panel
|
Attributes |
None.
|
Children Elements |
|
Example |
<table><code>...</code></table>
|
<icon> Element
icon |
Description |
The icon element defines the way to obtain an icon to represent an entity.
|
XML DTD |
<!ELEMENT icon (icon-file | code) >
|
Parent(s) |
node
item .
|
Attributes |
None.
|
Children Elements |
|
Example |
<icon><code>...</code></icon>
<icon><icon-file url="..." /></icon>
|
<icon-file> Element
icon-file |
Description | The icon-file element describes an icon file resource.
|
XML DTD |
<!ELEMENT icon-file EMPTY >
<!ATTLIST icon-file
url CDATA #REQUIRED
>
|
Parent(s) |
icon
|
Attributes |
|
Children Elements |
None.
|
Example |
<icon-file url="file:icons/icon.png" />
<icon-file url="http://openccm.objectweb.org/icon.png" />
|
<menu> Element
menu |
Description | The menu element describes a contextual menu to act on the resource.
|
XML DTD |
<!ELEMENT menu (item)* >
<!ATTLIST menu
inherit-tree-menu (true | false) "true"
inherit-type-menu (true | false) "true"
>
|
Parent(s) |
node
|
Attributes |
-
inherit-tree-menu (true | false) :
A boolean attribute which allows to fix the inheritance policy at the tree level:
-
true to specify that this menu has to inherit from parent nodes menu items at the tree level.
-
false to specify that this menu must not inherit from parent nodes menu items at the tree level.
The default value is true .
-
inherit-type-menu (true | false) :
A boolean attribute which allows to fix the inheritance policy at the Java type level:
-
true to specify that this menu has to inherit from parent nodes menu items at the Java type inheritance level.
-
false to specify that this menu must not inherit from parent nodes menu items at the Java type inheritance level.
The default value is true .
|
Children Elements |
|
Example |
<menu>
<item ... >...</item>
<item ... >...</item>
</menu>
<menu inherit-type-menu="false" inherit-tree-menu="false">
<item ... >...</item>
</menu>
|
<item> Element
item |
Description | The item element describes an item of a contextual menu defined by the menu element.
|
XML DTD |
<!ELEMENT item (icon?,accelerator?,mnemonic?,code) >
<!ATTLIST item
label CDATA #REQUIRED
tree-child-visible (true | false) "false"
type-child-visible (true | false) "true"
>
|
Parent(s) |
menu
|
Attributes |
-
label CDATA :
The label of the item in the contextual menu.
-
tree-child-visible (true | false) :
A boolean attribute which allows to fix the tree child visibility policy:
-
true to specify that this item is defined for children nodes,
i.e. only children nodes would access to this item.
-
false to specify that this item concerns the current node .
The default value is false .
-
type-child-visible (true | false) :
A boolean attribute which allows to fix the type system child visibility policy:
-
true to specify that this item can be visible by
children at the Java type inheritance level.
-
false to specify that this item must not be visible
by children at the Java type inheritance level.
The default value is true .
|
Children Elements |
|
Example |
<node type-name="X">
...
<menu>
<item label="For X and sub classes"><code>...</code></item>
<item label="Only for X"
type-child-visible="false"><code>...</code></item>
<item label="For X's children nodes"
tree-child-visible="true"><code>...</code></item>
<item label="New" >
<icon>...</icon>
<code>...</code>
<accelerator ctrl="true" char="n"/>
<mnemonic char="n"/>
</item>
</menu>
<node>
|
<drop-action> Element
drop-action |
Description | The drop-action element describes the action executed
when an object is dropped on the entity represented by the defined node .
|
XML DTD |
<!ELEMENT drop-action (code) >
<!ATTLIST drop-action
label CDATA #REQUIRED
type (copy | move | link) "move"
>
|
Parent(s) |
node
|
Attributes |
-
label CDATA :
The label describing the action.
-
type (copy | move | link) :
The type attribute specifies the kind of the Drag&Drop action.
This type is in fact defined by the state of the input device:
left click for move , ctrl+left click for copy
and shift+ctrl+left click for link .
|
Children Elements |
|
Example |
<drop-action type="link" label="drop action">
<code>...</code>
</drop-action>
|
<info> Element
info |
Description | The info element represents a short description of a resource.
For example, this short description may be displayed in the status bar of a console.
|
XML DTD |
<!ELEMENT info (code) >
|
Parent(s) |
node
|
Attributes |
None.
|
Children Elements |
|
Example |
<info>
<code>...</code>
</info>
|
<mnemonic> Element
mnemonic |
Description | The mnemonic element represents the mnemonic key of an action's label.
|
XML DTD |
<!ELEMENT mnemonic EMPTY>
<!ATTLIST mnemonic
char CDATA #REQUIRED
>
|
Parent(s) |
item
|
Attributes |
|
Children Elements |
None.
|
Example |
<mnemonic char="n"/>
|
<accelerator> Element
accelerator |
Description | The accelerator element allows us to associate keys in order to compose an accelerator. An accelerator consits of a combination of keys.
|
XML DTD |
<!ELEMENT accelerator EMPTY>
<!ATTLIST accelerator
ctrl (true | false) "false"
alt (true | false) "false"
shift (true | false) "false"
meta (true | false) "false"
char CDATA #REQUIRED
>
|
Parent(s) |
item
|
Attributes |
-
char CDATA :
The character of the accelerator.
-
ctrl (true | false) :
This attribute represents the "control" key. The default value is false (i.e. not selected).
-
alt (true | false) :
This attribute represents the "alt" key. The default value is false (i.e. not selected).
-
shift (true | false) :
This attribute represents the "shift" key. The default value is false (i.e. not selected).
-
meta (true | false) :
This attribute represents the "meta" key. The default value is false (i.e. not selected).
|
Children Elements |
None.
|
Example |
<accelerator ctrl="true" char="n">
|
|