Skip to main content
Version: v2023.18.0

Migrate configuration from 4.x to 4.7

Version 4.7 brings a lot of visual modification that involves configuration changes in beans, but also properties in arender.properties as well as CSS. This page aims to show how to properly adapt the old configurations to the new one.

Since 4.7.2, the configurations made before 4.7 are retro-compatible. However, it is advisable to make the modifications to the new configuration standard.

The Toppanel

New organization of the Toppanel

The Toppanel is organized into several sections to organize the different buttons. Here are the different sections listed in their default order:

  • File And annotation : Contains all buttons related to download, print and annotations
  • File (Contained in the first section) : Contains all buttons related to download and print
  • Annotation (Contained in the first section) : Contains all buttons related to annotations
  • Modification : Contains rotations, brightness and contrasts buttons
  • Navigation : Contains all buttons related to the document navigation
  • Zoom : Contains all buttons related to the zoom.
  • MultiView tools : Contains all buttons related to multiview
  • Plugin : Contains all buttons for Plume and HTML plugins
  • Right : Contains all buttons needed to be to the right like the ellipsis

image

This organization can be modified as in previous versions. Here is a list of the different properties used to manipulate the arrangement of the different elements of the Toppanel:

  • topPanel.widgets.beanNames
  • topPanel.upload.buttons.beanNames
  • topPanel.download.buttons.beanNames
  • topPanel.section.file.buttons.beanNames
  • topPanel.section.file.annotation.buttons.beanNames
  • topPanel.section.modification.buttons.beanNames
  • topPanel.ellipsis.buttons.beanNames
  • topPanel.section.plugin.buttons.beanNames
  • topPanel.search.buttons.beanNames
  • topPanel.navigation.buttons.beanNames
  • topPanel.zoom.buttons.beanNames
  • topPanel.rotation.buttons.beanNames
  • topPanel.annotation.buttons.beanNames
  • topPanel.imageProcessing.buttons.vertical.beanNames
  • topPanel.section.right.buttons.beanNames

Special cases

The File and Annotation section is a section that will simply serve as a container for the File and Annotation sections in order to have them side by side.

The Right section is the section which will always be the furthest to the right and which will contain the Ellipsis button (Burger menu).

Buttons, activable buttons and sub-menu items

The annotation buttons

The annotation buttons are located directly in the toppanel in the Annotation section. The repeat mode can be activated with a double-click if the property associated with the annotation is activated. It is still possible to have the repeat mode on a button with a single click.

To have this behavior, you must replace the buttonHandler property. Annotations with a repeat function will have bean references for normal mode and repeat mode.

Here is an example of a buttonHandler property that activates repeat mode when the button is clicked:

<property name="buttonHandler">
<ref bean="highlightCircleCreationRepeatableAction" />
</property>

Bean references for button actions can be found in the file named events-configuration.xml.

Example of a standard annotation button
<bean id="addHighlightCircleAnnotationButton" class="com.arondor.viewer.client.toppanel.presenter.ActivableButtonPresenter">
<constructor-arg value="addHighlightCircleAnnotationButton" />
<property name="name" value="Circle" />
<property name="supportDoubleClick" value="${topPanel.annotationMenu.circle.repeat}" />
<property name="enabled" value="${topPanel.annotationMenu.circle}" />
<property name="className" value="standardButton icon-add-circle toppanelButton" />
<property name="buttonGroup" value="topPanel" />
<property name="buttonTitle">
<ref bean="labels#addCircleAnnotation" />
</property>
<property name="visibilityForTopPanel">
<ref bean="topPanelVisibilityMode" />
</property>
<property name="doubleClickButtonHandler">
<ref bean="highlightCircleCreationRepeatableAction" />
</property>
<property name="inactiveButtonHandler">
<ref bean="quitAnnotationCreationAction" />
</property>
<property name="buttonHandler">
<ref bean="highlightCircleCreationAction" />
</property>
</bean>
Example of annotation button activating repeat mode with one-click
<bean id="addHighlightCircleAnnotationRepeatButton" class="com.arondor.viewer.client.toppanel.presenter.ActivableButtonPresenter">
<constructor-arg value="addHighlightCircleAnnotationRepeatButton" />
<property name="enabled" value="${topPanel.annotationMenu.circle.repeat}" />
<property name="active" value="false" />
<property name="className" value="standardButton icon-add-circle toppanelButton" />
<property name="buttonGroup" value="topPanel" />
<property name="buttonTitle">
<ref bean="labels#addCircleAnnotation" />
</property>
<property name="visibilityForTopPanel">
<ref bean="topPanelVisibilityMode" />
</property>
<property name="buttonHandler">
<ref bean="highlightCircleCreationRepeatableAction" />
</property>
</bean>

