Forms Resizer Documentation: Full Version
Forms Resizer Documentation: Full Version
Forms Resizer Documentation: Full Version
Full Version
Content
Presentation..........................................................................................3
Installation............................................................................................4
Forms module process............................................................................6
Adjusting object properties....................................................................10
Form properties.................................................................................11
Canvas properties..............................................................................12
Block properties................................................................................14
Item properties.................................................................................17
Visual Attribute properties..................................................................22
Alert properties.................................................................................24
Window properties.............................................................................25
Rebuild the Java project.........................................................................27
Warnings and recommandations.............................................................28
Presentation
Purpose
The Forms Resizer tool allows the Oracle Forms developer to give a new
size to the Forms modules, in order to adapt the application to a new
screen resolution/size.
It uses a JDAPI program that scans the Forms modules, then adjust the
size and location of any object that could be displayed.
That JDAPI program requires a description file that gives indication about
what to do at process time.
In that file, you give the current and target resolution, but you can also
change many properties on existing objects.
How it works
• resizer.xml
• FormsResizer.jar
• FormsResizer.bat
• FormsResizer.pdf
• resizer_test.fmb
For instance, say that your JRE is located in the c:/Java/jre1.6, and Forms
is installed in the c:/devsuite folder, and the resizer.xml file is located in the
current folder, change the batch content to the following:
<file>
<!-- --------------------------------- -->
<!-- general configuration information -->
<!-- --------------------------------- -->
<configuration>
<backup_directory>./</backup_directory>
<target_directory>./</target_directory>
<module_list>
<name>resizer_test.fmb</name>
</module_list>
<log_file_name>resizer.log</log_file_name>
<backup_ext>_bak</backup_ext>
<new_ext>_new</new_ext>
<log_detail>true</log_detail>
<connection_string>user/pwd@XE</connection_string>
<compile_module>false</compile_module>
<comment>module modified by FormsResizer on :SYSDATE</comment>
<libraries_case>to_lower_case</libraries_case>
<source_resolution>800,600</source_resolution>
<target_resolution>1024,800</target_resolution>
<replace_Set_Item_Property>true</replace_Set_Item_Property>
</configuration>
<!-- ---------------------- -->
<!-- properties for modules -->
<!-- ---------------------- -->
<properties>
<form>
<set><property>setComment</property><value>new comment</value></set>
<set><property>setTitle</property><value>Resizer title</value></set>
</form>
<blocks>
<set><property>setComment</property><value>new block comment</value></set>
</blocks>
<items>
<set><type>PushButton</type><property>setFontName</property><value>Courier</value></set>
<set><property>setForegroundColor</property><value>r250g250b250</value></set>
<set><property>setBackColor</property><value>r10g10b10</value></set>
</items>
</properties>
</file>
<backup_directory>
Name of the directory used to backup a copy of the source file.
If left empty, the backup copy is created in the current directory.
Default value : none
<target_directory>
Name of the directory used to create the converted source file.
If left empty, the new file is created in the current directory.
Default value : none
<module_list>
Full filename to the Forms source file (.fmb) to convert.
This can also be a directory, so that all files inside that has the .fmb extension
will be converted.
<log_file_name>
full filename to the log file created by the last conversion process.
default is : magnifier.log
<backup_ext>
extension add to the backup copy.
Default value : _bak
<new_ext>
extension add to the converted source file.
If left blank, the source file is replaced by the new one.
Default value : none
<connection_string>
The full connexion used to compile the modules
<trace_file>
Full name of the trace file created if the <trace> property is set to true.
Default value : magnifier.trc
<source_resolution>
Resolution, given in pixel (width,height), of the current Forms module.
<target_resolution>
Final resolution, given in pixel (width,height), of the new Forms module.
<font_factor>
Value, in percentage, to scale the font size of Text Items and List Items.
Default value : 1.0
If you want to increase the Forms application size, but also allow the user to
see more characters in the Text and List Items, put a value less than 1. For
instance, 0.5 will divide the Font size by 2.
<replace_Set_Item_Property>
If set to true, the PL/SQL code located in the Forms module is scanned, trying
to adjust the value of any Set_Item_Property() built-in that deals with location
or size. If the position or size is given with a hard-coded value, the conversion
is immediately done to adjust them, otherwise (the value is passed via a
variable), a message is raised on the console and log file, to tell that the built-in
has to be adjusted manually.
Adjusting object properties
Some properties can be adjusted during the process, via the XML file
tags.
A first tag indicates the Object type, for instance <items>. It can include
as many <set> tags required to do the adjustment. You need one <set>
tag for every different property.
<items>
<set>
<type>PushButton</type>
<property>setFontName</property>
<value>Courier</value>
</set>
<set>
<property>setForegroundColor</property>
<value>r250g250b250</value>
</set>
<set>
<property>setBackColor</property>
<value>r10g10b10</value>
</set>
</items>
Here is the list of the objects you can modify the properties:
• Form
• Canvas
• Block
• Item
• Visual Attribute
• Alert
• Window
Form properties
<form>
<set><property>property_name</property><value>value</value></set>
<set>...</set>
</form>
Char properties:
• setComment
• setConsoleWindow
• setFirstNavigationBlockName
• setHelpBookTitle
• setHorizontalToolbarCanvas
• setInitializeMenu
• setMenuModule
• setMenuRole
• setName
• setRecordVisualAttributeGroupName
• setTitle
• setVerticalToolbarCanvas
Boolean properties:
• setUse3dControls
Integer properties:
• setInteractionMode
• setIsolationMode
• setLanguageDirection
• setMaximumQueryTime
• setMaximumRecordsFetched
• setMouseNavigationLimit
• setNewdeferReqEnf
• setRuntimeComp
• setValidationUnit
Canvas properties
<canvases>
<set>
<name>canvas_name</name> (not mandatory)
<property>property_name</property>
<value>value</value>
</set>
<set>...</set>
</canvases>
Char properties:
• setBackColor
• setComment
• setFillPattern
• setFontName
• setForegroundColor
• setHelpBookTopic
• setName
• setParentFilename
• setParentFilepath
• setParentModule
• setParentName
• setPopupMenuName
• setVisualAttributeName
• setWindowName
Boolean properties:
• setRaiseOnEnter
• setShowHorizontalScrollbar
• setShowVerticalScrollbar
• setSubclassObjectGroup
• setVisible
Integer properties:
• setBevel
• setCanvasType
• setFontSize
• setFontSpacing
• setFontStyle
• setFontWeight
• setHeight
• setLanguageDirection
• setParentModuleType
• setParentType
• setTabActionStyle
• setTabAttachmentEdge
• setTabStyle
• setTabWidthStyle
• setViewportHeight
• setViewportWidth
• setViewportXPosition
• setViewportXPositionOnCanvas
• setViewportYPosition
• setViewportYPositionOnCanvas
• setWidth
Block properties
<blocks>
<set>
<name>block_name</name> (not mandatory)
<property>property_name</property>
<value>value</value>
</set>
<set>...</set>
</blocks>
Char properties:
• setAlias
• setBackColor
• setComment
• setDeleteProcedureName
• setDMLDataName
• setFillPattern
• setForegroundColor
• setInsertProcedureName
• setLockProcedureName
• setName
• setNextNavigationBlockName
• setOptionHint
• setOrderByClause
• setParentFilename
• setParentFilepath
• setParentModule
• setParentName
• setPreviousNavigationBlockName
• setQueryDataSourceName
• setRecordVisualAttributeGroupName
• setScrollbarCanvasName
• setScrollbarTabPageName
• setUpdateProcedureName
• setVisualAttributeName
• setWhereClause
Boolean properties:
• setDatabaseBlock
• setDeleteAllowed
• setDMLReturnValue
• setEnforcedColumnSecurity
• setEnforcedPrimaryKey
• setIncludeRefitem
• setInsertAllowed
• setPrecompSummary
• setQueryAllowed
• setQueryAllRecords
• setReverseDirection
• setSingleRecord
• setSubclassObjectGroup
• setUpdateAllowed
• setUpdateChangedColumns
Integer properties:
• setDMLDataType
• setKeyMode
• setLanguageDirection
• setLockMode
• setMaximumQueryTime
• setMaximumRecordsFetched
• setNavigationStyle
• setParentModuleType
• setParentType
• setQueryDataSourceType
• setRecordOrientation
• setRecordsBufferedCount
• setRecordsDisplayCount
• setRecordsFetchedCount
• setScrollbarLength
• setScrollbarOrientation
• setScrollbarWidth
• setScrollbarXPosition
• setScrollbarYPosition
Item properties
<items>
<set>
<type>item_type</type> (not mandatory)
<name>item_name</name> (not mandatory)
<property>property_name</property>
<value>value</value></set>
<set>...</set>
</items>
The <type> tag (that is not mandatory) can be provided to filter the type of Items you
want to change the property.
It can be one of the following:
• all
• BeanArea
• Chart
• CheckBox
• DisplayItem
• Tree
• Image
• List
• PushButton
• RadioButton
• TextItem
For example, if you want to change the text color of PushButtons only, set the tags like
the following:
<set>
<type>PushButton</type>
<property>setForegroundColor</property>
<value>r200g25b25</value></set>
<set>...</set>
The <name> tag (that is not mandatory) can be provided to filter the exact Item you
want to change the property.
Char properties:
• setAccessKey
• setBackColor
• setCanvasName
• setCheckedValue
• setColumnName
• setComment
• setCopyValueFromItem
• setDataSourceBlock
• setEditName
• setFilename
• setFillPattern
• setFontName
• setForegroundColor
• setFormatMask
• setFormula
• setHelpBookTopic
• setHighestAllowedValue
• setHint
• setIconFilename
• setImplementationClass
• setInitializeValue
• setLabel
• setLovName
• setLowestAllowedValue
• setName
• setNextNavigationItemName
• setOtherValues
• setPopupMenuName
• setPreviousNavigationItemName
• setPrompt
• setPromptBackColor
• setPromptFillPattern
• setPromptFontName
• setPromptForegroundColor
• setPromptVisualAttributeName
• setRecordGroupName
• setRecordVisualAttributeGroupName
• setSummaryBlockName
• setSummaryItemName
• setSynchronizedItemName
• setTabPageName
• setTooltip
• setTooltipVisualAttributeGroup
• setTreeDataQuery
• setUncheckedValue
• setVisualAttributeName
Boolean properties:
• setAutoHint
• setAutoSkip
• setCaseInsensitiveQuery
• setConcealData
• setDatabaseItem
• setDefaultButton
• setDirtyInfo
• setEnabled
• setFixedLength
• setIconic
• setInsertAllowed
• setKeepCursorPosition
• setKeyboardNavigable
• setLockRecord
• setMouseNavigate
• setMultiLine
• setPrimaryKey
• setQueryAllowed
• setQueryOnly
• setRendered
• setRequired
• setShowFastForward
• setShowHorizontalScrollbar
• setShowPlay
• setShowRecord
• setShowRewind
• setShowSlider
• setShowTime
• setShowVerticalScrollbar
• setShowVolume
• setTreeAllowEmpBranch
• setTreeMultiSelect
• setTreeShowLines
• setTreeShowSymbol
• setUpdateAllowed
• setUpdateCommit
• setUpdateIfNull
• setUpdateQuery
• setValidateFromList
• setVisible
Integer properties:
• setBevel
• setCalculateMode
• setCaseRestriction
• setCheckBoxOtherValues
• setCommMode
• setCompress
• setCompressionQuality
• setDataLengthSemantics
• setDataType
• setDisplayQuality
• setDistanceBetweenRecords
• setEditXPosition
• setEditYPosition
• setExecuteMode
• setFontSize
• setFontSpacing
• setFontStyle
• setFontWeight
• setHeight
• setImageDepth
• setImageFormat
• setInitializeKeyboardDirection
• setItemsDisplay
• setItemType
• setJustification
• setKeyboardState
• setLanguageDirection
• setListStyle
• setLovXPosition
• setLovYPosition
• setMaximumLength
• setPromptAlign
• setPromptAlignOffset
• setPromptAttachmentEdge
• setPromptAttachmentOffset
• setPromptDisplayStyle
• setPromptFontSize
• setPromptFontSpacing
• setPromptFontStyle
• setPromptFontWeight
• setPromptJustification
• setPromptReadingOrder
• setQueryLength
• setReadingOrder
• setSizingStyle
• setSoundFormat
• setSoundQuality
• setSummaryFunction
• setWidth
• setWrapStyle
• setXPosition
• setYPosition
Visual Attribute properties
<visual_attributes>
<set>
<name>visual_attribute_name</name> (not mandatory)
<property>property_name</property>
<value>value</value>
</set>
<set>...</set>
</visual_attributes>
Char properties:
• setBackColor
• setComment
• setFillPattern
• setFontName
• setForegroundColor
• setFrameTitleBackColor
• setFrameTitleFillPattern
• setFrameTitleFontName
• setFrameTitleForegroundColor
• setName
• setPromptBackColor
• setPromptFillPattern
• setPromptFontName
• setPromptForegroundColor
• setFontSize
• setFontSpacing
• setFontStyle
• setFontWeight
• setFrameTitleFontSize
• setFrameTitleFontSpacing
• setFrameTitleFontStyle
• setFrameTitleFontWeight
• setPromptFontSize
• setPromptFontSpacing
• setPromptFontStyle
• setPromptFontWeight
• setVisualAttributeType
Alert properties
<alerts>
<set>
<name>alert_name</name> (not mandatory)
<property>property_name</property>
<value>value</value>
</set>
<set>...</set>
</alerts>
Char properties:
• setAlertMessage
• setBackColor
• setButton1Label
• setButton2Label
• setButton3Label
• setComment
• setFillPattern
• setFontName
• setForegroundColor
• setName
• setTitle
• setVisualAttributeName
Boolean properties:
• setSubclassObjectGroup
Integer properties:
• setAlertStyle
• setDefaultAlertButton
• setFontSize
• setFontSpacing
• setFontStyle
• setFontWeight
• setLanguageDirection
Window properties
<windows>
<set>
<name>window_name</name> (not mandatory)
<property>property_name</property>
<value>value</value>
</set>
<set>...</set>
</windows>
Char properties:
• setBackColor
• setComment
• setFillPattern
• setFontName
• setForegroundColor
• setHelpBookTopic
• setHorizontalToolbar
• setIconFilename
• setMinimizeTitle
• setName
• setParentFilename
• setParentFilepath
• setParentModule
• setParentName
• setPrimaryCanvas
• setTitle
• setVerticalToolbarCanvasName
• setVisualAttributeName
Boolean properties:
• setClearAllowed
• setHideOnExit
• setInheritMenu
• setMaximizeAllowed
• setMinimizeAllowed
• setModal
• setMoveAllowed
• setResizeAllowed
• setShowHorizontalScrollbar
• setShowVerticalScrollbar
• setSubclassObjectGroup
Integer properties:
• setBevel
• setFontSize
• setFontSpacing
• setFontStyle
• setFontWeight
• setHeight
• setLanguageDirection
• setParentModuleType
• setParentType
• setWidth
• setWindowStyle
• setXPosition
• setYPosition
Rebuild the Java project
The conversion is done via the methods of the main class: Resizer.java
Warnings and recommandations
The Forms Resizer is free to use, modify and use in any development
and production applications.
There is no licence at all attached to that tool. I give it to the community
without any restriction.
Just keep in mind that I won't give any maintenance version of the tool and
will never continue to support that product in any way. So do not send me any
request concerning the questions or bugs you will find. It is, now, your
responsibility to play and work with it :)
Forms Resizer - 2011
Created and maintained by Francois Degrelle