123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <mxEditor>
- <ui>
- <resource basename="/wfEngine/graph/resources/mxApplication"/>
- </ui>
- <mxDefaultPopupMenu as="popupHandler">
- <add as="cut" action="cut" icon="/wfEngine/graph/images/cut.gif"/>
- <add as="copy" action="copy" icon="/wfEngine/graph/images/copy.gif"/>
- <add as="paste" action="paste" icon="/wfEngine/graph/images/paste.gif"/>
- <separator/>
- <add as="delete" action="delete" icon="/wfEngine/graph/images/delete.gif" if="cell"/>
- <separator/>
- <add as="properties" action="showProperties" icon="/wfEngine/graph/images/properties.gif"/>
- <separator/>
- </mxDefaultPopupMenu>
- <include name="/wfEngine/graph/config2/keyhandler-commons.xml"/>
- <Array as="actions">
- <add as="open"><![CDATA[
- function (editor)
- {
- editor.open(mxUtils.prompt('Enter filename', 'workflow.xml'));
- }
- ]]></add>
- <add as="openHref"><![CDATA[
- function (editor, cell)
- {
- cell = cell || editor.graph.getSelectionCell();
-
- if (cell == null)
- {
- cell = editor.graph.getCurrentRoot();
- if (cell == null)
- {
- cell = editor.graph.getModel().getRoot();
- }
- }
- if (cell != null)
- {
- var href = cell.getAttribute('href');
-
- if (href != null && href.length > 0)
- {
- window.open(href);
- }
- else
- {
- mxUtils.alert('No URL defined. Showing properties...');
- editor.execute('showProperties', cell);
- }
- }
- }
- ]]></add>
- <add as="editStyle"><![CDATA[
- function (editor)
- {
- var cell = editor.graph.getSelectionCell();
-
- if (cell != null)
- {
- var model = editor.graph.getModel();
- var style = mxUtils.prompt(mxResources.get('enterStyle'), model.getStyle(cell) || '');
- if (style != null)
- {
- model.setStyle(cell, style);
- }
- }
- }
- ]]></add>
- <add as="fillColor"><![CDATA[
- function (editor)
- {
- var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
-
- if (color != null)
- {
- editor.graph.model.beginUpdate();
- try
- {
- editor.graph.setCellStyles("strokeColor", color);
- editor.graph.setCellStyles("fillColor", color);
- }
- finally
- {
- editor.graph.model.endUpdate();
- }
- }
- }
- ]]></add>
- <add as="gradientColor"><![CDATA[
- function (editor)
- {
- var color = mxUtils.prompt(mxResources.get('enterColorname'), 'white');
-
- if (color != null)
- {
- editor.graph.setCellStyles("gradientColor", color);
- }
- }
- ]]></add>
- <add as="strokeColor"><![CDATA[
- function (editor)
- {
- var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
-
- if (color != null)
- {
- editor.graph.setCellStyles("strokeColor", color);
- }
- }
- ]]></add>
- <add as="fontColor"><![CDATA[
- function (editor)
- {
- var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
-
- if (color != null)
- {
- editor.graph.setCellStyles("fontColor", color);
- }
- }
- ]]></add>
- <add as="fontFamily"><![CDATA[
- function (editor)
- {
- var family = mxUtils.prompt(mxResources.get('enterFontfamily'), 'Arial');
-
- if (family != null && family.length > 0)
- {
- editor.graph.setCellStyles("fontFamily", family);
- }
- }
- ]]></add>
- <add as="fontSize"><![CDATA[
- function (editor)
- {
- var size = mxUtils.prompt(mxResources.get('enterFontsize'), '10');
-
- if (size != null && size > 0 && size < 999)
- {
- editor.graph.setCellStyles("fontSize", size);
- }
- }
- ]]></add>
- <add as="image"><![CDATA[
- function (editor)
- {
- var image = mxUtils.prompt(mxResources.get('enterImageUrl'),
- '/wfEngine/graph/images/image.gif');
-
- if (image != null)
- {
- editor.graph.setCellStyles("image", image);
- }
- }
- ]]></add>
- <add as="opacity"><![CDATA[
- function (editor)
- {
- var opacity = mxUtils.prompt(mxResources.get('enterOpacity'), '100');
-
- if (opacity != null && opacity >= 0 && opacity <= 100)
- {
- editor.graph.setCellStyles("opacity", opacity);
- }
- }
- ]]></add>
- <add as="straightConnector"><![CDATA[
- function (editor)
- {
- editor.graph.setCellStyle("straightEdge");
- }
- ]]></add>
- <add as="elbowConnector"><![CDATA[
- function (editor)
- {
- editor.graph.setCellStyle("");
- }
- ]]></add>
- <add as="arrowConnector"><![CDATA[
- function (editor)
- {
- editor.graph.setCellStyle("arrowEdge");
- }
- ]]></add>
- <add as="toggleOrientation"><![CDATA[
- function (editor, cell)
- {
- editor.graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
- }
- ]]></add>
- <add as="toggleRounded"><![CDATA[
- function (editor)
- {
- editor.graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
- }
- ]]></add>
- <add as="toggleShadow"><![CDATA[
- function (editor)
- {
- editor.graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
- }
- ]]></add>
- <add as="horizontalTree"><![CDATA[
- function (editor, cell)
- {
- cell = cell || editor.graph.getSelectionCell();
-
- if (cell == null)
- {
- cell = editor.graph.getDefaultParent();
- }
-
- editor.treeLayout(cell, true);
- }
- ]]></add>
- <add as="verticalTree"><![CDATA[
- function (editor, cell)
- {
- cell = cell || editor.graph.getSelectionCell();
-
- if (cell == null)
- {
- cell = editor.graph.getDefaultParent();
- }
-
- editor.treeLayout(cell, false);
- }
- ]]></add>
- </Array>
- </mxEditor>
|