Activate a button with a keyboard shortcut

Buttons can have a keyboard shortcut to activate the action that is usually done on click. The different types of shortcut available are of the form:

  • {Specific key} + {Key}
  • {Specific key} + {Specific key} + {Key}
  • {Specific key} + {Specific key} + {Specific key} + {Key}

Where {Key} corresponding to a alphabetic or numeric key on the keyboard and {Specific key} can be ALT, SHIFT, or CTRL.

For buttons (Using the ButtonPresenter class) and activable buttons (Using the ActivableButtonPresenter class), add the following property in the desired bean:

<property name="shortcut">
<bean class="com.arondor.viewer.client.documentcontent.shortcuts.KeyboardShortCut" scope="prototype">
<property name="ctrl" value="true" />
<property name="key" value="KEY_TO_USE" />
<property name="enabled" value="IS_ENABLED" />
</bean>
</property>

Property to add in the shortcut bean to activate the CTRL key:

<property name="ctrl" value="true" />

Property to add in the shortcut bean to activate the SHIFT key:

<property name="shift" value="true" />

Property to add in the shortcut bean to activate the ALT key:

<property name="alt" value="true" />

Conversion between button and sub-menu item:

The buttons found in the submenus and the buttons found in the toppanel now use different classes. This will also result in differences in the definition of the bean.

Example of button, activable button and sub-menu item

The following examples show a fully constructed bean for the three shapes mentioned. The action that is triggered by each is the printing of the document.

A button is a simple button that will return to the initial visual state after clicking on it. An activable button is a button that will stay at an active visual state on click and then will go back to the default visual state after clicking on it again.

<bean id="printButton" class="com.arondor.viewer.client.widgets.DropdownMenuItem">
<constructor-arg value="printButton"/>
<property name="enabled" value="#{ !${isMobile} and ${topPanel.print}}"/>
<property name="className" value="standardButton icon-print toppanelButton" />
<property name="buttonTitle">
<ref bean="labels#printDocument" />
</property>
<property name="shortCut" value="CTRL + ${shortCut.print.key}" />
<property name="buttonHandler">
<bean class="com.arondor.viewer.client.toppanel.behavior.document.DocumentPrintHandler">
<constructor-arg>
<bean class="com.arondor.viewer.client.events.print.ShowPrintDialogBoxEvent" />
</constructor-arg>
</bean>
</property>
</bean>
Button
<bean id="printButton" class="com.arondor.viewer.client.toppanel.presenter.ButtonPresenter">
<constructor-arg value="printButton"/>
<property name="enabled" value="#{ !${isMobile} and ${topPanel.print}}"/>
<property name="className" value="standardButton icon-print toppanelButton" />
<property name="buttonTitle">
<ref bean="labels#printDocument" />
</property>
<property name="buttonHandler">
<bean class="com.arondor.viewer.client.toppanel.behavior.document.DocumentPrintHandler">
<constructor-arg>
<bean class="com.arondor.viewer.client.events.print.ShowPrintDialogBoxEvent" />
</constructor-arg>
</bean>
</property>
</bean>
Activable button
<bean id="printButton" class="com.arondor.viewer.client.widgets.ActivableButtonPresenter">
<constructor-arg value="printButton"/>
<property name="enabled" value="#{ !${isMobile} and ${topPanel.print}}"/>
<property name="className" value="standardButton icon-print toppanelButton" />
<property name="buttonTitle">
<ref bean="labels#printDocument" />
</property>
<property name="buttonHandler">
<bean class="com.arondor.viewer.client.toppanel.behavior.document.DocumentPrintHandler">
<constructor-arg>
<bean class="com.arondor.viewer.client.events.print.ShowPrintDialogBoxEvent" />
</constructor-arg>
</bean>
</property>
</bean>

We see that the beans are similar here. But activable buttons (Using the ActivableButtonPresenter class) can accept the following properties:

  • name
  • buttonGroup
  • inactiveButtonHandler
  • supportShortCut
  • shortcut

For buttons (Using the ButtonPresenter class) only the following properties can be added:

  • name
  • supportShortCut
  • shortcut

The previous properties cannot be used by submenu items (Using the DropdownMenuItem class).

Putting the research directly in the toppanel

The search button corresponds to the bean with the id searchSection. This bean must then be deleted from the list of beans to be instantiated.

Location of the use of the id: image

topPanel.section.right.buttons.beanNames=documentBuilderButton,fullscreenButton,searchSection,moreButton

Removing the id by redefining the property: image

topPanel.section.right.buttons.beanNames=documentBuilderButton,fullscreenButton,moreButton

Then, you will have to redefine a property with the bean id searchBox: image

topPanel.section.right.buttons.beanNames=searchBox,documentBuilderButton,fullscreenButton,moreButton

Class name changes

If you are using 4.7.0 or 4.7.1, then some classes have changed package. Please replace them.

Old Package nameNew Package Name
com.arondor.viewer.client.toppanel.presenter.SliderPanelPresentercom.arondor.viewer.client.annotation.slider.SliderPanelPresenter
com.arondor.viewer.client.toppanel.presenter.ActivableButtonPresentercom.arondor.viewer.client.widgets.ActivableButtonPresenter
com.arondor.viewer.client.toppanel.presenter.DialogBoxPushButtoncom.arondor.viewer.client.widgets.DialogBoxPushButton
com.arondor.viewer.client.toppanel.presenter.SimpleTopPanelSubMenucom.arondor.viewer.client.widgets.SimpleTopPanelSubMenu
com.arondor.viewer.client.toppanel.presenter.TopPanelSubMenucom.arondor.viewer.client.widgets.TopPanelSubMenu

These class changes are only valid for 4.7.0 and 4.7.1. Since version 4.7.2, the old package names have been added again in order to have better retro-compatibility.

Bean changes

The bean with the id annotationMenu has changed class. The new class is com.arondor.viewer.client.toppanel.presenter.SimpleButtonSetPresenter.

The arrow head or tail selection buttons have been changed. Their class is now com.arondor.viewer.client.widgets.DropdownMenuItem

The imageResource property can no longer be used in bean definitions.

Bean deletion (4.7.0 and 4.7.1)

List of bean ids removed for version 4.7.0 and 4.7.1:

  • documentMenu
  • imageProcessingVerticalSubMenu
  • addHighlightRectangleAnnotationRepeatButton
  • addHighlightCircleAnnotationRepeatButton
  • addArrowAnnotationRepeatButton
  • addHighlightTextAnnotationRepeatButton
  • addUnderlineTextAnnotationRepeatButton
  • addStrikethroughTextAnnotationRepeatButton
  • addPolygonAnnotationRepeatButton
  • addPolylineAnnotationRepeatButton
  • addFreehandAnnotationRepeatButton
  • logo

These beans have been added in version 4.7.2 for better retro-compatibility. These beans are in the file toppanel-configuration-legacy.xml.

CSS modifications

Icon font

The toppanel icons have been changed. Icons are made with custom font.

Added color variables

The background, icon and hover colors in the toppanel can be changed between light color and dark color with a property:

preference.color.mode=DARK

The DARK value will be for the dark color by default, the LIGHT value will be for the light color and the CUSTOM value allows to use custom colors redefined in a css for the css class named .custom-theme . By default, the CUSTOM value will match the colors defined for the DARK value.

DARK

LIGHT

These color variables are not functional for Internet Explorer.

List of css modifications

Plume Plugin :

Bean idOld CSS classNew CSS class
plumeMenunonestandardButton icon-plugin-plume toppanelButton
plumeButtonnonestandardButton icon-plugin-plume toppanelButton
replyButtonnonestandardButton icon-reply toppanelButton
replyAllButtonnonestandardButton dropdown-MenuButton icon-open-file toppanelButton
forwardButtonnonestandardButton icon-forward toppanelButton

HTML Plugin :

Bean idOld CSS classNew CSS class
htmlPluginMenunonestandardButton icon-plugin-html toppanelButton
viewHtmlButtonnonestandardButton icon-plugin-html toppanelButton
closeHtmlButtonnonestandardButton icon-close toppanelButton

Annotations :

Bean idOld CSS classNew CSS class
annotationMenustandardButton annotationManagerButtonfullHeight annotationMenu
showAllAnnotationsButtonstandardButton hideAnnotationButtonstandardButton icon-hide toppanelButton
showAllAnnotationsAndRotationsButtonstandardButton showAnnotationButtonstandardButton icon-hide toppanelButton
addStickyNoteAnnotationButtonstandardButton addAnnotationButtonstandardButton icon-add-sticky toppanelButton
addHighlightRectangleAnnotationButtonstandardButton rectangleAnnotationButtonstandardButton icon-highlight-area toppanelButton
addFreeTextAnnotationButtonstandardButton freetextAnnotationButtonstandardButton icon-add-free-text toppanelButton
addHighlightTextAnnotationButtonstandardButton highlightAnnotationButtonstandardButton icon-highlight
addUnderlineTextAnnotationButtonstandardButton underlineAnnotationButtonstandardButton icon-underline
addStrikethroughTextAnnotationButtonstandardButton strikethroughAnnotationButtonstandardButton icon-strikethrough
addHighlightCircleAnnotationButtonstandardButton circleAnnotationButtonstandardButton icon-add-circle toppanelButton
addObfuscateAnnotationButtonstandardButton obfuscateButtonstandardButton icon-redact-text
addObfuscateZoneAnnotationButtonstandardButton obfuscateZoneButtonstandardButton icon-redact-area
addArrowAnnotationButtonstandardButton arrowAnnotationButtonstandardButton icon-add-arrow toppanelButton
addPolygonAnnotationButtonstandardButton polygonAnnotationButtonstandardButton icon-add-polygon toppanelButton
addPolylineAnnotationButtonstandardButton polylineAnnotationButtonstandardButton icon-add-multiline toppanelButton
addFreehandAnnotationButtonstandardButton freehandAnnotationButtonstandardButton icon-add-hand-draw toppanelButton
addStampAnnotationButtonstandardButton stampAnnotationButtonstandardButton icon-add-stamp toppanelButton
saveDirtyAnnotationsstandardButton saveAnnotationsButtonstandardButton icon-save toppanelButton
refreshAnnotationstandardButton refreshAnnotationButtonstandardButton icon-refresh-annotations toppanelButton
changeLineHeadstandardButton changeHeadStyleButtonstandardButton icon-head-solid-arrow
changeLineHeadSquarestandardButton squareStyleButtonstandardButton icon-head-square
changeLineHeadCirclestandardButton circleStyleButtonstandardButton icon-head-circle
changeLineHeadButtstandardButton buttStyleButtonstandardButton icon-head-line
changeLineHeadDiamondstandardButton diamondStyleButtonstandardButton icon-head-diamond
changeLineHeadOpenArrowstandardButton openArrowStyleButtonstandardButton icon-head-outline-arrow
changeLineHeadROpenArrowstandardButton rOpenArrowStyleButtonstandardButton icon-head-outline-arrow-invert
changeLineHeadClosedArrowstandardButton closedArrowStyleButtonstandardButton icon-head-solid-arrow
changeLineHeadRClosedArrowstandardButton rClosedArrowStyleButtonstandardButton icon-head-solid-arrow-invert
changeLineHeadNonestandardButton noneStyleButtonstandardButton icon-arrow-none
changeLineTailstandardButton changeTailStyleButtonstandardButton icon-tail-solid-arrow
changeLineTailSquarestandardButton squareStyleButtonstandardButton icon-tail-square
changeLineTailCirclestandardButton circleStyleButtonstandardButton icon-tail-circle
changeLineTailButtstandardButton buttStyleButtonstandardButton icon-tail-line
changeLineTailDiamondstandardButton diamondStyleButtonstandardButton icon-tail-diamond
changeLineTailOpenArrowstandardButton openArrowStyleButtonstandardButton icon-tail-outline-arrow
changeLineTailROpenArrowstandardButton rOpenArrowStyleButtonstandardButton icon-tail-outline-arrow-invert
changeLineTailClosedArrowstandardButton closedArrowStyleButtonstandardButton icon-tail-solid-arrow
changeLineTailRClosedArrowstandardButton rClosedArrowStyleButtonstandardButton icon-tail-solid-arrow-invert
changeLineTailNonestandardButton noneStyleButtonstandardButton icon-arrow-none
Bean idOld property nameOld CSS classNew property nameNew CSS class
showAllAnnotationsButtoninactiveClassNamestandardButton hideAnnotationButtonactiveClassNamestandardButton icon-show toppanelButton showAnnotation
showAllAnnotationsButtonclassNamestandardButton showAnnotationButtonclassNamestandardButton icon-hide toppanelButton
showAllAnnotationsAndRotationsButtoninactiveClassNamestandardButton showAnnotationButtonactiveClassNamestandardButton icon-show toppanelButton showAnnotation
showAllAnnotationsAndRotationsButtonclassNamestandardButton showAnnotationButtonclassNamestandardButton icon-show toppanelButton showAnnotation

Contextual menu :

Bean idOld CSS classNew CSS class
stampActionstandardButton stampAnnotationContextualMenustandardButton icon-add-stamp contextualMenu
freetextActionstandardButton freetextAnnotationContextualMenustandardButton icon-add-free-text contextualMenu
printActionstandardButton printContextualMenustandardButton icon-print contextualMenu
printAllActionstandardButton printContextualMenustandardButton icon-print contextualMenu
rotateLeftActionstandardButton turnLeftContextualMenustandardButton icon-turn-page-left contextualMenu
rotateRightActionstandardButton turnRightContextualMenustandardButton icon-turn-page-right contextualMenu
stickyNoteActionstandardButton addAnnotationContextualMenustandardButton icon-add-sticky contextualMenu
hyperlinkActionstandardButton hyperlinkAnnotationContextualMenustandardButton icon-hyperlinks contextualMenu
cropBoxImageActionstandardButton cropBoxImageContextualMenustandardButton cropBoxImageContextualMenu contextualMenu
highlightTextActionstandardButton highlightAnnotationContextualMenustandardButton icon-highlight contextualMenu
deleteHighLightTextActionstandardButton removeContextualMenustandardButton icon-delete contextualMenu
strikeoutTextActionstandardButton strikethroughAnnotationContextualMenustandardButton icon-strikethrough contextualMenu
underlineTextActionstandardButton underlineAnnotationContextualMenustandardButton icon-underline contextualMenu
highlightActionstandardButton rectangleAnnotationContextualMenustandardButton icon-highlight-area contextualMenu
highlightCircleActionstandardButton circleAnnotationContextualMenustandardButton icon-add-circle contextualMenu
arrowActionstandardButton arrowAnnotationContextualMenustandardButton icon-add-arrow contextualMenu
closeMultiViewActionstandardButton clearContextualMenustandardButton icon-close contextualMenu
addPolygonActionstandardButton polygonAnnotationContextualMenustandardButton icon-add-polygon contextualMenu
addPolylineActionstandardButton polylineAnnotationContextualMenustandardButton icon-add-multiline contextualMenu
addFreehandActionstandardButton freehandAnnotationContextualMenustandardButton icon-add-hand-draw contextualMenu
anchorAnnotationActionstandardButton anchorAnnotationContextualMenustandardButton icon-anchor contextualMenu
copyActionnonestandardButton icon-copy contextualMenu
downloadContextualMenuActionpictreeButton saveDocumentButtonpictreeButton saveDocumentButton contextualMenu
downloadAnnotationsContextualMenuActionpictreeButton saveDocumentWithAnnotationsButtonpictreeButton saveDocumentWithAnnotationsButton contextualMenu
createFirstContextualMenuActionpictreeButton saveDocumentCreateFirstButtonpictreeButton saveDocumentCreateFirstButton contextualMenu
updateFirstContextualMenuActionpictreeButton saveDocumentUpdateFirstButtonpictreeButton saveDocumentUpdateFirstButton contextualMenu
deleteDocumentContextualMenuActionpictreeButton deleteDocumentButtonpictreeButton deleteDocumentButton contextualMenu

Toppanel :

Bean idOld CSS classNew CSS class
documentBuilderButtonstandardButton selectiveCopyButtonstandardButton icon-docbuilder
firstPageButtonstandardButton firstPageButtonstandardButton icon-go-to-first-page noPadding
previousPageButtonstandardButton prevButtonstandardButton icon-go-to-previous-page noPadding
nextPageButtonstandardButton nextButtonstandardButton icon-go-to-next-page noPadding
lastPageButtonstandardButton lastPageButtonstandardButton icon-go-to-last-page noPadding
previousDocumentButtonstandardButton prevButtonstandardButton icon-go-to-previous-page noPadding
nextDocumentButtonstandardButton nextButtonstandardButton icon-go-to-next-page noPadding
fullscreenButtonstandardButton fullScreenButtonstandardButton icon-full-screen toppanelButton
printButtonstandardButton printButtonstandardButton icon-print toppanelButton
printAllButtonstandardButton printButtonstandardButton icon-print toppanelButton
uploadButtonstandardButton fileUploadButtonstandardButton icon-open-file toppanelButton
uploadURLButtonstandardButton urlUploadButtonstandardButton icon-open-url toppanelButton
uploadXFDFButtonstandardButton xfdfUploadButtonstandardButton icon-open-file toppanelButton
downloadButtonstandardButton downloadButtonstandardButton icon-download toppanelButton
downloadRootButtonstandardButton downloadRootButtonstandardButton icon-export-zip toppanelButton
downloadXFDFAnnotationsButtonstandardButton downloadXFDFAnnotationsButtonstandardButton icon-export-with-annotations toppanelButton
downloadAnnotationsCSVButtonstandardButton downloadAnnotationAsCSVButtonstandardButton icon-export-with-annotations toppanelButton
downloadPdfButtonstandardButton downloadPDFButtonstandardButton icon-export-pdf toppanelButton
downloadAllButtonstandardButton downloadAllButtonstandardButton icon-export-pdf toppanelButton
downloadAllSourcesButtonstandardButton downloadAllSourcesButtonstandardButton icon-export-zip toppanelButton
downloadAnnotationsButtonstandardButton downloadAnnotationButtonstandardButton icon-export-with-annotations toppanelButton
downloadWithFDFAnnotationsButtonstandardButton downloadWithFDFAnnotationButtonstandardButton icon-export-with-annotations toppanelButton
downloadFDFAnnotationsButtonstandardButton downloadFDFAnnotationButtonstandardButton icon-export-with-annotations toppanelButton
downloadWithCompareButtonstandardButton downloadCompareButtonstandardButton icon-download-comparison
rotateLeftstandardButton turnLeftButtonstandardButton icon-turn-page-left toppanelButton
rotateAllLeftstandardButton turnAllLeftButtonstandardButton icon-turn-all-pages-left
rotateAllRightstandardButton turnAllRightButtonstandardButton icon-turn-all-pages-right
rotateRightstandardButton turnRightButtonstandardButton icon-turn-page-right toppanelButton
rotateResetstandardButton resetRotationButtonstandardButton icon-reset-rotation
zoomFullWidthstandardButton zoomFullWidthButtonstandardButton icon-fit-to-width-size toppanelButton
zoomFullHeightstandardButton zoomFullHeightButtonstandardButton icon-fit-to-height-size toppanelButton
zoomFullPagestandardButton zoomFullPageButtonstandardButton icon-fit-to-page toppanelButton
zoomInstandardButton zoomInButtonstandardButton icon-minus
zoomInZonestandardButton zoomInZoneButtonstandardButton icon-zoom-in-area toppanelButton
zoomInZoneGlassstandardButton zoomInZoneGlassButtonstandardButton icon-zoom-in-area-new-window toppanelButton
zoomOutstandardButton zoomOutButtonstandardButton icon-plus
cropBoxButtonstandardButton cropBoxImagestandardButton icon-screenshot
previousButtonstandardButton prevButtonstandardButton icon-go-to-previous-page
synchronizeScrollButtonstandardButton synchronizeDocumentScrollingButtonstandardButton icon-sync-scroll
nextButtonstandardButton nextButtonstandardButton icon-go-to-next-page
moreButtonstandardButton showMoreButtonstandardButton icon-ellipsis
menuButtonnone estandardButton icon-list-view

List of CSS removed

  • topPanelSubMenu:BEFORE
  • topPanelActivableButton
  • topPanelActivatedButton