You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Merged revisions 636400-636405,636407-638388 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@638396 13f79535-47bb-0310-9956-ffa450edef68
преди 16 години
Merged revisions 636400-636405,636407-638388 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@638396 13f79535-47bb-0310-9956-ffa450edef68
преди 16 години
Merged revisions 636400-636405,636407-638388 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@638396 13f79535-47bb-0310-9956-ffa450edef68
преди 16 години
Merged revisions 636400-636405,636407-638388 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@638396 13f79535-47bb-0310-9956-ffa450edef68
преди 16 години
PropertyCache phase 2: * improvement of the PropertyCache itself should guarantee acceptable performance of the static caches in multi-session environments, which is a possible problem with synchronizedMap * changed CommonFont to use the cache: added CachedCommonFont to contain the properties that are always cacheable CommonFont itself is only cached if the remaining properties are absolutes * changed CommonHyphenation, KeepProperty, ColorProperty and FontFamilyProperty to use the cache Facilitate the implementation for font-selection-strategy: * Changed FontInfo.fontLookup to always return an array of FontTriplet * Changed CommonFont.getFontState to return an array of FontTriplet * Initial modifications to the related LMs: initialized with the font corresponding to the first of the triplets This line, and those below, will be ignored-- M src/java/org/apache/fop/render/rtf/TextAttributesConverter.java M src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java M src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java M src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java M src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java M src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java M src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java M src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java M src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java M src/java/org/apache/fop/fonts/FontInfo.java M src/java/org/apache/fop/fo/properties/CommonHyphenation.java M src/java/org/apache/fop/fo/properties/CommonAccessibility.java M src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java M src/java/org/apache/fop/fo/properties/FontFamilyProperty.java M src/java/org/apache/fop/fo/properties/FixedLength.java M src/java/org/apache/fop/fo/properties/PropertyCache.java M src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java M src/java/org/apache/fop/fo/properties/CommonFont.java M src/java/org/apache/fop/fo/properties/ColorProperty.java M src/java/org/apache/fop/fo/properties/KeepProperty.java M src/java/org/apache/fop/fo/PropertyList.java M src/java/org/apache/fop/fo/FOPropertyMapping.java M src/java/org/apache/fop/fo/expr/PropertyParser.java M src/java/org/apache/fop/fo/expr/ICCColorFunction.java M src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java M src/java/org/apache/fop/fo/expr/RGBColorFunction.java M src/java/org/apache/fop/fo/expr/SystemColorFunction.java M status.xml git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@578311 13f79535-47bb-0310-9956-ffa450edef68
преди 16 години
Merged revisions 636400-636405,636407-638388 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@638396 13f79535-47bb-0310-9956-ffa450edef68
преди 16 години
Merged revisions 636400-636405,636407-638388 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@638396 13f79535-47bb-0310-9956-ffa450edef68
преди 16 години
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.fo;
  19. import java.util.HashMap;
  20. import java.util.Map;
  21. import org.apache.fop.apps.FOUserAgent;
  22. import org.apache.fop.datatypes.LengthBase;
  23. import org.apache.fop.fo.expr.PropertyException;
  24. import org.apache.fop.fo.flow.table.TableFObj.ColumnNumberPropertyMaker;
  25. import org.apache.fop.fo.pagination.Flow;
  26. import org.apache.fop.fo.properties.BackgroundPositionShorthand;
  27. import org.apache.fop.fo.properties.BorderSpacingShorthandParser;
  28. import org.apache.fop.fo.properties.BorderWidthPropertyMaker;
  29. import org.apache.fop.fo.properties.BoxPropShorthandParser;
  30. import org.apache.fop.fo.properties.CharacterProperty;
  31. import org.apache.fop.fo.properties.ColorProperty;
  32. import org.apache.fop.fo.properties.CondLengthProperty;
  33. import org.apache.fop.fo.properties.CorrespondingPropertyMaker;
  34. import org.apache.fop.fo.properties.DimensionPropertyMaker;
  35. import org.apache.fop.fo.properties.EnumProperty;
  36. import org.apache.fop.fo.properties.FontFamilyProperty;
  37. import org.apache.fop.fo.properties.FontShorthandParser;
  38. import org.apache.fop.fo.properties.FontShorthandProperty;
  39. import org.apache.fop.fo.properties.FontSizePropertyMaker;
  40. import org.apache.fop.fo.properties.FontStretchPropertyMaker;
  41. import org.apache.fop.fo.properties.FontWeightPropertyMaker;
  42. import org.apache.fop.fo.properties.GenericShorthandParser;
  43. import org.apache.fop.fo.properties.IndentPropertyMaker;
  44. import org.apache.fop.fo.properties.KeepProperty;
  45. import org.apache.fop.fo.properties.LengthPairProperty;
  46. import org.apache.fop.fo.properties.LengthProperty;
  47. import org.apache.fop.fo.properties.LengthRangeProperty;
  48. import org.apache.fop.fo.properties.LineHeightPropertyMaker;
  49. import org.apache.fop.fo.properties.ListProperty;
  50. import org.apache.fop.fo.properties.NumberProperty;
  51. import org.apache.fop.fo.properties.PageBreakShorthandParser;
  52. import org.apache.fop.fo.properties.PageDimensionMaker;
  53. import org.apache.fop.fo.properties.PositionShorthandParser;
  54. import org.apache.fop.fo.properties.Property;
  55. import org.apache.fop.fo.properties.PropertyMaker;
  56. import org.apache.fop.fo.properties.ReferenceOrientationMaker;
  57. import org.apache.fop.fo.properties.SpaceProperty;
  58. import org.apache.fop.fo.properties.SpacePropertyMaker;
  59. import org.apache.fop.fo.properties.SpacingPropertyMaker;
  60. import org.apache.fop.fo.properties.StringProperty;
  61. import org.apache.fop.fo.properties.TableBorderPrecedence;
  62. import org.apache.fop.fo.properties.TextDecorationMaker;
  63. import org.apache.fop.fo.properties.ToBeImplementedProperty;
  64. import org.apache.fop.fo.properties.URIProperty;
  65. import org.apache.fop.fo.properties.VerticalAlignShorthandParser;
  66. import org.apache.fop.fo.properties.WhiteSpaceShorthandParser;
  67. import org.apache.fop.fo.properties.XMLLangShorthandParser;
  68. /**
  69. * This class creates and returns an array of Property.Maker instances
  70. * indexed by the PR_* propId from Constants.java.
  71. *
  72. * TODO Check multi-threading safety of the statics below
  73. */
  74. public final class FOPropertyMapping implements Constants {
  75. private FOPropertyMapping() {
  76. }
  77. private static Map<String, Integer> propNames = new HashMap<String, Integer>();
  78. private static Map<String, Integer> subPropNames = new HashMap<String, Integer>();
  79. private static Map<Integer, String> propIds = new HashMap<Integer, String>();
  80. private static PropertyMaker[] generics = null;
  81. // The rest is only used during the building of the generics array.
  82. private Property[] enums = null;
  83. private PropertyMaker genericColor = null;
  84. private PropertyMaker genericBoolean = null;
  85. private PropertyMaker genericKeep = null;
  86. private PropertyMaker genericCondLength = null;
  87. private PropertyMaker genericCondPadding = null;
  88. private PropertyMaker genericPadding = null;
  89. private PropertyMaker genericCondBorderWidth = null;
  90. private PropertyMaker genericBorderWidth = null;
  91. private PropertyMaker genericBorderStyle = null;
  92. private PropertyMaker genericBreak = null;
  93. private PropertyMaker genericSpace = null;
  94. /**
  95. * Create the generic property maker templates. These templates
  96. * are used be the actual makers as a parameter to .useGeneric(...).
  97. */
  98. private void createGenerics() {
  99. PropertyMaker sub;
  100. genericColor = new ColorProperty.Maker(0);
  101. // GenericBoolean
  102. genericBoolean = new EnumProperty.Maker(0);
  103. genericBoolean.addEnum("true", getEnumProperty(EN_TRUE, "TRUE"));
  104. genericBoolean.addEnum("false", getEnumProperty(EN_FALSE, "FALSE"));
  105. // GenericKeep
  106. genericKeep = new KeepProperty.Maker(0);
  107. sub = new NumberProperty.Maker(CP_WITHIN_PAGE);
  108. sub.setByShorthand(true);
  109. sub.setDefault("auto");
  110. sub.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  111. sub.addEnum("always", getEnumProperty(EN_ALWAYS, "ALWAYS"));
  112. genericKeep.addSubpropMaker(sub);
  113. sub = new NumberProperty.Maker(CP_WITHIN_LINE);
  114. sub.setByShorthand(true);
  115. sub.setDefault("auto");
  116. sub.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  117. sub.addEnum("always", getEnumProperty(EN_ALWAYS, "ALWAYS"));
  118. genericKeep.addSubpropMaker(sub);
  119. sub = new NumberProperty.Maker(CP_WITHIN_COLUMN);
  120. sub.setByShorthand(true);
  121. sub.setDefault("auto");
  122. sub.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  123. sub.addEnum("always", getEnumProperty(EN_ALWAYS, "ALWAYS"));
  124. genericKeep.addSubpropMaker(sub);
  125. // GenericCondLength
  126. genericCondLength = new CondLengthProperty.Maker(0);
  127. sub = new LengthProperty.Maker(CP_LENGTH);
  128. sub.setByShorthand(true);
  129. genericCondLength.addSubpropMaker(sub);
  130. sub = new EnumProperty.Maker(CP_CONDITIONALITY);
  131. sub.addEnum("discard", getEnumProperty(EN_DISCARD, "DISCARD"));
  132. sub.addEnum("retain", getEnumProperty(EN_RETAIN, "RETAIN"));
  133. genericCondLength.addSubpropMaker(sub);
  134. // GenericCondPadding
  135. genericCondPadding = new CondLengthProperty.Maker(0);
  136. genericCondPadding.useGeneric(genericCondLength);
  137. genericCondPadding.setInherited(false);
  138. genericCondPadding.getSubpropMaker(CP_LENGTH).setDefault("0pt");
  139. genericCondPadding.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  140. // GenericPadding
  141. genericPadding = new LengthProperty.Maker(0);
  142. genericPadding.setInherited(false);
  143. genericPadding.setDefault("0pt");
  144. genericPadding.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  145. genericPadding.addShorthand(generics[PR_PADDING]);
  146. // GenericCondBorderWidth
  147. genericCondBorderWidth = new CondLengthProperty.Maker(0);
  148. genericCondBorderWidth.setInherited(false);
  149. genericCondBorderWidth.addKeyword("thin", "0.5pt");
  150. genericCondBorderWidth.addKeyword("medium", "1pt");
  151. genericCondBorderWidth.addKeyword("thick", "2pt");
  152. sub = new LengthProperty.Maker(CP_LENGTH);
  153. sub.setByShorthand(true);
  154. sub.addKeyword("thin", "0.5pt");
  155. sub.addKeyword("medium", "1pt");
  156. sub.addKeyword("thick", "2pt");
  157. sub.setDefault("medium");
  158. genericCondBorderWidth.addSubpropMaker(sub);
  159. sub = new EnumProperty.Maker(CP_CONDITIONALITY);
  160. sub.addEnum("discard", getEnumProperty(EN_DISCARD, "DISCARD"));
  161. sub.addEnum("retain", getEnumProperty(EN_RETAIN, "RETAIN"));
  162. genericCondBorderWidth.addSubpropMaker(sub);
  163. // GenericBorderWidth
  164. genericBorderWidth = new LengthProperty.Maker(0);
  165. genericBorderWidth.setInherited(false);
  166. genericBorderWidth.addKeyword("thin", "0.5pt");
  167. genericBorderWidth.addKeyword("medium", "1pt");
  168. genericBorderWidth.addKeyword("thick", "2pt");
  169. genericBorderWidth.setDefault("medium");
  170. // GenericBorderStyle
  171. genericBorderStyle = new EnumProperty.Maker(0);
  172. genericBorderStyle.setInherited(false);
  173. genericBorderStyle.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  174. genericBorderStyle.addEnum("hidden", getEnumProperty(EN_HIDDEN, "HIDDEN"));
  175. genericBorderStyle.addEnum("dotted", getEnumProperty(EN_DOTTED, "DOTTED"));
  176. genericBorderStyle.addEnum("dashed", getEnumProperty(EN_DASHED, "DASHED"));
  177. genericBorderStyle.addEnum("solid", getEnumProperty(EN_SOLID, "SOLID"));
  178. genericBorderStyle.addEnum("double", getEnumProperty(EN_DOUBLE, "DOUBLE"));
  179. genericBorderStyle.addEnum("groove", getEnumProperty(EN_GROOVE, "GROOVE"));
  180. genericBorderStyle.addEnum("ridge", getEnumProperty(EN_RIDGE, "RIDGE"));
  181. genericBorderStyle.addEnum("inset", getEnumProperty(EN_INSET, "INSET"));
  182. genericBorderStyle.addEnum("outset", getEnumProperty(EN_OUTSET, "OUTSET"));
  183. genericBorderStyle.setDefault("none");
  184. // GenericBreak
  185. genericBreak = new EnumProperty.Maker(0);
  186. genericBreak.setInherited(false);
  187. genericBreak.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  188. genericBreak.addEnum("column", getEnumProperty(EN_COLUMN, "COLUMN"));
  189. genericBreak.addEnum("page", getEnumProperty(EN_PAGE, "PAGE"));
  190. genericBreak.addEnum("even-page", getEnumProperty(EN_EVEN_PAGE, "EVEN_PAGE"));
  191. genericBreak.addEnum("odd-page", getEnumProperty(EN_ODD_PAGE, "ODD_PAGE"));
  192. genericBreak.setDefault("auto");
  193. // GenericSpace
  194. genericSpace = new SpaceProperty.Maker(0);
  195. genericSpace.setInherited(false);
  196. sub = new LengthProperty.Maker(CP_MINIMUM);
  197. sub.setDefault("0pt");
  198. sub.setByShorthand(true);
  199. genericSpace.addSubpropMaker(sub);
  200. sub = new LengthProperty.Maker(CP_OPTIMUM);
  201. sub.setDefault("0pt");
  202. sub.setByShorthand(true);
  203. genericSpace.addSubpropMaker(sub);
  204. sub = new LengthProperty.Maker(CP_MAXIMUM);
  205. sub.setDefault("0pt");
  206. sub.setByShorthand(true);
  207. genericSpace.addSubpropMaker(sub);
  208. sub = new NumberProperty.Maker(CP_PRECEDENCE);
  209. sub.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
  210. sub.setDefault("0");
  211. genericSpace.addSubpropMaker(sub);
  212. sub = new EnumProperty.Maker(CP_CONDITIONALITY);
  213. sub.addEnum("discard", getEnumProperty(EN_DISCARD, "DISCARD"));
  214. sub.addEnum("retain", getEnumProperty(EN_RETAIN, "RETAIN"));
  215. sub.setDefault("discard");
  216. genericSpace.addSubpropMaker(sub);
  217. }
  218. /**
  219. * Add a property maker to the generics array.
  220. * Also creates the name <-> id mapping in propNames and propIds.
  221. *
  222. * @param name the name of the property maker.
  223. * @param maker the maker.
  224. */
  225. private static void addPropertyMaker(String name, PropertyMaker maker) {
  226. generics[maker.getPropId()] = maker;
  227. propNames.put(name, maker.getPropId());
  228. propIds.put(maker.getPropId(), name);
  229. }
  230. /**
  231. * Create the name<->id mapping for the subproperty names.
  232. * @param name name of the subproperty.
  233. * @param id Id for the subproperty from CP_* in Constants.java.
  234. */
  235. private static void addSubpropMakerName(String name, int id) {
  236. subPropNames.put(name, id);
  237. propIds.put(id, name);
  238. }
  239. /**
  240. * Return a (possibly cached) enum property based in the enum value.
  241. * @param enumValue A enum value from Constants.java.
  242. * @param text the text value by which this enum property is known
  243. * @return An EnumProperty instance.
  244. */
  245. private Property getEnumProperty(int enumValue, String text) {
  246. if (enums == null) {
  247. enums = new Property[ENUM_COUNT + 1];
  248. }
  249. if (enums[enumValue] == null) {
  250. enums[enumValue] = EnumProperty.getInstance(enumValue, text);
  251. }
  252. return enums[enumValue];
  253. }
  254. /**
  255. * Return the array of Makers.
  256. * @return the maker array.
  257. */
  258. public static PropertyMaker[] getGenericMappings() {
  259. if (generics == null) {
  260. /* this method was never called before */
  261. generics = new PropertyMaker[PROPERTY_COUNT + 1];
  262. FOPropertyMapping gp = new FOPropertyMapping();
  263. /* Create the shorthand first. They are
  264. * referenced by the real properties.
  265. */
  266. gp.createShorthandProperties();
  267. gp.createGenerics();
  268. gp.createAccessibilityProperties();
  269. gp.createAbsolutePositionProperties();
  270. gp.createAuralProperties();
  271. gp.createBorderPaddingBackgroundProperties();
  272. gp.createFontProperties();
  273. gp.createHyphenationProperties();
  274. gp.createMarginBlockProperties();
  275. gp.createMarginInlineProperties();
  276. gp.createRelativePosProperties();
  277. gp.createAreaAlignmentProperties();
  278. gp.createAreaDimensionProperties();
  279. gp.createBlockAndLineProperties();
  280. gp.createCharacterProperties();
  281. gp.createColorProperties();
  282. gp.createFloatProperties();
  283. gp.createKeepsAndBreaksProperties();
  284. gp.createLayoutProperties();
  285. gp.createLeaderAndRuleProperties();
  286. gp.createDynamicProperties();
  287. gp.createMarkersProperties();
  288. gp.createNumberToStringProperties();
  289. gp.createPaginationAndLayoutProperties();
  290. gp.createTableProperties();
  291. gp.createWritingModeProperties();
  292. gp.createMiscProperties();
  293. // Hardcode the subproperties.
  294. addSubpropMakerName("length", CP_LENGTH);
  295. addSubpropMakerName("conditionality", CP_CONDITIONALITY);
  296. addSubpropMakerName("block-progression-direction", CP_BLOCK_PROGRESSION_DIRECTION);
  297. addSubpropMakerName("inline-progression-direction", CP_INLINE_PROGRESSION_DIRECTION);
  298. addSubpropMakerName("within-line", CP_WITHIN_LINE);
  299. addSubpropMakerName("within-column", CP_WITHIN_COLUMN);
  300. addSubpropMakerName("within-page", CP_WITHIN_PAGE);
  301. addSubpropMakerName("minimum", CP_MINIMUM);
  302. addSubpropMakerName("maximum", CP_MAXIMUM);
  303. addSubpropMakerName("optimum", CP_OPTIMUM);
  304. addSubpropMakerName("precedence", CP_PRECEDENCE);
  305. }
  306. return generics;
  307. }
  308. /**
  309. * Return the propId for a property name.
  310. * @param name the property name
  311. * @return a propId that matches the property name.
  312. */
  313. public static int getPropertyId(String name) {
  314. if (name != null) {
  315. Integer i = propNames.get(name);
  316. if (i != null) {
  317. return i;
  318. }
  319. }
  320. return -1;
  321. }
  322. /**
  323. * Return the subpropId for a subproperty name.
  324. * @param name the subproperty name.
  325. * @return a subpropId that matches the subproperty name.
  326. */
  327. public static int getSubPropertyId(String name) {
  328. if (name != null) {
  329. Integer i = subPropNames.get(name);
  330. if (i != null) {
  331. return i;
  332. }
  333. }
  334. return -1;
  335. }
  336. /**
  337. * Returns the property name corresponding to the PR_* id
  338. * @param id the property id in Constants
  339. * @return the property name
  340. */
  341. public static String getPropertyName(int id) {
  342. if (((id & Constants.COMPOUND_MASK) == 0)
  343. || ((id & Constants.PROPERTY_MASK) == 0)) {
  344. return propIds.get(id);
  345. } else {
  346. return propIds.get(id & Constants.PROPERTY_MASK)
  347. + "." + propIds.get(id & Constants.COMPOUND_MASK);
  348. }
  349. }
  350. private void createAccessibilityProperties() {
  351. PropertyMaker m;
  352. // source-document
  353. m = new StringProperty.Maker(PR_SOURCE_DOCUMENT);
  354. m.setInherited(false);
  355. m.setDefault("none");
  356. addPropertyMaker("source-document", m);
  357. // role
  358. m = new StringProperty.Maker(PR_ROLE);
  359. m.setInherited(false);
  360. m.setDefault("none");
  361. addPropertyMaker("role", m);
  362. }
  363. private void createAbsolutePositionProperties() {
  364. PropertyMaker m;
  365. LengthProperty.Maker l;
  366. // absolute-position
  367. m = new EnumProperty.Maker(PR_ABSOLUTE_POSITION);
  368. m.setInherited(false);
  369. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  370. m.addEnum("fixed", getEnumProperty(EN_FIXED, "FIXED"));
  371. m.addEnum("absolute", getEnumProperty(EN_ABSOLUTE, "ABSOLUTE"));
  372. m.setDefault("auto");
  373. m.addShorthand(generics[PR_POSITION]);
  374. addPropertyMaker("absolute-position", m);
  375. // top
  376. l = new LengthProperty.Maker(PR_TOP);
  377. l.setInherited(false);
  378. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  379. l.setDefault("auto");
  380. l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  381. addPropertyMaker("top", l);
  382. // right
  383. l = new LengthProperty.Maker(PR_RIGHT);
  384. l.setInherited(false);
  385. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  386. l.setDefault("auto");
  387. l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  388. addPropertyMaker("right", l);
  389. // bottom
  390. l = new LengthProperty.Maker(PR_BOTTOM);
  391. l.setInherited(false);
  392. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  393. l.setDefault("auto");
  394. l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  395. addPropertyMaker("bottom", l);
  396. // left
  397. l = new LengthProperty.Maker(PR_LEFT);
  398. l.setInherited(false);
  399. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  400. l.setDefault("auto");
  401. l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  402. addPropertyMaker("left", l);
  403. }
  404. private void createAuralProperties() {
  405. PropertyMaker m;
  406. // azimuth
  407. m = new ToBeImplementedProperty.Maker(PR_AZIMUTH);
  408. m.setInherited(true);
  409. m.setDefault("center");
  410. addPropertyMaker("azimuth", m);
  411. // cue-after
  412. m = new ToBeImplementedProperty.Maker(PR_CUE_AFTER);
  413. m.setInherited(false);
  414. m.setDefault("none");
  415. addPropertyMaker("cue-after", m);
  416. // cue-before
  417. m = new ToBeImplementedProperty.Maker(PR_CUE_BEFORE);
  418. m.setInherited(false);
  419. m.setDefault("none");
  420. addPropertyMaker("cue-before", m);
  421. // elevation
  422. m = new ToBeImplementedProperty.Maker(PR_ELEVATION);
  423. m.setInherited(true);
  424. m.setDefault("level");
  425. addPropertyMaker("elevation", m);
  426. // pause-after
  427. m = new ToBeImplementedProperty.Maker(PR_PAUSE_AFTER);
  428. m.setInherited(false);
  429. m.setDefault("");
  430. addPropertyMaker("pause-after", m);
  431. // pause-before
  432. m = new ToBeImplementedProperty.Maker(PR_PAUSE_BEFORE);
  433. m.setInherited(false);
  434. m.setDefault("");
  435. addPropertyMaker("pause-before", m);
  436. // pitch
  437. m = new ToBeImplementedProperty.Maker(PR_PITCH);
  438. m.setInherited(true);
  439. m.setDefault("medium");
  440. addPropertyMaker("pitch", m);
  441. // pitch-range
  442. m = new ToBeImplementedProperty.Maker(PR_PITCH_RANGE);
  443. m.setInherited(true);
  444. m.setDefault("50");
  445. addPropertyMaker("pitch-range", m);
  446. // play-during
  447. m = new ToBeImplementedProperty.Maker(PR_PLAY_DURING);
  448. m.setInherited(false);
  449. m.setDefault("auto");
  450. addPropertyMaker("play-during", m);
  451. // richness
  452. m = new ToBeImplementedProperty.Maker(PR_RICHNESS);
  453. m.setInherited(true);
  454. m.setDefault("50");
  455. addPropertyMaker("richness", m);
  456. // speak
  457. m = new ToBeImplementedProperty.Maker(PR_SPEAK);
  458. m.setInherited(true);
  459. m.setDefault("normal");
  460. addPropertyMaker("speak", m);
  461. // speak-header
  462. m = new ToBeImplementedProperty.Maker(PR_SPEAK_HEADER);
  463. m.setInherited(true);
  464. m.setDefault("once");
  465. addPropertyMaker("speak-header", m);
  466. // speak-numeral
  467. m = new ToBeImplementedProperty.Maker(PR_SPEAK_NUMERAL);
  468. m.setInherited(true);
  469. m.setDefault("continuous");
  470. addPropertyMaker("speak-numeral", m);
  471. // speak-punctuation
  472. m = new ToBeImplementedProperty.Maker(PR_SPEAK_PUNCTUATION);
  473. m.setInherited(true);
  474. m.setDefault("none");
  475. addPropertyMaker("speak-punctuation", m);
  476. // speech-rate
  477. m = new ToBeImplementedProperty.Maker(PR_SPEECH_RATE);
  478. m.setInherited(true);
  479. m.setDefault("medium");
  480. addPropertyMaker("speech-rate", m);
  481. // stress
  482. m = new ToBeImplementedProperty.Maker(PR_STRESS);
  483. m.setInherited(true);
  484. m.setDefault("50");
  485. addPropertyMaker("stress", m);
  486. // voice-family
  487. m = new ToBeImplementedProperty.Maker(PR_VOICE_FAMILY);
  488. m.setInherited(true);
  489. m.setDefault("");
  490. addPropertyMaker("voice-family", m);
  491. // volume
  492. m = new ToBeImplementedProperty.Maker(PR_VOLUME);
  493. m.setInherited(true);
  494. m.setDefault("medium");
  495. addPropertyMaker("volume", m);
  496. }
  497. private void createBorderPaddingBackgroundProperties() { // CSOK: MethodLength
  498. PropertyMaker m;
  499. BorderWidthPropertyMaker bwm;
  500. CorrespondingPropertyMaker corr;
  501. // background-attachment
  502. m = new EnumProperty.Maker(PR_BACKGROUND_ATTACHMENT);
  503. m.setInherited(false);
  504. m.addEnum("scroll", getEnumProperty(EN_SCROLL, "SCROLL"));
  505. m.addEnum("fixed", getEnumProperty(EN_FIXED, "FIXED"));
  506. m.setDefault("scroll");
  507. addPropertyMaker("background-attachment", m);
  508. // background-color
  509. m = new ColorProperty.Maker(PR_BACKGROUND_COLOR) {
  510. protected Property convertPropertyDatatype(
  511. Property p, PropertyList propertyList, FObj fo) throws PropertyException {
  512. String nameval = p.getNCname();
  513. if (nameval != null) {
  514. FObj fobj = (fo == null ? propertyList.getFObj() : fo);
  515. FOUserAgent ua = (fobj == null ? null : fobj.getUserAgent());
  516. return ColorProperty.getInstance(ua, nameval);
  517. }
  518. return super.convertPropertyDatatype(p, propertyList, fo);
  519. }
  520. };
  521. m.useGeneric(genericColor);
  522. m.setInherited(false);
  523. m.setDefault("transparent");
  524. addPropertyMaker("background-color", m);
  525. // background-image
  526. m = new StringProperty.Maker(PR_BACKGROUND_IMAGE);
  527. m.setInherited(false);
  528. m.setDefault("none");
  529. addPropertyMaker("background-image", m);
  530. // background-repeat
  531. m = new EnumProperty.Maker(PR_BACKGROUND_REPEAT);
  532. m.setInherited(false);
  533. m.addEnum("repeat", getEnumProperty(EN_REPEAT, "REPEAT"));
  534. m.addEnum("repeat-x", getEnumProperty(EN_REPEATX, "REPEATX"));
  535. m.addEnum("repeat-y", getEnumProperty(EN_REPEATY, "REPEATY"));
  536. m.addEnum("no-repeat", getEnumProperty(EN_NOREPEAT, "NOREPEAT"));
  537. m.setDefault("repeat");
  538. addPropertyMaker("background-repeat", m);
  539. // background-position-horizontal
  540. m = new LengthProperty.Maker(PR_BACKGROUND_POSITION_HORIZONTAL);
  541. m.setInherited(false);
  542. m.setDefault("0pt");
  543. m.addKeyword("left", "0pt");
  544. m.addKeyword("center", "50%");
  545. m.addKeyword("right", "100%");
  546. m.setPercentBase(LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL);
  547. m.addShorthand(generics[PR_BACKGROUND_POSITION]);
  548. addPropertyMaker("background-position-horizontal", m);
  549. // background-position-vertical
  550. m = new LengthProperty.Maker(PR_BACKGROUND_POSITION_VERTICAL);
  551. m.setInherited(false);
  552. m.setDefault("0pt");
  553. m.addKeyword("top", "0pt");
  554. m.addKeyword("center", "50%");
  555. m.addKeyword("bottom", "100%");
  556. m.setPercentBase(LengthBase.IMAGE_BACKGROUND_POSITION_VERTICAL);
  557. m.addShorthand(generics[PR_BACKGROUND_POSITION]);
  558. addPropertyMaker("background-position-vertical", m);
  559. // border-before-color
  560. m = new ColorProperty.Maker(PR_BORDER_BEFORE_COLOR);
  561. m.useGeneric(genericColor);
  562. m.setInherited(false);
  563. m.setDefault("black");
  564. corr = new CorrespondingPropertyMaker(m);
  565. corr.setCorresponding(PR_BORDER_TOP_COLOR, PR_BORDER_TOP_COLOR,
  566. PR_BORDER_RIGHT_COLOR, PR_BORDER_LEFT_COLOR);
  567. corr.setRelative(true);
  568. addPropertyMaker("border-before-color", m);
  569. // border-before-style
  570. m = new EnumProperty.Maker(PR_BORDER_BEFORE_STYLE);
  571. m.useGeneric(genericBorderStyle);
  572. corr = new CorrespondingPropertyMaker(m);
  573. corr.setCorresponding(PR_BORDER_TOP_STYLE, PR_BORDER_TOP_STYLE,
  574. PR_BORDER_RIGHT_STYLE, PR_BORDER_LEFT_STYLE);
  575. corr.setRelative(true);
  576. addPropertyMaker("border-before-style", m);
  577. // border-before-width
  578. m = new CondLengthProperty.Maker(PR_BORDER_BEFORE_WIDTH);
  579. m.useGeneric(genericCondBorderWidth);
  580. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  581. corr = new CorrespondingPropertyMaker(m);
  582. corr.setCorresponding(PR_BORDER_TOP_WIDTH, PR_BORDER_TOP_WIDTH,
  583. PR_BORDER_RIGHT_WIDTH, PR_BORDER_LEFT_WIDTH);
  584. corr.setRelative(true);
  585. addPropertyMaker("border-before-width", m);
  586. // border-after-color
  587. m = new ColorProperty.Maker(PR_BORDER_AFTER_COLOR);
  588. m.useGeneric(genericColor);
  589. m.setInherited(false);
  590. m.setDefault("black");
  591. corr = new CorrespondingPropertyMaker(m);
  592. corr.setCorresponding(PR_BORDER_BOTTOM_COLOR, PR_BORDER_BOTTOM_COLOR,
  593. PR_BORDER_LEFT_COLOR, PR_BORDER_RIGHT_COLOR);
  594. corr.setRelative(true);
  595. addPropertyMaker("border-after-color", m);
  596. // border-after-style
  597. m = new EnumProperty.Maker(PR_BORDER_AFTER_STYLE);
  598. m.useGeneric(genericBorderStyle);
  599. corr = new CorrespondingPropertyMaker(m);
  600. corr.setCorresponding(PR_BORDER_BOTTOM_STYLE, PR_BORDER_BOTTOM_STYLE,
  601. PR_BORDER_LEFT_STYLE, PR_BORDER_RIGHT_STYLE);
  602. corr.setRelative(true);
  603. addPropertyMaker("border-after-style", m);
  604. // border-after-width
  605. m = new CondLengthProperty.Maker(PR_BORDER_AFTER_WIDTH);
  606. m.useGeneric(genericCondBorderWidth);
  607. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  608. corr = new CorrespondingPropertyMaker(m);
  609. corr.setCorresponding(PR_BORDER_BOTTOM_WIDTH, PR_BORDER_BOTTOM_WIDTH,
  610. PR_BORDER_LEFT_WIDTH, PR_BORDER_LEFT_WIDTH);
  611. corr.setRelative(true);
  612. addPropertyMaker("border-after-width", m);
  613. // border-start-color
  614. m = new ColorProperty.Maker(PR_BORDER_START_COLOR);
  615. m.useGeneric(genericColor);
  616. m.setInherited(false);
  617. m.setDefault("black");
  618. corr = new CorrespondingPropertyMaker(m);
  619. corr.setCorresponding(PR_BORDER_LEFT_COLOR, PR_BORDER_RIGHT_COLOR,
  620. PR_BORDER_TOP_COLOR, PR_BORDER_TOP_COLOR);
  621. corr.setRelative(true);
  622. addPropertyMaker("border-start-color", m);
  623. // border-start-style
  624. m = new EnumProperty.Maker(PR_BORDER_START_STYLE);
  625. m.useGeneric(genericBorderStyle);
  626. corr = new CorrespondingPropertyMaker(m);
  627. corr.setCorresponding(PR_BORDER_LEFT_STYLE, PR_BORDER_RIGHT_STYLE,
  628. PR_BORDER_TOP_STYLE, PR_BORDER_TOP_STYLE);
  629. corr.setRelative(true);
  630. addPropertyMaker("border-start-style", m);
  631. // border-start-width
  632. m = new CondLengthProperty.Maker(PR_BORDER_START_WIDTH);
  633. m.useGeneric(genericCondBorderWidth);
  634. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  635. corr = new CorrespondingPropertyMaker(m);
  636. corr.setCorresponding(PR_BORDER_LEFT_WIDTH, PR_BORDER_RIGHT_WIDTH,
  637. PR_BORDER_TOP_WIDTH, PR_BORDER_TOP_WIDTH);
  638. corr.setRelative(true);
  639. addPropertyMaker("border-start-width", m);
  640. // border-end-color
  641. m = new ColorProperty.Maker(PR_BORDER_END_COLOR);
  642. m.useGeneric(genericColor);
  643. m.setInherited(false);
  644. m.setDefault("black");
  645. corr = new CorrespondingPropertyMaker(m);
  646. corr.setCorresponding(PR_BORDER_RIGHT_COLOR, PR_BORDER_LEFT_COLOR,
  647. PR_BORDER_BOTTOM_COLOR, PR_BORDER_BOTTOM_COLOR);
  648. corr.setRelative(true);
  649. addPropertyMaker("border-end-color", m);
  650. // border-end-style
  651. m = new EnumProperty.Maker(PR_BORDER_END_STYLE);
  652. m.useGeneric(genericBorderStyle);
  653. corr = new CorrespondingPropertyMaker(m);
  654. corr.setCorresponding(PR_BORDER_RIGHT_STYLE, PR_BORDER_LEFT_STYLE,
  655. PR_BORDER_BOTTOM_STYLE, PR_BORDER_BOTTOM_STYLE);
  656. corr.setRelative(true);
  657. addPropertyMaker("border-end-style", m);
  658. // border-end-width
  659. m = new CondLengthProperty.Maker(PR_BORDER_END_WIDTH);
  660. m.useGeneric(genericCondBorderWidth);
  661. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  662. corr = new CorrespondingPropertyMaker(m);
  663. corr.setCorresponding(PR_BORDER_RIGHT_WIDTH, PR_BORDER_LEFT_WIDTH,
  664. PR_BORDER_BOTTOM_WIDTH, PR_BORDER_BOTTOM_WIDTH);
  665. corr.setRelative(true);
  666. addPropertyMaker("border-end-width", m);
  667. // border-top-color
  668. m = new ColorProperty.Maker(PR_BORDER_TOP_COLOR);
  669. m.useGeneric(genericColor);
  670. m.setInherited(false);
  671. m.setDefault("black");
  672. m.addShorthand(generics[PR_BORDER_TOP]);
  673. m.addShorthand(generics[PR_BORDER_COLOR]);
  674. m.addShorthand(generics[PR_BORDER]);
  675. corr = new CorrespondingPropertyMaker(m);
  676. corr.setCorresponding(PR_BORDER_BEFORE_COLOR, PR_BORDER_BEFORE_COLOR,
  677. PR_BORDER_START_COLOR, PR_BORDER_START_COLOR);
  678. addPropertyMaker("border-top-color", m);
  679. // border-top-style
  680. m = new EnumProperty.Maker(PR_BORDER_TOP_STYLE);
  681. m.useGeneric(genericBorderStyle);
  682. m.addShorthand(generics[PR_BORDER_TOP]);
  683. m.addShorthand(generics[PR_BORDER_STYLE]);
  684. m.addShorthand(generics[PR_BORDER]);
  685. corr = new CorrespondingPropertyMaker(m);
  686. corr.setCorresponding(PR_BORDER_BEFORE_STYLE, PR_BORDER_BEFORE_STYLE,
  687. PR_BORDER_START_STYLE, PR_BORDER_START_STYLE);
  688. addPropertyMaker("border-top-style", m);
  689. // border-top-width
  690. bwm = new BorderWidthPropertyMaker(PR_BORDER_TOP_WIDTH);
  691. bwm.useGeneric(genericBorderWidth);
  692. bwm.setBorderStyleId(PR_BORDER_TOP_STYLE);
  693. bwm.addShorthand(generics[PR_BORDER_TOP]);
  694. bwm.addShorthand(generics[PR_BORDER_WIDTH]);
  695. bwm.addShorthand(generics[PR_BORDER]);
  696. corr = new CorrespondingPropertyMaker(bwm);
  697. corr.setCorresponding(PR_BORDER_BEFORE_WIDTH, PR_BORDER_BEFORE_WIDTH,
  698. PR_BORDER_START_WIDTH, PR_BORDER_START_WIDTH);
  699. addPropertyMaker("border-top-width", bwm);
  700. // border-bottom-color
  701. m = new ColorProperty.Maker(PR_BORDER_BOTTOM_COLOR);
  702. m.useGeneric(genericColor);
  703. m.setInherited(false);
  704. m.setDefault("black");
  705. m.addShorthand(generics[PR_BORDER_BOTTOM]);
  706. m.addShorthand(generics[PR_BORDER_COLOR]);
  707. m.addShorthand(generics[PR_BORDER]);
  708. corr = new CorrespondingPropertyMaker(m);
  709. corr.setCorresponding(PR_BORDER_AFTER_COLOR, PR_BORDER_AFTER_COLOR,
  710. PR_BORDER_END_COLOR, PR_BORDER_END_COLOR);
  711. addPropertyMaker("border-bottom-color", m);
  712. // border-bottom-style
  713. m = new EnumProperty.Maker(PR_BORDER_BOTTOM_STYLE);
  714. m.useGeneric(genericBorderStyle);
  715. m.addShorthand(generics[PR_BORDER_BOTTOM]);
  716. m.addShorthand(generics[PR_BORDER_STYLE]);
  717. m.addShorthand(generics[PR_BORDER]);
  718. corr = new CorrespondingPropertyMaker(m);
  719. corr.setCorresponding(PR_BORDER_AFTER_STYLE, PR_BORDER_AFTER_STYLE,
  720. PR_BORDER_END_STYLE, PR_BORDER_END_STYLE);
  721. addPropertyMaker("border-bottom-style", m);
  722. // border-bottom-width
  723. bwm = new BorderWidthPropertyMaker(PR_BORDER_BOTTOM_WIDTH);
  724. bwm.useGeneric(genericBorderWidth);
  725. bwm.setBorderStyleId(PR_BORDER_BOTTOM_STYLE);
  726. bwm.addShorthand(generics[PR_BORDER_BOTTOM]);
  727. bwm.addShorthand(generics[PR_BORDER_WIDTH]);
  728. bwm.addShorthand(generics[PR_BORDER]);
  729. corr = new CorrespondingPropertyMaker(bwm);
  730. corr.setCorresponding(PR_BORDER_AFTER_WIDTH, PR_BORDER_AFTER_WIDTH,
  731. PR_BORDER_END_WIDTH, PR_BORDER_END_WIDTH);
  732. addPropertyMaker("border-bottom-width", bwm);
  733. // border-left-color
  734. m = new ColorProperty.Maker(PR_BORDER_LEFT_COLOR);
  735. m.useGeneric(genericColor);
  736. m.setInherited(false);
  737. m.setDefault("black");
  738. m.addShorthand(generics[PR_BORDER_LEFT]);
  739. m.addShorthand(generics[PR_BORDER_COLOR]);
  740. m.addShorthand(generics[PR_BORDER]);
  741. corr = new CorrespondingPropertyMaker(m);
  742. corr.setCorresponding(PR_BORDER_START_COLOR, PR_BORDER_END_COLOR,
  743. PR_BORDER_AFTER_COLOR, PR_BORDER_BEFORE_COLOR);
  744. addPropertyMaker("border-left-color", m);
  745. // border-left-style
  746. m = new EnumProperty.Maker(PR_BORDER_LEFT_STYLE);
  747. m.useGeneric(genericBorderStyle);
  748. m.addShorthand(generics[PR_BORDER_LEFT]);
  749. m.addShorthand(generics[PR_BORDER_STYLE]);
  750. m.addShorthand(generics[PR_BORDER]);
  751. corr = new CorrespondingPropertyMaker(m);
  752. corr.setCorresponding(PR_BORDER_START_STYLE, PR_BORDER_END_STYLE,
  753. PR_BORDER_AFTER_STYLE, PR_BORDER_BEFORE_STYLE);
  754. addPropertyMaker("border-left-style", m);
  755. // border-left-width
  756. bwm = new BorderWidthPropertyMaker(PR_BORDER_LEFT_WIDTH);
  757. bwm.useGeneric(genericBorderWidth);
  758. bwm.setBorderStyleId(PR_BORDER_LEFT_STYLE);
  759. bwm.addShorthand(generics[PR_BORDER_LEFT]);
  760. bwm.addShorthand(generics[PR_BORDER_WIDTH]);
  761. bwm.addShorthand(generics[PR_BORDER]);
  762. corr = new CorrespondingPropertyMaker(bwm);
  763. corr.setCorresponding(PR_BORDER_START_WIDTH, PR_BORDER_END_WIDTH,
  764. PR_BORDER_AFTER_WIDTH, PR_BORDER_BEFORE_WIDTH);
  765. addPropertyMaker("border-left-width", bwm);
  766. // border-right-color
  767. m = new ColorProperty.Maker(PR_BORDER_RIGHT_COLOR);
  768. m.useGeneric(genericColor);
  769. m.setInherited(false);
  770. m.setDefault("black");
  771. m.addShorthand(generics[PR_BORDER_RIGHT]);
  772. m.addShorthand(generics[PR_BORDER_COLOR]);
  773. m.addShorthand(generics[PR_BORDER]);
  774. corr = new CorrespondingPropertyMaker(m);
  775. corr.setCorresponding(PR_BORDER_END_COLOR, PR_BORDER_START_COLOR,
  776. PR_BORDER_BEFORE_COLOR, PR_BORDER_AFTER_COLOR);
  777. addPropertyMaker("border-right-color", m);
  778. // border-right-style
  779. m = new EnumProperty.Maker(PR_BORDER_RIGHT_STYLE);
  780. m.useGeneric(genericBorderStyle);
  781. m.addShorthand(generics[PR_BORDER_RIGHT]);
  782. m.addShorthand(generics[PR_BORDER_STYLE]);
  783. m.addShorthand(generics[PR_BORDER]);
  784. corr = new CorrespondingPropertyMaker(m);
  785. corr.setCorresponding(PR_BORDER_END_STYLE, PR_BORDER_START_STYLE,
  786. PR_BORDER_BEFORE_STYLE, PR_BORDER_AFTER_STYLE);
  787. addPropertyMaker("border-right-style", m);
  788. // border-right-width
  789. bwm = new BorderWidthPropertyMaker(PR_BORDER_RIGHT_WIDTH);
  790. bwm.useGeneric(genericBorderWidth);
  791. bwm.setBorderStyleId(PR_BORDER_RIGHT_STYLE);
  792. bwm.addShorthand(generics[PR_BORDER_RIGHT]);
  793. bwm.addShorthand(generics[PR_BORDER_WIDTH]);
  794. bwm.addShorthand(generics[PR_BORDER]);
  795. corr = new CorrespondingPropertyMaker(bwm);
  796. corr.setCorresponding(PR_BORDER_END_WIDTH, PR_BORDER_START_WIDTH,
  797. PR_BORDER_BEFORE_WIDTH, PR_BORDER_AFTER_WIDTH);
  798. addPropertyMaker("border-right-width", bwm);
  799. // padding-before
  800. m = new CondLengthProperty.Maker(PR_PADDING_BEFORE);
  801. m.useGeneric(genericCondPadding);
  802. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  803. corr = new CorrespondingPropertyMaker(m);
  804. corr.setCorresponding(PR_PADDING_TOP, PR_PADDING_TOP,
  805. PR_PADDING_RIGHT, PR_PADDING_LEFT);
  806. corr.setRelative(true);
  807. addPropertyMaker("padding-before", m);
  808. // padding-after
  809. m = new CondLengthProperty.Maker(PR_PADDING_AFTER);
  810. m.useGeneric(genericCondPadding);
  811. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  812. corr = new CorrespondingPropertyMaker(m);
  813. corr.setCorresponding(PR_PADDING_BOTTOM, PR_PADDING_BOTTOM,
  814. PR_PADDING_LEFT, PR_PADDING_RIGHT);
  815. corr.setRelative(true);
  816. addPropertyMaker("padding-after", m);
  817. // padding-start
  818. m = new CondLengthProperty.Maker(PR_PADDING_START);
  819. m.useGeneric(genericCondPadding);
  820. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  821. corr = new CorrespondingPropertyMaker(m);
  822. corr.setCorresponding(PR_PADDING_LEFT, PR_PADDING_RIGHT,
  823. PR_PADDING_TOP, PR_PADDING_TOP);
  824. corr.setRelative(true);
  825. addPropertyMaker("padding-start", m);
  826. // padding-end
  827. m = new CondLengthProperty.Maker(PR_PADDING_END);
  828. m.useGeneric(genericCondPadding);
  829. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  830. corr = new CorrespondingPropertyMaker(m);
  831. corr.setCorresponding(PR_PADDING_RIGHT, PR_PADDING_LEFT,
  832. PR_PADDING_BOTTOM, PR_PADDING_BOTTOM);
  833. corr.setRelative(true);
  834. addPropertyMaker("padding-end", m);
  835. // padding-top
  836. m = new LengthProperty.Maker(PR_PADDING_TOP);
  837. m.useGeneric(genericPadding);
  838. corr = new CorrespondingPropertyMaker(m);
  839. corr.setCorresponding(PR_PADDING_BEFORE, PR_PADDING_BEFORE,
  840. PR_PADDING_START, PR_PADDING_START);
  841. addPropertyMaker("padding-top", m);
  842. // padding-bottom
  843. m = new LengthProperty.Maker(PR_PADDING_BOTTOM);
  844. m.useGeneric(genericPadding);
  845. corr = new CorrespondingPropertyMaker(m);
  846. corr.setCorresponding(PR_PADDING_AFTER, PR_PADDING_AFTER,
  847. PR_PADDING_END, PR_PADDING_END);
  848. addPropertyMaker("padding-bottom", m);
  849. // padding-left
  850. m = new LengthProperty.Maker(PR_PADDING_LEFT);
  851. m.useGeneric(genericPadding);
  852. corr = new CorrespondingPropertyMaker(m);
  853. corr.setCorresponding(PR_PADDING_START, PR_PADDING_END,
  854. PR_PADDING_AFTER, PR_PADDING_BEFORE);
  855. addPropertyMaker("padding-left", m);
  856. // padding-right
  857. m = new LengthProperty.Maker(PR_PADDING_RIGHT);
  858. m.useGeneric(genericPadding);
  859. corr = new CorrespondingPropertyMaker(m);
  860. corr.setCorresponding(PR_PADDING_END, PR_PADDING_START,
  861. PR_PADDING_BEFORE, PR_PADDING_AFTER);
  862. addPropertyMaker("padding-right", m);
  863. }
  864. private void createFontProperties() {
  865. PropertyMaker m;
  866. // font-family
  867. m = new FontFamilyProperty.Maker(PR_FONT_FAMILY);
  868. m.setInherited(true);
  869. m.setDefault("sans-serif,Symbol,ZapfDingbats");
  870. m.addShorthand(generics[PR_FONT]);
  871. addPropertyMaker("font-family", m);
  872. // font-selection-strategy
  873. m = new EnumProperty.Maker(PR_FONT_SELECTION_STRATEGY);
  874. m.setInherited(true);
  875. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  876. m.addEnum("character-by-character", getEnumProperty(
  877. EN_CHARACTER_BY_CHARACTER, "CHARACTER_BY_CHARACTER"));
  878. m.setDefault("auto");
  879. addPropertyMaker("font-selection-strategy", m);
  880. // font-size
  881. m = new FontSizePropertyMaker(PR_FONT_SIZE);
  882. m.setInherited(true);
  883. m.setDefault("12pt");
  884. m.addKeyword("xx-small", "6.944pt");
  885. m.addKeyword("x-small", "8.333pt");
  886. m.addKeyword("small", "10pt");
  887. m.addKeyword("medium", "12pt");
  888. m.addKeyword("large", "14.4pt");
  889. m.addKeyword("x-large", "17.28pt");
  890. m.addKeyword("xx-large", "20.736pt");
  891. m.addEnum("larger", getEnumProperty(EN_LARGER, "LARGER"));
  892. m.addEnum("smaller", getEnumProperty(EN_SMALLER, "SMALLER"));
  893. m.setPercentBase(LengthBase.INH_FONTSIZE);
  894. m.addShorthand(generics[PR_FONT]);
  895. addPropertyMaker("font-size", m);
  896. // font-stretch
  897. m = new FontStretchPropertyMaker(PR_FONT_STRETCH);
  898. m.addEnum("normal", getEnumProperty(EN_NORMAL, "NORMAL"));
  899. m.addEnum("wider", getEnumProperty(EN_WIDER, "WIDER"));
  900. m.addEnum("narrower", getEnumProperty(EN_NARROWER, "NARROWER"));
  901. m.addEnum("ultra-condensed", getEnumProperty(EN_ULTRA_CONDENSED, "ULTRA_CONDENSED"));
  902. m.addEnum("extra-condensed", getEnumProperty(EN_EXTRA_CONDENSED, "EXTRA_CONDENSED"));
  903. m.addEnum("condensed", getEnumProperty(EN_CONDENSED, "CONDENSED"));
  904. m.addEnum("semi-condensed", getEnumProperty(EN_SEMI_CONDENSED, "SEMI_CONDENSED"));
  905. m.addEnum("semi-expanded", getEnumProperty(EN_SEMI_EXPANDED, "SEMI_EXPANDED"));
  906. m.addEnum("expanded", getEnumProperty(EN_EXPANDED, "EXPANDED"));
  907. m.addEnum("extra-expanded", getEnumProperty(EN_EXTRA_EXPANDED, "EXTRA_EXPANDED"));
  908. m.addEnum("ultra-expanded", getEnumProperty(EN_ULTRA_EXPANDED, "ULTRA_EXPANDED"));
  909. m.setDefault("normal");
  910. addPropertyMaker("font-stretch", m);
  911. // font-size-adjust
  912. m = new NumberProperty.Maker(PR_FONT_SIZE_ADJUST);
  913. m.setInherited(true);
  914. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  915. m.setDefault("none");
  916. addPropertyMaker("font-size-adjust", m);
  917. // font-style
  918. m = new EnumProperty.Maker(PR_FONT_STYLE);
  919. m.setInherited(true);
  920. m.addEnum("normal", getEnumProperty(EN_NORMAL, "NORMAL"));
  921. m.addEnum("italic", getEnumProperty(EN_ITALIC, "ITALIC"));
  922. m.addEnum("oblique", getEnumProperty(EN_OBLIQUE, "OBLIQUE"));
  923. m.addEnum("backslant", getEnumProperty(EN_BACKSLANT, "BACKSLANT"));
  924. m.setDefault("normal");
  925. m.addShorthand(generics[PR_FONT]);
  926. addPropertyMaker("font-style", m);
  927. // font-variant
  928. m = new EnumProperty.Maker(PR_FONT_VARIANT);
  929. m.setInherited(true);
  930. m.addEnum("normal", getEnumProperty(EN_NORMAL, "NORMAL"));
  931. m.addEnum("small-caps", getEnumProperty(EN_SMALL_CAPS, "SMALL_CAPS"));
  932. m.setDefault("normal");
  933. m.addShorthand(generics[PR_FONT]);
  934. addPropertyMaker("font-variant", m);
  935. // font-weight
  936. m = new FontWeightPropertyMaker(PR_FONT_WEIGHT);
  937. m.setInherited(true);
  938. m.addKeyword("normal", "400");
  939. m.addKeyword("bold", "700");
  940. m.addEnum("bolder", getEnumProperty(EN_BOLDER, "BOLDER"));
  941. m.addEnum("lighter", getEnumProperty(EN_LIGHTER, "LIGHTER"));
  942. m.addEnum("100", getEnumProperty(EN_100, "100"));
  943. m.addEnum("200", getEnumProperty(EN_200, "200"));
  944. m.addEnum("300", getEnumProperty(EN_300, "300"));
  945. m.addEnum("400", getEnumProperty(EN_400, "400"));
  946. m.addEnum("500", getEnumProperty(EN_500, "500"));
  947. m.addEnum("600", getEnumProperty(EN_600, "600"));
  948. m.addEnum("700", getEnumProperty(EN_700, "700"));
  949. m.addEnum("800", getEnumProperty(EN_800, "800"));
  950. m.addEnum("900", getEnumProperty(EN_900, "900"));
  951. m.setDefault("400");
  952. m.addShorthand(generics[PR_FONT]);
  953. addPropertyMaker("font-weight", m);
  954. }
  955. private void createHyphenationProperties() {
  956. PropertyMaker m;
  957. // country
  958. m = new StringProperty.Maker(PR_COUNTRY);
  959. m.setInherited(true);
  960. m.setDefault("none");
  961. m.addShorthand(generics[PR_XML_LANG]);
  962. addPropertyMaker("country", m);
  963. // language
  964. m = new StringProperty.Maker(PR_LANGUAGE);
  965. m.setInherited(true);
  966. m.setDefault("none");
  967. m.addShorthand(generics[PR_XML_LANG]);
  968. addPropertyMaker("language", m);
  969. // script
  970. m = new StringProperty.Maker(PR_SCRIPT);
  971. m.setInherited(true);
  972. m.setDefault("auto");
  973. addPropertyMaker("script", m);
  974. // hyphenate
  975. m = new EnumProperty.Maker(PR_HYPHENATE);
  976. m.useGeneric(genericBoolean);
  977. m.setInherited(true);
  978. m.setDefault("false");
  979. addPropertyMaker("hyphenate", m);
  980. // hyphenation-character
  981. m = new CharacterProperty.Maker(PR_HYPHENATION_CHARACTER);
  982. m.setInherited(true);
  983. m.setDefault("-");
  984. addPropertyMaker("hyphenation-character", m);
  985. // hyphenation-push-character-count
  986. m = new NumberProperty.PositiveIntegerMaker(PR_HYPHENATION_PUSH_CHARACTER_COUNT);
  987. m.setInherited(true);
  988. m.setDefault("2");
  989. addPropertyMaker("hyphenation-push-character-count", m);
  990. // hyphenation-remain-character-count
  991. m = new NumberProperty.PositiveIntegerMaker(PR_HYPHENATION_REMAIN_CHARACTER_COUNT);
  992. m.setInherited(true);
  993. m.setDefault("2");
  994. addPropertyMaker("hyphenation-remain-character-count", m);
  995. }
  996. private void createMarginBlockProperties() {
  997. PropertyMaker m;
  998. CorrespondingPropertyMaker corr;
  999. // margin-top
  1000. m = new LengthProperty.Maker(PR_MARGIN_TOP);
  1001. m.setInherited(false);
  1002. m.setDefault("0pt");
  1003. m.addShorthand(generics[PR_MARGIN]);
  1004. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1005. addPropertyMaker("margin-top", m);
  1006. // margin-bottom
  1007. m = new LengthProperty.Maker(PR_MARGIN_BOTTOM);
  1008. m.setInherited(false);
  1009. m.setDefault("0pt");
  1010. m.addShorthand(generics[PR_MARGIN]);
  1011. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1012. addPropertyMaker("margin-bottom", m);
  1013. // margin-left
  1014. m = new LengthProperty.Maker(PR_MARGIN_LEFT);
  1015. m.setInherited(false);
  1016. m.setDefault("0pt");
  1017. m.addShorthand(generics[PR_MARGIN]);
  1018. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1019. addPropertyMaker("margin-left", m);
  1020. // margin-right
  1021. m = new LengthProperty.Maker(PR_MARGIN_RIGHT);
  1022. m.setInherited(false);
  1023. m.setDefault("0pt");
  1024. m.addShorthand(generics[PR_MARGIN]);
  1025. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1026. addPropertyMaker("margin-right", m);
  1027. // space-before
  1028. m = new SpaceProperty.Maker(PR_SPACE_BEFORE);
  1029. m.useGeneric(genericSpace);
  1030. corr = new SpacePropertyMaker(m);
  1031. corr.setCorresponding(PR_MARGIN_TOP, PR_MARGIN_TOP, PR_MARGIN_RIGHT, PR_MARGIN_LEFT);
  1032. corr.setUseParent(false);
  1033. corr.setRelative(true);
  1034. addPropertyMaker("space-before", m);
  1035. // space-after
  1036. m = new SpaceProperty.Maker(PR_SPACE_AFTER);
  1037. m.useGeneric(genericSpace);
  1038. corr = new SpacePropertyMaker(m);
  1039. corr.setCorresponding(PR_MARGIN_BOTTOM, PR_MARGIN_BOTTOM, PR_MARGIN_LEFT, PR_MARGIN_RIGHT);
  1040. corr.setUseParent(false);
  1041. corr.setRelative(true);
  1042. addPropertyMaker("space-after", m);
  1043. // start-indent
  1044. m = new LengthProperty.Maker(PR_START_INDENT);
  1045. m.setInherited(true);
  1046. m.setDefault("0pt");
  1047. m.setPercentBase(LengthBase.CONTAINING_REFAREA_WIDTH);
  1048. IndentPropertyMaker sCorr = new IndentPropertyMaker(m);
  1049. sCorr.setCorresponding(PR_MARGIN_LEFT, PR_MARGIN_RIGHT, PR_MARGIN_TOP, PR_MARGIN_TOP);
  1050. sCorr.setUseParent(false);
  1051. sCorr.setRelative(true);
  1052. sCorr.setPaddingCorresponding(new int[] {
  1053. PR_PADDING_LEFT, PR_PADDING_RIGHT, PR_PADDING_TOP, PR_PADDING_TOP
  1054. });
  1055. sCorr.setBorderWidthCorresponding(new int[] {
  1056. PR_BORDER_LEFT_WIDTH, PR_BORDER_RIGHT_WIDTH, PR_BORDER_TOP_WIDTH, PR_BORDER_TOP_WIDTH
  1057. });
  1058. addPropertyMaker("start-indent", m);
  1059. // end-indent
  1060. m = new LengthProperty.Maker(PR_END_INDENT);
  1061. m.setInherited(true);
  1062. m.setDefault("0pt");
  1063. m.setPercentBase(LengthBase.CONTAINING_REFAREA_WIDTH);
  1064. IndentPropertyMaker eCorr = new IndentPropertyMaker(m);
  1065. eCorr.setCorresponding(PR_MARGIN_RIGHT, PR_MARGIN_LEFT,
  1066. PR_MARGIN_BOTTOM, PR_MARGIN_BOTTOM);
  1067. eCorr.setUseParent(false);
  1068. eCorr.setRelative(true);
  1069. eCorr.setPaddingCorresponding(new int[] {
  1070. PR_PADDING_RIGHT, PR_PADDING_LEFT, PR_PADDING_BOTTOM, PR_PADDING_BOTTOM
  1071. });
  1072. eCorr.setBorderWidthCorresponding(new int[] {
  1073. PR_BORDER_RIGHT_WIDTH, PR_BORDER_LEFT_WIDTH,
  1074. PR_BORDER_BOTTOM_WIDTH, PR_BORDER_BOTTOM_WIDTH
  1075. });
  1076. addPropertyMaker("end-indent", m);
  1077. }
  1078. private void createMarginInlineProperties() {
  1079. PropertyMaker m;
  1080. // space-end
  1081. m = new SpaceProperty.Maker(PR_SPACE_END);
  1082. m.useGeneric(genericSpace);
  1083. addPropertyMaker("space-end", m);
  1084. // space-start
  1085. m = new SpaceProperty.Maker(PR_SPACE_START);
  1086. m.useGeneric(genericSpace);
  1087. addPropertyMaker("space-start", m);
  1088. }
  1089. private void createRelativePosProperties() {
  1090. PropertyMaker m;
  1091. // relative-position
  1092. m = new EnumProperty.Maker(PR_RELATIVE_POSITION);
  1093. m.setInherited(false);
  1094. m.addEnum("static", getEnumProperty(EN_STATIC, "STATIC"));
  1095. m.addEnum("relative", getEnumProperty(EN_RELATIVE, "RELATIVE"));
  1096. m.setDefault("static");
  1097. m.addShorthand(generics[PR_POSITION]);
  1098. addPropertyMaker("relative-position", m);
  1099. }
  1100. private void createAreaAlignmentProperties() {
  1101. PropertyMaker m;
  1102. // alignment-adjust
  1103. m = new LengthProperty.Maker(PR_ALIGNMENT_ADJUST);
  1104. m.setInherited(false);
  1105. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1106. m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
  1107. m.addEnum("before-edge", getEnumProperty(EN_BEFORE_EDGE, "BEFORE_EDGE"));
  1108. m.addEnum("text-before-edge", getEnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE"));
  1109. m.addEnum("middle", getEnumProperty(EN_MIDDLE, "MIDDLE"));
  1110. m.addEnum("central", getEnumProperty(EN_CENTRAL, "CENTRAL"));
  1111. m.addEnum("after-edge", getEnumProperty(EN_AFTER_EDGE, "AFTER_EDGE"));
  1112. m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE"));
  1113. m.addEnum("ideographic", getEnumProperty(EN_IDEOGRAPHIC, "IDEOGRAPHIC"));
  1114. m.addEnum("alphabetic", getEnumProperty(EN_ALPHABETIC, "ALPHABETIC"));
  1115. m.addEnum("hanging", getEnumProperty(EN_HANGING, "HANGING"));
  1116. m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
  1117. m.setDefault("auto");
  1118. m.setPercentBase(LengthBase.ALIGNMENT_ADJUST);
  1119. m.addShorthand(generics[PR_VERTICAL_ALIGN]);
  1120. addPropertyMaker("alignment-adjust", m);
  1121. // alignment-baseline
  1122. m = new EnumProperty.Maker(PR_ALIGNMENT_BASELINE);
  1123. m.setInherited(false);
  1124. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1125. m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
  1126. m.addEnum("before-edge", getEnumProperty(EN_BEFORE_EDGE, "BEFORE_EDGE"));
  1127. m.addEnum("text-before-edge", getEnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE"));
  1128. m.addEnum("middle", getEnumProperty(EN_MIDDLE, "MIDDLE"));
  1129. m.addEnum("central", getEnumProperty(EN_CENTRAL, "CENTRAL"));
  1130. m.addEnum("after-edge", getEnumProperty(EN_AFTER_EDGE, "AFTER_EDGE"));
  1131. m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE"));
  1132. m.addEnum("ideographic", getEnumProperty(EN_IDEOGRAPHIC, "IDEOGRAPHIC"));
  1133. m.addEnum("alphabetic", getEnumProperty(EN_ALPHABETIC, "ALPHABETIC"));
  1134. m.addEnum("hanging", getEnumProperty(EN_HANGING, "HANGING"));
  1135. m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
  1136. m.setDefault("auto");
  1137. m.addShorthand(generics[PR_VERTICAL_ALIGN]);
  1138. addPropertyMaker("alignment-baseline", m);
  1139. // baseline-shift
  1140. m = new LengthProperty.Maker(PR_BASELINE_SHIFT);
  1141. m.setInherited(false);
  1142. m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
  1143. m.addEnum("sub", getEnumProperty(EN_SUB, "SUB"));
  1144. m.addEnum("super", getEnumProperty(EN_SUPER, "SUPER"));
  1145. m.setDefault("baseline");
  1146. m.addShorthand(generics[PR_VERTICAL_ALIGN]);
  1147. m.setPercentBase(LengthBase.CUSTOM_BASE);
  1148. addPropertyMaker("baseline-shift", m);
  1149. // display-align
  1150. m = new EnumProperty.Maker(PR_DISPLAY_ALIGN);
  1151. m.setInherited(true);
  1152. m.addEnum("before", getEnumProperty(EN_BEFORE, "BEFORE"));
  1153. m.addEnum("after", getEnumProperty(EN_AFTER, "AFTER"));
  1154. m.addEnum("center", getEnumProperty(EN_CENTER, "CENTER"));
  1155. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1156. /*LF*/ m.addEnum("distribute", getEnumProperty(EN_X_DISTRIBUTE, "DISTRIBUTE"));
  1157. /*LF*/ m.addEnum("fill", getEnumProperty(EN_X_FILL, "FILL"));
  1158. m.setDefault("auto");
  1159. addPropertyMaker("display-align", m);
  1160. // dominant-baseline
  1161. m = new EnumProperty.Maker(PR_DOMINANT_BASELINE);
  1162. m.setInherited(false);
  1163. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1164. m.addEnum("use-script", getEnumProperty(EN_USE_SCRIPT, "USE_SCRIPT"));
  1165. m.addEnum("no-change", getEnumProperty(EN_NO_CHANGE, "NO_CHANGE"));
  1166. m.addEnum("reset-size", getEnumProperty(EN_RESET_SIZE, "RESET_SIZE"));
  1167. m.addEnum("ideographic", getEnumProperty(EN_IDEOGRAPHIC, "IDEOGRAPHIC"));
  1168. m.addEnum("alphabetic", getEnumProperty(EN_ALPHABETIC, "ALPHABETIC"));
  1169. m.addEnum("hanging", getEnumProperty(EN_HANGING, "HANGING"));
  1170. m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
  1171. m.addEnum("central", getEnumProperty(EN_CENTRAL, "CENTRAL"));
  1172. m.addEnum("middle", getEnumProperty(EN_MIDDLE, "MIDDLE"));
  1173. m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE"));
  1174. m.addEnum("text-before-edge", getEnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE"));
  1175. m.setDefault("auto");
  1176. m.addShorthand(generics[PR_VERTICAL_ALIGN]);
  1177. addPropertyMaker("dominant-baseline", m);
  1178. // relative-align
  1179. m = new EnumProperty.Maker(PR_RELATIVE_ALIGN);
  1180. m.setInherited(true);
  1181. m.addEnum("before", getEnumProperty(EN_BEFORE, "BEFORE"));
  1182. m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
  1183. m.setDefault("before");
  1184. addPropertyMaker("relative-align", m);
  1185. }
  1186. private void createAreaDimensionProperties() { // CSOK: MethodLength
  1187. PropertyMaker m;
  1188. LengthProperty.Maker l;
  1189. DimensionPropertyMaker pdim;
  1190. // block-progression-dimension
  1191. m = new LengthRangeProperty.Maker(PR_BLOCK_PROGRESSION_DIMENSION);
  1192. m.setInherited(false);
  1193. m.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  1194. l = new LengthProperty.Maker(CP_MINIMUM);
  1195. l.setDefault("auto");
  1196. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1197. l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  1198. l.setByShorthand(true);
  1199. m.addSubpropMaker(l);
  1200. l = new LengthProperty.Maker(CP_OPTIMUM);
  1201. l.setDefault("auto");
  1202. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1203. l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  1204. l.setByShorthand(true);
  1205. m.addSubpropMaker(l);
  1206. l = new LengthProperty.Maker(CP_MAXIMUM);
  1207. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1208. l.setDefault("auto");
  1209. l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  1210. l.setByShorthand(true);
  1211. m.addSubpropMaker(l);
  1212. pdim = new DimensionPropertyMaker(m);
  1213. pdim.setCorresponding(PR_HEIGHT, PR_HEIGHT, PR_WIDTH, PR_WIDTH);
  1214. pdim.setExtraCorresponding(new int[][] {
  1215. {PR_MIN_HEIGHT, PR_MIN_HEIGHT, PR_MIN_WIDTH, PR_MIN_WIDTH},
  1216. {PR_MAX_HEIGHT, PR_MAX_HEIGHT, PR_MAX_WIDTH, PR_MAX_WIDTH}
  1217. });
  1218. pdim.setRelative(true);
  1219. m.setCorresponding(pdim);
  1220. addPropertyMaker("block-progression-dimension", m);
  1221. // content-height
  1222. l = new LengthProperty.Maker(PR_CONTENT_HEIGHT);
  1223. l.setInherited(false);
  1224. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1225. l.addEnum("scale-to-fit", getEnumProperty(EN_SCALE_TO_FIT, "SCALE_TO_FIT"));
  1226. l.addEnum("scale-down-to-fit", getEnumProperty(EN_SCALE_DOWN_TO_FIT, "SCALE_DOWN_TO_FIT"));
  1227. l.addEnum("scale-up-to-fit", getEnumProperty(EN_SCALE_UP_TO_FIT, "SCALE_UP_TO_FIT"));
  1228. l.setDefault("auto");
  1229. l.setPercentBase(LengthBase.IMAGE_INTRINSIC_HEIGHT);
  1230. addPropertyMaker("content-height", l);
  1231. // content-width
  1232. l = new LengthProperty.Maker(PR_CONTENT_WIDTH);
  1233. l.setInherited(false);
  1234. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1235. l.addEnum("scale-to-fit", getEnumProperty(EN_SCALE_TO_FIT, "SCALE_TO_FIT"));
  1236. l.addEnum("scale-down-to-fit", getEnumProperty(EN_SCALE_DOWN_TO_FIT, "SCALE_DOWN_TO_FIT"));
  1237. l.addEnum("scale-up-to-fit", getEnumProperty(EN_SCALE_UP_TO_FIT, "SCALE_UP_TO_FIT"));
  1238. l.setDefault("auto");
  1239. l.setPercentBase(LengthBase.IMAGE_INTRINSIC_WIDTH);
  1240. addPropertyMaker("content-width", l);
  1241. // height
  1242. l = new LengthProperty.Maker(PR_HEIGHT);
  1243. l.setInherited(false);
  1244. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1245. l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  1246. l.setDefault("auto");
  1247. addPropertyMaker("height", l);
  1248. // inline-progression-dimension
  1249. m = new LengthRangeProperty.Maker(PR_INLINE_PROGRESSION_DIMENSION);
  1250. m.setInherited(false);
  1251. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1252. l = new LengthProperty.Maker(CP_MINIMUM);
  1253. l.setDefault("auto");
  1254. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1255. l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1256. l.setByShorthand(true);
  1257. m.addSubpropMaker(l);
  1258. l = new LengthProperty.Maker(CP_OPTIMUM);
  1259. l.setDefault("auto");
  1260. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1261. l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1262. l.setByShorthand(true);
  1263. m.addSubpropMaker(l);
  1264. l = new LengthProperty.Maker(CP_MAXIMUM);
  1265. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1266. l.setDefault("auto");
  1267. l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1268. l.setByShorthand(true);
  1269. m.addSubpropMaker(l);
  1270. pdim = new DimensionPropertyMaker(m);
  1271. pdim.setRelative(true);
  1272. pdim.setCorresponding(PR_WIDTH, PR_WIDTH, PR_HEIGHT, PR_HEIGHT);
  1273. pdim.setExtraCorresponding(new int[][] {
  1274. {PR_MIN_WIDTH, PR_MIN_WIDTH, PR_MIN_HEIGHT, PR_MIN_HEIGHT },
  1275. {PR_MAX_WIDTH, PR_MAX_WIDTH, PR_MAX_HEIGHT, PR_MIN_HEIGHT }
  1276. });
  1277. m.setCorresponding(pdim);
  1278. addPropertyMaker("inline-progression-dimension", m);
  1279. // max-height
  1280. m = new LengthProperty.Maker(PR_MAX_HEIGHT);
  1281. m.addEnum("NONE", getEnumProperty(EN_NONE, "NONE"));
  1282. m.setInherited(false);
  1283. m.setDefault("0pt");
  1284. m.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  1285. addPropertyMaker("max-height", m);
  1286. // max-width
  1287. m = new LengthProperty.Maker(PR_MAX_WIDTH);
  1288. m.addEnum("NONE", getEnumProperty(EN_NONE, "NONE"));
  1289. m.setInherited(false);
  1290. m.setDefault("none");
  1291. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1292. addPropertyMaker("max-width", m);
  1293. // min-height
  1294. m = new LengthProperty.Maker(PR_MIN_HEIGHT);
  1295. m.setInherited(false);
  1296. m.setDefault("0pt");
  1297. m.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
  1298. addPropertyMaker("min-height", m);
  1299. // min-width
  1300. m = new LengthProperty.Maker(PR_MIN_WIDTH);
  1301. m.setInherited(false);
  1302. m.setDefault(""); //UA dependent
  1303. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1304. addPropertyMaker("min-width", m);
  1305. // scaling
  1306. m = new EnumProperty.Maker(PR_SCALING);
  1307. m.setInherited(true);
  1308. m.addEnum("uniform", getEnumProperty(EN_UNIFORM, "UNIFORM"));
  1309. m.addEnum("non-uniform", getEnumProperty(EN_NON_UNIFORM, "NON_UNIFORM"));
  1310. m.setDefault("uniform");
  1311. addPropertyMaker("scaling", m);
  1312. // scaling-method
  1313. m = new EnumProperty.Maker(PR_SCALING_METHOD);
  1314. m.setInherited(false);
  1315. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1316. m.addEnum("integer-pixels",
  1317. getEnumProperty(EN_INTEGER_PIXELS, "INTEGER_PIXELS"));
  1318. m.addEnum("resample-any-method",
  1319. getEnumProperty(EN_RESAMPLE_ANY_METHOD, "RESAMPLE_ANY_METHOD"));
  1320. m.setDefault("auto");
  1321. addPropertyMaker("scaling-method", m);
  1322. // width
  1323. l = new LengthProperty.Maker(PR_WIDTH);
  1324. l.setInherited(false);
  1325. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1326. l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1327. l.setDefault("auto");
  1328. addPropertyMaker("width", l);
  1329. // fox:block-progression-unit (**CUSTOM EXTENSION**)
  1330. l = new LengthProperty.Maker(PR_X_BLOCK_PROGRESSION_UNIT);
  1331. l.setInherited(false);
  1332. l.setDefault("0pt");
  1333. addPropertyMaker("fox:block-progression-unit", l);
  1334. }
  1335. private Property calcWritingModeDependent ( int pv, int wm ) {
  1336. if ( pv == EN_LEFT ) {
  1337. if ( wm == Constants.EN_LR_TB ) {
  1338. pv = EN_START;
  1339. } else if ( wm == Constants.EN_RL_TB ) {
  1340. pv = EN_END;
  1341. } else {
  1342. pv = EN_START;
  1343. }
  1344. } else if ( pv == EN_RIGHT ) {
  1345. if ( wm == Constants.EN_LR_TB ) {
  1346. pv = EN_END;
  1347. } else if ( wm == Constants.EN_RL_TB ) {
  1348. pv = EN_START;
  1349. } else {
  1350. pv = EN_END;
  1351. }
  1352. }
  1353. return makeWritingModeDependentEnum ( pv );
  1354. }
  1355. private Property makeWritingModeDependentEnum ( int pv ) {
  1356. if ( pv == EN_START ) {
  1357. return getEnumProperty ( EN_START, "START" );
  1358. } else if ( pv == EN_END ) {
  1359. return getEnumProperty ( EN_END, "END" );
  1360. } else {
  1361. return null;
  1362. }
  1363. }
  1364. private void createBlockAndLineProperties() { // CSOK: MethodLength
  1365. PropertyMaker m;
  1366. // hyphenation-keep
  1367. m = new EnumProperty.Maker(PR_HYPHENATION_KEEP);
  1368. m.setInherited(true);
  1369. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1370. m.addEnum("column", getEnumProperty(EN_COLUMN, "COLUMN"));
  1371. m.addEnum("page", getEnumProperty(EN_PAGE, "PAGE"));
  1372. m.setDefault("auto");
  1373. addPropertyMaker("hyphenation-keep", m);
  1374. // hyphenation-ladder-count
  1375. m = new NumberProperty.Maker(PR_HYPHENATION_LADDER_COUNT);
  1376. m.setInherited(true);
  1377. m.addEnum("no-limit", getEnumProperty(EN_NO_LIMIT, "NO_LIMIT"));
  1378. m.setDefault("no-limit");
  1379. addPropertyMaker("hyphenation-ladder-count", m);
  1380. // last-line-end-indent
  1381. m = new LengthProperty.Maker(PR_LAST_LINE_END_INDENT);
  1382. m.setInherited(true);
  1383. m.setDefault("0pt");
  1384. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1385. addPropertyMaker("last-line-end-indent", m);
  1386. // line-height
  1387. m = new LineHeightPropertyMaker(PR_LINE_HEIGHT);
  1388. m.useGeneric(genericSpace);
  1389. m.setInherited(true);
  1390. m.addKeyword("normal", "1.2");
  1391. m.setPercentBase(LengthBase.FONTSIZE);
  1392. m.setDefault("normal", true);
  1393. m.addShorthand(generics[PR_FONT]);
  1394. addPropertyMaker("line-height", m);
  1395. // line-height-shift-adjustment
  1396. m = new EnumProperty.Maker(PR_LINE_HEIGHT_SHIFT_ADJUSTMENT);
  1397. m.setInherited(true);
  1398. m.addEnum("consider-shifts", getEnumProperty(EN_CONSIDER_SHIFTS, "CONSIDER_SHIFTS"));
  1399. m.addEnum("disregard-shifts", getEnumProperty(EN_DISREGARD_SHIFTS, "DISREGARD_SHIFTS"));
  1400. m.setDefault("consider-shifts");
  1401. addPropertyMaker("line-height-shift-adjustment", m);
  1402. // line-stacking-strategy
  1403. m = new EnumProperty.Maker(PR_LINE_STACKING_STRATEGY);
  1404. m.setInherited(true);
  1405. m.addEnum("line-height", getEnumProperty(EN_LINE_HEIGHT, "LINE_HEIGHT"));
  1406. m.addEnum("font-height", getEnumProperty(EN_FONT_HEIGHT, "FONT_HEIGHT"));
  1407. m.addEnum("max-height", getEnumProperty(EN_MAX_HEIGHT, "MAX_HEIGHT"));
  1408. m.setDefault("max-height");
  1409. addPropertyMaker("line-stacking-strategy", m);
  1410. // linefeed-treatment
  1411. m = new EnumProperty.Maker(PR_LINEFEED_TREATMENT);
  1412. m.setInherited(true);
  1413. m.addEnum("ignore", getEnumProperty(EN_IGNORE, "IGNORE"));
  1414. m.addEnum("preserve", getEnumProperty(EN_PRESERVE, "PRESERVE"));
  1415. m.addEnum("treat-as-space", getEnumProperty(EN_TREAT_AS_SPACE, "TREAT_AS_SPACE"));
  1416. m.addEnum("treat-as-zero-width-space",
  1417. getEnumProperty(EN_TREAT_AS_ZERO_WIDTH_SPACE,
  1418. "TREAT_AS_ZERO_WIDTH_SPACE"));
  1419. m.setDefault("treat-as-space");
  1420. m.addShorthand(generics[PR_WHITE_SPACE]);
  1421. addPropertyMaker("linefeed-treatment", m);
  1422. // white-space-treatment
  1423. m = new EnumProperty.Maker(PR_WHITE_SPACE_TREATMENT);
  1424. m.setInherited(true);
  1425. m.addEnum("ignore", getEnumProperty(EN_IGNORE, "IGNORE"));
  1426. m.addEnum("preserve", getEnumProperty(EN_PRESERVE, "PRESERVE"));
  1427. m.addEnum("ignore-if-before-linefeed",
  1428. getEnumProperty(EN_IGNORE_IF_BEFORE_LINEFEED,
  1429. "IGNORE_IF_BEFORE_LINEFEED"));
  1430. m.addEnum("ignore-if-after-linefeed",
  1431. getEnumProperty(EN_IGNORE_IF_AFTER_LINEFEED,
  1432. "IGNORE_IF_AFTER_LINEFEED"));
  1433. m.addEnum("ignore-if-surrounding-linefeed",
  1434. getEnumProperty(EN_IGNORE_IF_SURROUNDING_LINEFEED,
  1435. "IGNORE_IF_SURROUNDING_LINEFEED"));
  1436. m.setDefault("ignore-if-surrounding-linefeed");
  1437. m.addShorthand(generics[PR_WHITE_SPACE]);
  1438. addPropertyMaker("white-space-treatment", m);
  1439. // text-align TODO: make it a StringProperty with enums.
  1440. m = new EnumProperty.Maker(PR_TEXT_ALIGN) {
  1441. public Property get(int subpropId, PropertyList propertyList,
  1442. boolean bTryInherit, boolean bTryDefault) throws PropertyException {
  1443. Property p = super.get(subpropId, propertyList, bTryInherit, bTryDefault);
  1444. if ( p != null ) {
  1445. int pv = p.getEnum();
  1446. if ( ( pv == EN_LEFT ) || ( pv == EN_RIGHT ) ) {
  1447. p = calcWritingModeDependent
  1448. ( pv, propertyList.get(Constants.PR_WRITING_MODE).getEnum() );
  1449. }
  1450. }
  1451. return p;
  1452. }
  1453. };
  1454. m.setInherited(true);
  1455. m.addEnum("center", getEnumProperty(EN_CENTER, "CENTER"));
  1456. m.addEnum("end", getEnumProperty(EN_END, "END"));
  1457. m.addEnum("start", getEnumProperty(EN_START, "START"));
  1458. m.addEnum("justify", getEnumProperty(EN_JUSTIFY, "JUSTIFY"));
  1459. // [GA] must defer writing-mode relative mapping of left/right
  1460. m.addEnum("left", getEnumProperty(EN_LEFT, "LEFT"));
  1461. m.addEnum("right", getEnumProperty(EN_RIGHT, "RIGHT"));
  1462. // [GA] inside and outside are not correctly implemented by the following mapping
  1463. m.addEnum("inside", getEnumProperty(EN_START, "START"));
  1464. m.addEnum("outside", getEnumProperty(EN_END, "END"));
  1465. m.setDefault("start");
  1466. addPropertyMaker("text-align", m);
  1467. // text-align-last
  1468. m = new EnumProperty.Maker(PR_TEXT_ALIGN_LAST) {
  1469. public Property get(int subpropId, PropertyList propertyList,
  1470. boolean bTryInherit, boolean bTryDefault) throws PropertyException {
  1471. Property p = super.get(subpropId, propertyList, bTryInherit, bTryDefault);
  1472. if (p != null && p.getEnum() == EN_RELATIVE) {
  1473. //The default may have been returned, so check inherited value
  1474. p = propertyList.getNearestSpecified(PR_TEXT_ALIGN_LAST);
  1475. if (p.getEnum() == EN_RELATIVE) {
  1476. return calcRelative(propertyList);
  1477. }
  1478. }
  1479. return p;
  1480. }
  1481. private Property calcRelative(PropertyList propertyList) throws PropertyException {
  1482. Property corresponding = propertyList.get(PR_TEXT_ALIGN);
  1483. if (corresponding == null) {
  1484. return null;
  1485. }
  1486. int correspondingValue = corresponding.getEnum();
  1487. if (correspondingValue == EN_JUSTIFY) {
  1488. return getEnumProperty(EN_START, "START");
  1489. } else if (correspondingValue == EN_END) {
  1490. return getEnumProperty(EN_END, "END");
  1491. } else if (correspondingValue == EN_START) {
  1492. return getEnumProperty(EN_START, "START");
  1493. } else if (correspondingValue == EN_CENTER) {
  1494. return getEnumProperty(EN_CENTER, "CENTER");
  1495. } else if (correspondingValue == EN_LEFT) {
  1496. return calcWritingModeDependent
  1497. ( EN_LEFT, propertyList.get(Constants.PR_WRITING_MODE).getEnum() );
  1498. } else if (correspondingValue == EN_RIGHT) {
  1499. return calcWritingModeDependent
  1500. ( EN_RIGHT, propertyList.get(Constants.PR_WRITING_MODE).getEnum() );
  1501. } else {
  1502. return null;
  1503. }
  1504. }
  1505. };
  1506. m.setInherited(false); //Actually it's "true" but the special PropertyMaker compensates
  1507. // Note: both 'end', 'right' and 'outside' are mapped to END
  1508. // both 'start', 'left' and 'inside' are mapped to START
  1509. m.addEnum("relative", getEnumProperty(EN_RELATIVE, "RELATIVE"));
  1510. m.addEnum("center", getEnumProperty(EN_CENTER, "CENTER"));
  1511. m.addEnum("end", getEnumProperty(EN_END, "END"));
  1512. m.addEnum("right", getEnumProperty(EN_END, "END"));
  1513. m.addEnum("start", getEnumProperty(EN_START, "START"));
  1514. m.addEnum("left", getEnumProperty(EN_START, "START"));
  1515. m.addEnum("justify", getEnumProperty(EN_JUSTIFY, "JUSTIFY"));
  1516. m.addEnum("inside", getEnumProperty(EN_START, "START"));
  1517. m.addEnum("outside", getEnumProperty(EN_END, "END"));
  1518. m.setDefault("relative", true);
  1519. addPropertyMaker("text-align-last", m);
  1520. // text-indent
  1521. m = new LengthProperty.Maker(PR_TEXT_INDENT);
  1522. m.setInherited(true);
  1523. m.setDefault("0pt");
  1524. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1525. addPropertyMaker("text-indent", m);
  1526. // white-space-collapse
  1527. m = new EnumProperty.Maker(PR_WHITE_SPACE_COLLAPSE);
  1528. m.useGeneric(genericBoolean);
  1529. m.setInherited(true);
  1530. m.setDefault("true");
  1531. m.addShorthand(generics[PR_WHITE_SPACE]);
  1532. addPropertyMaker("white-space-collapse", m);
  1533. // wrap-option
  1534. m = new EnumProperty.Maker(PR_WRAP_OPTION);
  1535. m.setInherited(true);
  1536. m.addEnum("wrap", getEnumProperty(EN_WRAP, "WRAP"));
  1537. m.addEnum("no-wrap", getEnumProperty(EN_NO_WRAP, "NO_WRAP"));
  1538. m.setDefault("wrap");
  1539. m.addShorthand(generics[PR_WHITE_SPACE]);
  1540. addPropertyMaker("wrap-option", m);
  1541. }
  1542. private void createCharacterProperties() {
  1543. PropertyMaker m;
  1544. // character
  1545. m = new CharacterProperty.Maker(PR_CHARACTER);
  1546. m.setInherited(false);
  1547. m.setDefault("none");
  1548. addPropertyMaker("character", m);
  1549. // letter-spacing
  1550. m = new SpacingPropertyMaker(PR_LETTER_SPACING);
  1551. m.useGeneric(genericSpace);
  1552. m.setInherited(true);
  1553. m.getSubpropMaker(CP_PRECEDENCE).setDefault("force");
  1554. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  1555. m.setDefault("normal");
  1556. m.addEnum("normal", getEnumProperty(EN_NORMAL, "NORMAL"));
  1557. addPropertyMaker("letter-spacing", m);
  1558. // suppress-at-line-break
  1559. m = new EnumProperty.Maker(PR_SUPPRESS_AT_LINE_BREAK);
  1560. m.setInherited(false);
  1561. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1562. m.addEnum("suppress", getEnumProperty(EN_SUPPRESS, "SUPPRESS"));
  1563. m.addEnum("retain", getEnumProperty(EN_RETAIN, "RETAIN"));
  1564. m.setDefault("auto");
  1565. addPropertyMaker("suppress-at-line-break", m);
  1566. // text-decoration
  1567. //m = new EnumProperty.Maker(PR_TEXT_DECORATION);
  1568. m = new TextDecorationMaker(PR_TEXT_DECORATION);
  1569. m.setInherited(false);
  1570. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  1571. m.addEnum("underline", getEnumProperty(EN_UNDERLINE, "UNDERLINE"));
  1572. m.addEnum("overline", getEnumProperty(EN_OVERLINE, "OVERLINE"));
  1573. m.addEnum("line-through", getEnumProperty(EN_LINE_THROUGH, "LINE_THROUGH"));
  1574. m.addEnum("blink", getEnumProperty(EN_BLINK, "BLINK"));
  1575. m.addEnum("no-underline", getEnumProperty(EN_NO_UNDERLINE, "NO_UNDERLINE"));
  1576. m.addEnum("no-overline", getEnumProperty(EN_NO_OVERLINE, "NO_OVERLINE"));
  1577. m.addEnum("no-line-through", getEnumProperty(EN_NO_LINE_THROUGH, "NO_LINE_THROUGH"));
  1578. m.addEnum("no-blink", getEnumProperty(EN_NO_BLINK, "NO_BLINK"));
  1579. m.setDefault("none");
  1580. addPropertyMaker("text-decoration", m);
  1581. // text-shadow
  1582. m = new ToBeImplementedProperty.Maker(PR_TEXT_SHADOW);
  1583. m.setInherited(false);
  1584. m.setDefault("none");
  1585. addPropertyMaker("text-shadow", m);
  1586. // text-transform
  1587. m = new EnumProperty.Maker(PR_TEXT_TRANSFORM);
  1588. m.setInherited(true);
  1589. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  1590. m.addEnum("capitalize", getEnumProperty(EN_CAPITALIZE, "CAPITALIZE"));
  1591. m.addEnum("uppercase", getEnumProperty(EN_UPPERCASE, "UPPERCASE"));
  1592. m.addEnum("lowercase", getEnumProperty(EN_LOWERCASE, "LOWERCASE"));
  1593. m.setDefault("none");
  1594. addPropertyMaker("text-transform", m);
  1595. // treat-as-word-space
  1596. m = new EnumProperty.Maker(PR_TREAT_AS_WORD_SPACE);
  1597. m.useGeneric(genericBoolean);
  1598. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1599. m.setInherited(false);
  1600. m.setDefault("auto");
  1601. addPropertyMaker("treat-as-word-space", m);
  1602. // word-spacing
  1603. m = new SpacingPropertyMaker(PR_WORD_SPACING);
  1604. m.useGeneric(genericSpace);
  1605. m.setInherited(true);
  1606. m.getSubpropMaker(CP_PRECEDENCE).setDefault("force");
  1607. m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
  1608. m.setDefault("normal");
  1609. m.addEnum("normal", getEnumProperty(EN_NORMAL, "NORMAL"));
  1610. addPropertyMaker("word-spacing", m);
  1611. }
  1612. private void createColorProperties() {
  1613. PropertyMaker m;
  1614. // color
  1615. m = new ColorProperty.Maker(PR_COLOR);
  1616. m.useGeneric(genericColor);
  1617. m.setInherited(true);
  1618. m.setDefault("black");
  1619. addPropertyMaker("color", m);
  1620. // color-profile-name
  1621. m = new StringProperty.Maker(PR_COLOR_PROFILE_NAME);
  1622. m.setInherited(false);
  1623. m.setDefault("");
  1624. addPropertyMaker("color-profile-name", m);
  1625. // rendering-intent
  1626. m = new EnumProperty.Maker(PR_RENDERING_INTENT);
  1627. m.setInherited(false);
  1628. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1629. m.addEnum("perceptual", getEnumProperty(EN_PERCEPTUAL, "PERCEPTUAL"));
  1630. m.addEnum("relative-colorimetric", getEnumProperty(EN_RELATIVE_COLOMETRIC,
  1631. "RELATIVE_COLOMETRIC"));
  1632. m.addEnum("saturation", getEnumProperty(EN_SATURATION, "SATURATION"));
  1633. m.addEnum("absolute-colorimetric", getEnumProperty(EN_ABSOLUTE_COLORMETRIC,
  1634. "ABSOLUTE_COLORMETRIC"));
  1635. m.setDefault("auto");
  1636. addPropertyMaker("rendering-intent", m);
  1637. }
  1638. private void createFloatProperties() {
  1639. PropertyMaker m;
  1640. // clear
  1641. m = new EnumProperty.Maker(PR_CLEAR);
  1642. m.setInherited(false);
  1643. // Note that left -> start and right -> end.
  1644. m.addEnum("start", getEnumProperty(EN_START, "START"));
  1645. m.addEnum("end", getEnumProperty(EN_END, "END"));
  1646. m.addEnum("left", getEnumProperty(EN_START, "START"));
  1647. m.addEnum("right", getEnumProperty(EN_END, "END"));
  1648. m.addEnum("both", getEnumProperty(EN_BOTH, "BOTH"));
  1649. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  1650. m.setDefault("none");
  1651. addPropertyMaker("clear", m);
  1652. // float
  1653. m = new EnumProperty.Maker(PR_FLOAT);
  1654. m.setInherited(false);
  1655. // Note that left -> start and right -> end.
  1656. m.addEnum("before", getEnumProperty(EN_BEFORE, "BEFORE"));
  1657. m.addEnum("start", getEnumProperty(EN_START, "START"));
  1658. m.addEnum("end", getEnumProperty(EN_END, "END"));
  1659. m.addEnum("left", getEnumProperty(EN_START, "START"));
  1660. m.addEnum("right", getEnumProperty(EN_END, "END"));
  1661. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  1662. m.setDefault("none");
  1663. addPropertyMaker("float", m);
  1664. // intrusion-displace
  1665. m = new EnumProperty.Maker(PR_INTRUSION_DISPLACE);
  1666. m.setInherited(false);
  1667. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1668. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  1669. m.addEnum("line", getEnumProperty(EN_LINE, "LINE"));
  1670. m.addEnum("indent", getEnumProperty(EN_INDENT, "INDENT"));
  1671. m.addEnum("block", getEnumProperty(EN_BLOCK, "BLOCK"));
  1672. m.setDefault("none");
  1673. addPropertyMaker("intrusion-displace", m);
  1674. }
  1675. private void createKeepsAndBreaksProperties() {
  1676. PropertyMaker m;
  1677. // break-after
  1678. m = new EnumProperty.Maker(PR_BREAK_AFTER);
  1679. m.useGeneric(genericBreak);
  1680. m.addShorthand(generics[PR_PAGE_BREAK_AFTER]);
  1681. addPropertyMaker("break-after", m);
  1682. // break-before
  1683. m = new EnumProperty.Maker(PR_BREAK_BEFORE);
  1684. m.useGeneric(genericBreak);
  1685. m.addShorthand(generics[PR_PAGE_BREAK_BEFORE]);
  1686. addPropertyMaker("break-before", m);
  1687. // keep-together
  1688. m = new KeepProperty.Maker(PR_KEEP_TOGETHER);
  1689. m.useGeneric(genericKeep);
  1690. m.setInherited(true);
  1691. m.setDefault("auto");
  1692. m.addShorthand(generics[PR_PAGE_BREAK_INSIDE]);
  1693. addPropertyMaker("keep-together", m);
  1694. // keep-with-next
  1695. m = new KeepProperty.Maker(PR_KEEP_WITH_NEXT);
  1696. m.useGeneric(genericKeep);
  1697. m.setInherited(false);
  1698. m.setDefault("auto");
  1699. m.addShorthand(generics[PR_PAGE_BREAK_AFTER]);
  1700. addPropertyMaker("keep-with-next", m);
  1701. // keep-with-previous
  1702. m = new KeepProperty.Maker(PR_KEEP_WITH_PREVIOUS);
  1703. m.useGeneric(genericKeep);
  1704. m.setInherited(false);
  1705. m.setDefault("auto");
  1706. m.addShorthand(generics[PR_PAGE_BREAK_BEFORE]);
  1707. addPropertyMaker("keep-with-previous", m);
  1708. // orphans
  1709. m = new NumberProperty.Maker(PR_ORPHANS);
  1710. m.setInherited(true);
  1711. m.setDefault("2");
  1712. addPropertyMaker("orphans", m);
  1713. // widows
  1714. m = new NumberProperty.Maker(PR_WIDOWS);
  1715. m.setInherited(true);
  1716. m.setDefault("2");
  1717. addPropertyMaker("widows", m);
  1718. // fox:widow-content-limit
  1719. m = new LengthProperty.Maker(PR_X_WIDOW_CONTENT_LIMIT);
  1720. m.setInherited(true);
  1721. m.setDefault("0pt");
  1722. addPropertyMaker("fox:widow-content-limit", m);
  1723. // fox:orphan-content-limit
  1724. m = new LengthProperty.Maker(PR_X_ORPHAN_CONTENT_LIMIT);
  1725. m.setInherited(true);
  1726. m.setDefault("0pt");
  1727. addPropertyMaker("fox:orphan-content-limit", m);
  1728. }
  1729. private void createLayoutProperties() {
  1730. PropertyMaker m;
  1731. // clip
  1732. m = new ToBeImplementedProperty.Maker(PR_CLIP);
  1733. m.setInherited(false);
  1734. m.setDefault("auto");
  1735. addPropertyMaker("clip", m);
  1736. // overflow
  1737. m = new EnumProperty.Maker(PR_OVERFLOW);
  1738. m.setInherited(false);
  1739. m.addEnum("visible", getEnumProperty(EN_VISIBLE, "VISIBLE"));
  1740. m.addEnum("hidden", getEnumProperty(EN_HIDDEN, "HIDDEN"));
  1741. m.addEnum("scroll", getEnumProperty(EN_SCROLL, "SCROLL"));
  1742. m.addEnum("error-if-overflow", getEnumProperty(EN_ERROR_IF_OVERFLOW, "ERROR_IF_OVERFLOW"));
  1743. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1744. m.setDefault("auto");
  1745. addPropertyMaker("overflow", m);
  1746. // reference-orientation
  1747. m = new ReferenceOrientationMaker(PR_REFERENCE_ORIENTATION);
  1748. m.setInherited(true);
  1749. m.setDefault("0");
  1750. addPropertyMaker("reference-orientation", m);
  1751. // span
  1752. m = new EnumProperty.Maker(PR_SPAN);
  1753. m.setInherited(false);
  1754. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  1755. m.addEnum("all", getEnumProperty(EN_ALL, "ALL"));
  1756. m.setDefault("none");
  1757. addPropertyMaker("span", m);
  1758. // fox:disable-column-balancing
  1759. m = new EnumProperty.Maker(PR_X_DISABLE_COLUMN_BALANCING);
  1760. m.useGeneric(genericBoolean);
  1761. m.setInherited(true);
  1762. m.setDefault("false");
  1763. addPropertyMaker("fox:disable-column-balancing", m);
  1764. }
  1765. private void createLeaderAndRuleProperties() {
  1766. PropertyMaker m;
  1767. PropertyMaker sub;
  1768. // leader-alignment
  1769. m = new EnumProperty.Maker(PR_LEADER_ALIGNMENT);
  1770. m.setInherited(true);
  1771. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  1772. m.addEnum("reference-area", getEnumProperty(EN_REFERENCE_AREA, "REFERENCE_AREA"));
  1773. m.addEnum("page", getEnumProperty(EN_PAGE, "PAGE"));
  1774. m.setDefault("none");
  1775. addPropertyMaker("leader-alignment", m);
  1776. // leader-pattern
  1777. m = new EnumProperty.Maker(PR_LEADER_PATTERN);
  1778. m.setInherited(true);
  1779. m.addEnum("space", getEnumProperty(EN_SPACE, "SPACE"));
  1780. m.addEnum("rule", getEnumProperty(EN_RULE, "RULE"));
  1781. m.addEnum("dots", getEnumProperty(EN_DOTS, "DOTS"));
  1782. m.addEnum("use-content", getEnumProperty(EN_USECONTENT, "USECONTENT"));
  1783. m.setDefault("space");
  1784. addPropertyMaker("leader-pattern", m);
  1785. // leader-pattern-width
  1786. m = new LengthProperty.Maker(PR_LEADER_PATTERN_WIDTH);
  1787. m.setInherited(true);
  1788. m.setDefault("use-font-metrics", true);
  1789. m.addKeyword("use-font-metrics", "0pt");
  1790. m.setPercentBase(LengthBase.PARENT_AREA_WIDTH);
  1791. addPropertyMaker("leader-pattern-width", m);
  1792. // leader-length
  1793. m = new LengthRangeProperty.Maker(PR_LEADER_LENGTH);
  1794. m.setInherited(true);
  1795. m.setPercentBase(LengthBase.PARENT_AREA_WIDTH);
  1796. sub = new LengthProperty.Maker(CP_MINIMUM);
  1797. sub.setDefault("0pt");
  1798. sub.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1799. sub.setByShorthand(true);
  1800. m.addSubpropMaker(sub);
  1801. sub = new LengthProperty.Maker(CP_OPTIMUM);
  1802. sub.setDefault("12.0pt");
  1803. sub.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1804. sub.setByShorthand(true);
  1805. m.addSubpropMaker(sub);
  1806. sub = new LengthProperty.Maker(CP_MAXIMUM);
  1807. sub.setDefault("100%", true);
  1808. sub.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  1809. sub.setByShorthand(true);
  1810. m.addSubpropMaker(sub);
  1811. addPropertyMaker("leader-length", m);
  1812. // rule-style
  1813. m = new EnumProperty.Maker(PR_RULE_STYLE);
  1814. m.setInherited(true);
  1815. m.addEnum("none", getEnumProperty(EN_NONE, "NONE"));
  1816. m.addEnum("dotted", getEnumProperty(EN_DOTTED, "DOTTED"));
  1817. m.addEnum("dashed", getEnumProperty(EN_DASHED, "DASHED"));
  1818. m.addEnum("solid", getEnumProperty(EN_SOLID, "SOLID"));
  1819. m.addEnum("double", getEnumProperty(EN_DOUBLE, "DOUBLE"));
  1820. m.addEnum("groove", getEnumProperty(EN_GROOVE, "GROOVE"));
  1821. m.addEnum("ridge", getEnumProperty(EN_RIDGE, "RIDGE"));
  1822. m.setDefault("solid");
  1823. addPropertyMaker("rule-style", m);
  1824. // rule-thickness
  1825. m = new LengthProperty.Maker(PR_RULE_THICKNESS);
  1826. m.setInherited(true);
  1827. m.setDefault("1.0pt");
  1828. addPropertyMaker("rule-thickness", m);
  1829. }
  1830. private void createDynamicProperties() {
  1831. PropertyMaker m;
  1832. // active-state
  1833. m = new ToBeImplementedProperty.Maker(PR_ACTIVE_STATE);
  1834. m.setInherited(false);
  1835. m.setDefault("");
  1836. addPropertyMaker("active-state", m);
  1837. // auto-restore
  1838. m = new ToBeImplementedProperty.Maker(PR_AUTO_RESTORE);
  1839. m.setInherited(true);
  1840. m.setDefault("false");
  1841. addPropertyMaker("auto-restore", m);
  1842. // case-name
  1843. m = new ToBeImplementedProperty.Maker(PR_CASE_NAME);
  1844. m.setInherited(false);
  1845. m.setDefault("");
  1846. addPropertyMaker("case-name", m);
  1847. // case-title
  1848. m = new ToBeImplementedProperty.Maker(PR_CASE_TITLE);
  1849. m.setInherited(false);
  1850. m.setDefault("");
  1851. addPropertyMaker("case-title", m);
  1852. // destination-placement-offset
  1853. m = new ToBeImplementedProperty.Maker(PR_DESTINATION_PLACEMENT_OFFSET);
  1854. m.setInherited(false);
  1855. m.setDefault("0pt");
  1856. addPropertyMaker("destination-placement-offset", m);
  1857. // external-destination
  1858. m = new StringProperty.Maker(PR_EXTERNAL_DESTINATION);
  1859. m.setInherited(false);
  1860. m.setDefault("");
  1861. addPropertyMaker("external-destination", m);
  1862. // indicate-destination
  1863. m = new ToBeImplementedProperty.Maker(PR_INDICATE_DESTINATION);
  1864. m.setInherited(false);
  1865. m.setDefault("false");
  1866. addPropertyMaker("indicate-destination", m);
  1867. // internal-destination
  1868. m = new StringProperty.Maker(PR_INTERNAL_DESTINATION);
  1869. m.setInherited(false);
  1870. m.setDefault("");
  1871. addPropertyMaker("internal-destination", m);
  1872. // show-destination
  1873. m = new EnumProperty.Maker(PR_SHOW_DESTINATION);
  1874. m.setInherited(false);
  1875. m.addEnum("new", getEnumProperty(EN_NEW, "NEW"));
  1876. m.addEnum("replace", getEnumProperty(EN_REPLACE, "REPLACE"));
  1877. m.setDefault("replace");
  1878. addPropertyMaker("show-destination", m);
  1879. // starting-state
  1880. m = new EnumProperty.Maker(PR_STARTING_STATE);
  1881. m.setInherited(false);
  1882. m.addEnum("show", getEnumProperty(EN_SHOW, "SHOW"));
  1883. m.addEnum("hide", getEnumProperty(EN_HIDE, "HIDE"));
  1884. m.setDefault("show");
  1885. addPropertyMaker("starting-state", m);
  1886. // switch-to
  1887. m = new ToBeImplementedProperty.Maker(PR_SWITCH_TO);
  1888. m.setInherited(false);
  1889. m.setDefault("xsl-any");
  1890. addPropertyMaker("switch-to", m);
  1891. // target-presentation-context
  1892. m = new ToBeImplementedProperty.Maker(PR_TARGET_PRESENTATION_CONTEXT);
  1893. m.setInherited(false);
  1894. m.setDefault("use-target-processing-context");
  1895. addPropertyMaker("target-presentation-context", m);
  1896. // target-processing-context
  1897. m = new ToBeImplementedProperty.Maker(PR_TARGET_PROCESSING_CONTEXT);
  1898. m.setInherited(false);
  1899. m.setDefault("document-root");
  1900. addPropertyMaker("target-processing-context", m);
  1901. // target-stylesheet
  1902. m = new ToBeImplementedProperty.Maker(PR_TARGET_STYLESHEET);
  1903. m.setInherited(false);
  1904. m.setDefault("use-normal-stylesheet");
  1905. addPropertyMaker("target-stylesheet", m);
  1906. }
  1907. private void createMarkersProperties() {
  1908. PropertyMaker m;
  1909. // marker-class-name
  1910. m = new StringProperty.Maker(PR_MARKER_CLASS_NAME);
  1911. m.setInherited(false);
  1912. m.setDefault("");
  1913. addPropertyMaker("marker-class-name", m);
  1914. // retrieve-class-name
  1915. m = new StringProperty.Maker(PR_RETRIEVE_CLASS_NAME);
  1916. m.setInherited(false);
  1917. m.setDefault("");
  1918. addPropertyMaker("retrieve-class-name", m);
  1919. // retrieve-position
  1920. m = new EnumProperty.Maker(PR_RETRIEVE_POSITION);
  1921. m.setInherited(false);
  1922. m.addEnum("first-starting-within-page", getEnumProperty(EN_FSWP, "FSWP"));
  1923. m.addEnum("first-including-carryover", getEnumProperty(EN_FIC, "FIC"));
  1924. m.addEnum("last-starting-within-page", getEnumProperty(EN_LSWP, "LSWP"));
  1925. m.addEnum("last-ending-within-page", getEnumProperty(EN_LEWP, "LEWP"));
  1926. m.setDefault("first-starting-within-page");
  1927. addPropertyMaker("retrieve-position", m);
  1928. // retrieve-boundary
  1929. m = new EnumProperty.Maker(PR_RETRIEVE_BOUNDARY);
  1930. m.setInherited(false);
  1931. m.addEnum("page", getEnumProperty(EN_PAGE, "PAGE"));
  1932. m.addEnum("page-sequence", getEnumProperty(EN_PAGE_SEQUENCE, "PAGE_SEQUENCE"));
  1933. m.addEnum("document", getEnumProperty(EN_DOCUMENT, "DOCUMENT"));
  1934. m.setDefault("page-sequence");
  1935. addPropertyMaker("retrieve-boundary", m);
  1936. // retrieve-position-within-table
  1937. m = new EnumProperty.Maker(PR_RETRIEVE_POSITION_WITHIN_TABLE);
  1938. m.setInherited(false);
  1939. m.addEnum("first-starting", getEnumProperty(EN_FIRST_STARTING, "FIRST_STARTING"));
  1940. m.addEnum("first-including-carryover", getEnumProperty(EN_FIC, "FIC"));
  1941. m.addEnum("last-starting", getEnumProperty(EN_LAST_STARTING, "LAST_STARTING"));
  1942. m.addEnum("last-ending", getEnumProperty(EN_LAST_ENDING, "LAST_ENDING"));
  1943. m.setDefault("first-starting");
  1944. addPropertyMaker("retrieve-position-within-table", m);
  1945. // retrieve-boundary-within-table
  1946. m = new EnumProperty.Maker(PR_RETRIEVE_BOUNDARY_WITHIN_TABLE);
  1947. m.setInherited(false);
  1948. m.addEnum("table", getEnumProperty(EN_TABLE, "TABLE"));
  1949. m.addEnum("table-fragment", getEnumProperty(EN_TABLE_FRAGMENT, "TABLE_FRAGMENT"));
  1950. m.addEnum("page", getEnumProperty(EN_DOCUMENT, "PAGE"));
  1951. m.setDefault("table");
  1952. addPropertyMaker("retrieve-boundary-within-table", m);
  1953. }
  1954. private void createNumberToStringProperties() {
  1955. PropertyMaker m;
  1956. // format
  1957. m = new StringProperty.Maker(PR_FORMAT);
  1958. m.setInherited(false);
  1959. m.setDefault("1");
  1960. addPropertyMaker("format", m);
  1961. // grouping-separator
  1962. m = new CharacterProperty.Maker(PR_GROUPING_SEPARATOR);
  1963. m.setInherited(false);
  1964. m.setDefault("none");
  1965. addPropertyMaker("grouping-separator", m);
  1966. // grouping-size
  1967. m = new NumberProperty.Maker(PR_GROUPING_SIZE);
  1968. m.setInherited(false);
  1969. m.setDefault("0");
  1970. addPropertyMaker("grouping-size", m);
  1971. // letter-value
  1972. m = new EnumProperty.Maker(PR_LETTER_VALUE);
  1973. m.setInherited(false);
  1974. m.addEnum("alphabetic", getEnumProperty(EN_ALPHABETIC, "ALPHABETIC"));
  1975. m.addEnum("traditional", getEnumProperty(EN_TRADITIONAL, "TRADITIONAL"));
  1976. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  1977. m.setDefault("auto");
  1978. addPropertyMaker("letter-value", m);
  1979. // fox:alt-text, used for accessibility
  1980. m = new StringProperty.Maker(PR_X_NUMBER_CONVERSION_FEATURES);
  1981. m.setInherited(false);
  1982. m.setDefault("");
  1983. addPropertyMaker("fox:number-conversion-features", m);
  1984. }
  1985. private void createPaginationAndLayoutProperties() {
  1986. PropertyMaker m;
  1987. LengthProperty.Maker l;
  1988. // blank-or-not-blank
  1989. m = new EnumProperty.Maker(PR_BLANK_OR_NOT_BLANK);
  1990. m.setInherited(false);
  1991. m.addEnum("blank", getEnumProperty(EN_BLANK, "BLANK"));
  1992. m.addEnum("not-blank", getEnumProperty(EN_NOT_BLANK, "NOT_BLANK"));
  1993. m.addEnum("any", getEnumProperty(EN_ANY, "ANY"));
  1994. m.setDefault("any");
  1995. addPropertyMaker("blank-or-not-blank", m);
  1996. // column-count
  1997. m = new NumberProperty.PositiveIntegerMaker(PR_COLUMN_COUNT);
  1998. m.setInherited(false);
  1999. m.setDefault("1");
  2000. addPropertyMaker("column-count", m);
  2001. // column-gap
  2002. l = new LengthProperty.Maker(PR_COLUMN_GAP);
  2003. l.setInherited(false);
  2004. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2005. l.setDefault("0.25in");
  2006. addPropertyMaker("column-gap", l);
  2007. // extent
  2008. m = new LengthProperty.Maker(PR_EXTENT);
  2009. m.setInherited(true);
  2010. m.setDefault("0pt");
  2011. m.setPercentBase(LengthBase.CUSTOM_BASE);
  2012. addPropertyMaker("extent", m);
  2013. // flow-name
  2014. m = new StringProperty.Maker(PR_FLOW_NAME);
  2015. m.setInherited(false);
  2016. m.setDefault("");
  2017. addPropertyMaker(Flow.FLOW_NAME, m);
  2018. // force-page-count
  2019. m = new EnumProperty.Maker(PR_FORCE_PAGE_COUNT);
  2020. m.setInherited(false);
  2021. m.addEnum("even", getEnumProperty(EN_EVEN, "EVEN"));
  2022. m.addEnum("odd", getEnumProperty(EN_ODD, "ODD"));
  2023. m.addEnum("end-on-even", getEnumProperty(EN_END_ON_EVEN, "END_ON_EVEN"));
  2024. m.addEnum("end-on-odd", getEnumProperty(EN_END_ON_ODD, "END_ON_ODD"));
  2025. m.addEnum("no-force", getEnumProperty(EN_NO_FORCE, "NO_FORCE"));
  2026. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2027. m.setDefault("auto");
  2028. addPropertyMaker("force-page-count", m);
  2029. // initial-page-number
  2030. m = new NumberProperty.PositiveIntegerMaker(PR_INITIAL_PAGE_NUMBER);
  2031. m.setInherited(false);
  2032. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2033. m.addEnum("auto-odd", getEnumProperty(EN_AUTO_ODD, "AUTO_ODD"));
  2034. m.addEnum("auto-even", getEnumProperty(EN_AUTO_EVEN, "AUTO_EVEN"));
  2035. m.setDefault("auto");
  2036. addPropertyMaker("initial-page-number", m);
  2037. // master-name
  2038. m = new StringProperty.Maker(PR_MASTER_NAME);
  2039. m.setInherited(false);
  2040. m.setDefault("");
  2041. addPropertyMaker("master-name", m);
  2042. // master-reference
  2043. m = new StringProperty.Maker(PR_MASTER_REFERENCE);
  2044. m.setInherited(false);
  2045. m.setDefault("");
  2046. addPropertyMaker("master-reference", m);
  2047. // maximum-repeats
  2048. m = new NumberProperty.Maker(PR_MAXIMUM_REPEATS);
  2049. m.setInherited(false);
  2050. m.addEnum("no-limit", getEnumProperty(EN_NO_LIMIT, "NO_LIMIT"));
  2051. m.setDefault("no-limit");
  2052. addPropertyMaker("maximum-repeats", m);
  2053. // media-usage
  2054. m = new EnumProperty.Maker(PR_MEDIA_USAGE);
  2055. m.setInherited(false);
  2056. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2057. m.addEnum("paginate", getEnumProperty(EN_PAGINATE, "PAGINATE"));
  2058. m.addEnum("bounded-in-one-dimension", getEnumProperty(EN_BOUNDED_IN_ONE_DIMENSION,
  2059. "BOUNDED_IN_ONE_DIMENSION"));
  2060. m.addEnum("unbounded", getEnumProperty(EN_UNBOUNDED, "UNBOUNDED"));
  2061. m.setDefault("auto");
  2062. addPropertyMaker("media-usage", m);
  2063. // odd-or-even
  2064. m = new EnumProperty.Maker(PR_ODD_OR_EVEN);
  2065. m.setInherited(false);
  2066. m.addEnum("odd", getEnumProperty(EN_ODD, "ODD"));
  2067. m.addEnum("even", getEnumProperty(EN_EVEN, "EVEN"));
  2068. m.addEnum("any", getEnumProperty(EN_ANY, "ANY"));
  2069. m.setDefault("any");
  2070. addPropertyMaker("odd-or-even", m);
  2071. // page-height
  2072. l = new PageDimensionMaker(PR_PAGE_HEIGHT);
  2073. l.setInherited(false);
  2074. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2075. l.addEnum("indefinite", getEnumProperty(EN_INDEFINITE, "INDEFINITE"));
  2076. l.setDefault("auto");
  2077. addPropertyMaker("page-height", l);
  2078. // page-position
  2079. m = new EnumProperty.Maker(PR_PAGE_POSITION);
  2080. m.setInherited(false);
  2081. m.addEnum("first", getEnumProperty(EN_FIRST, "FIRST"));
  2082. m.addEnum("last", getEnumProperty(EN_LAST, "LAST"));
  2083. m.addEnum("rest", getEnumProperty(EN_REST, "REST"));
  2084. m.addEnum("any", getEnumProperty(EN_ANY, "ANY"));
  2085. m.addEnum("only", getEnumProperty(EN_ONLY, "ONLY")); //XSL 1.1
  2086. m.setDefault("any");
  2087. addPropertyMaker("page-position", m);
  2088. // page-width
  2089. l = new PageDimensionMaker(PR_PAGE_WIDTH);
  2090. l.setInherited(false);
  2091. l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2092. l.addEnum("indefinite", getEnumProperty(EN_INDEFINITE, "INDEFINITE"));
  2093. l.setDefault("auto");
  2094. addPropertyMaker("page-width", l);
  2095. // precedence
  2096. m = new EnumProperty.Maker(PR_PRECEDENCE);
  2097. m.useGeneric(genericBoolean);
  2098. m.setInherited(false);
  2099. m.setDefault("false");
  2100. addPropertyMaker("precedence", m);
  2101. // region-name
  2102. m = new StringProperty.Maker(PR_REGION_NAME);
  2103. m.setInherited(false);
  2104. m.setDefault("");
  2105. addPropertyMaker("region-name", m);
  2106. }
  2107. private void createTableProperties() {
  2108. PropertyMaker m;
  2109. PropertyMaker sub;
  2110. // border-after-precedence
  2111. m = new TableBorderPrecedence(PR_BORDER_AFTER_PRECEDENCE);
  2112. m.setInherited(false);
  2113. m.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
  2114. addPropertyMaker("border-after-precedence", m);
  2115. // border-before-precedence
  2116. m = new TableBorderPrecedence(PR_BORDER_BEFORE_PRECEDENCE);
  2117. m.setInherited(false);
  2118. m.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
  2119. addPropertyMaker("border-before-precedence", m);
  2120. // border-collapse
  2121. m = new EnumProperty.Maker(PR_BORDER_COLLAPSE);
  2122. m.setInherited(true);
  2123. m.setDefault("collapse");
  2124. m.addEnum("separate", getEnumProperty(EN_SEPARATE, "SEPARATE"));
  2125. m.addEnum("collapse-with-precedence", getEnumProperty(
  2126. EN_COLLAPSE_WITH_PRECEDENCE, "COLLAPSE_WITH_PRECEDENCE"));
  2127. m.addEnum("collapse", getEnumProperty(EN_COLLAPSE, "COLLAPSE"));
  2128. addPropertyMaker("border-collapse", m);
  2129. // border-end-precedence
  2130. m = new TableBorderPrecedence(PR_BORDER_END_PRECEDENCE);
  2131. m.setInherited(false);
  2132. m.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
  2133. addPropertyMaker("border-end-precedence", m);
  2134. // border-separation
  2135. m = new LengthPairProperty.Maker(PR_BORDER_SEPARATION);
  2136. m.setInherited(true);
  2137. m.addShorthand(generics[PR_BORDER_SPACING]);
  2138. sub = new LengthProperty.Maker(CP_BLOCK_PROGRESSION_DIRECTION);
  2139. sub.setDefault("0pt");
  2140. sub.setByShorthand(true);
  2141. m.addSubpropMaker(sub);
  2142. sub = new LengthProperty.Maker(CP_INLINE_PROGRESSION_DIRECTION);
  2143. sub.setDefault("0pt");
  2144. sub.setByShorthand(true);
  2145. m.addSubpropMaker(sub);
  2146. addPropertyMaker("border-separation", m);
  2147. // border-start-precedence
  2148. m = new TableBorderPrecedence(PR_BORDER_START_PRECEDENCE);
  2149. m.setInherited(false);
  2150. m.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
  2151. addPropertyMaker("border-start-precedence", m);
  2152. // caption-side
  2153. m = new EnumProperty.Maker(PR_CAPTION_SIDE);
  2154. m.setInherited(true);
  2155. m.addEnum("before", getEnumProperty(EN_BEFORE, "BEFORE"));
  2156. m.addEnum("after", getEnumProperty(EN_AFTER, "AFTER"));
  2157. m.addEnum("start", getEnumProperty(EN_START, "START"));
  2158. m.addEnum("end", getEnumProperty(EN_END, "END"));
  2159. m.addEnum("top", getEnumProperty(EN_TOP, "TOP"));
  2160. m.addEnum("bottom", getEnumProperty(EN_BOTTOM, "BOTTOM"));
  2161. m.addEnum("left", getEnumProperty(EN_LEFT, "LEFT"));
  2162. m.addEnum("right", getEnumProperty(EN_RIGHT, "RIGHT"));
  2163. m.setDefault("before");
  2164. addPropertyMaker("caption-side", m);
  2165. // column-number
  2166. m = new ColumnNumberPropertyMaker(PR_COLUMN_NUMBER);
  2167. m.setInherited(false);
  2168. addPropertyMaker("column-number", m);
  2169. // column-width
  2170. m = new LengthProperty.Maker(PR_COLUMN_WIDTH);
  2171. m.setInherited(false);
  2172. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2173. m.setDefault("auto");
  2174. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  2175. addPropertyMaker("column-width", m);
  2176. // empty-cells
  2177. m = new EnumProperty.Maker(PR_EMPTY_CELLS);
  2178. m.setInherited(true);
  2179. m.addEnum("show", getEnumProperty(EN_SHOW, "SHOW"));
  2180. m.addEnum("hide", getEnumProperty(EN_HIDE, "HIDE"));
  2181. m.setDefault("show");
  2182. addPropertyMaker("empty-cells", m);
  2183. // ends-row
  2184. m = new EnumProperty.Maker(PR_ENDS_ROW);
  2185. m.setInherited(false);
  2186. m.useGeneric(genericBoolean);
  2187. m.setDefault("false");
  2188. addPropertyMaker("ends-row", m);
  2189. // number-columns-repeated
  2190. m = new NumberProperty.PositiveIntegerMaker(PR_NUMBER_COLUMNS_REPEATED);
  2191. m.setInherited(false);
  2192. m.setDefault("1");
  2193. addPropertyMaker("number-columns-repeated", m);
  2194. // number-columns-spanned
  2195. m = new NumberProperty.PositiveIntegerMaker(PR_NUMBER_COLUMNS_SPANNED);
  2196. m.setInherited(false);
  2197. m.setDefault("1");
  2198. addPropertyMaker("number-columns-spanned", m);
  2199. // number-rows-spanned
  2200. m = new NumberProperty.PositiveIntegerMaker(PR_NUMBER_ROWS_SPANNED);
  2201. m.setInherited(false);
  2202. m.setDefault("1");
  2203. addPropertyMaker("number-rows-spanned", m);
  2204. // starts-row
  2205. m = new EnumProperty.Maker(PR_STARTS_ROW);
  2206. m.useGeneric(genericBoolean);
  2207. m.setInherited(false);
  2208. m.setDefault("false");
  2209. addPropertyMaker("starts-row", m);
  2210. // table-layout
  2211. m = new EnumProperty.Maker(PR_TABLE_LAYOUT);
  2212. m.setInherited(false);
  2213. m.setDefault("auto");
  2214. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2215. m.addEnum("fixed", getEnumProperty(EN_FIXED, "FIXED"));
  2216. addPropertyMaker("table-layout", m);
  2217. // table-omit-footer-at-break
  2218. m = new EnumProperty.Maker(PR_TABLE_OMIT_FOOTER_AT_BREAK);
  2219. m.useGeneric(genericBoolean);
  2220. m.setInherited(false);
  2221. m.setDefault("false");
  2222. addPropertyMaker("table-omit-footer-at-break", m);
  2223. // table-omit-header-at-break
  2224. m = new EnumProperty.Maker(PR_TABLE_OMIT_HEADER_AT_BREAK);
  2225. m.useGeneric(genericBoolean);
  2226. m.setInherited(false);
  2227. m.setDefault("false");
  2228. addPropertyMaker("table-omit-header-at-break", m);
  2229. }
  2230. private void createWritingModeProperties() {
  2231. PropertyMaker m;
  2232. // direction
  2233. m = new EnumProperty.Maker(PR_DIRECTION);
  2234. m.setInherited(true);
  2235. m.addEnum("ltr", getEnumProperty(EN_LTR, "LTR"));
  2236. m.addEnum("rtl", getEnumProperty(EN_RTL, "RTL"));
  2237. m.setDefault("ltr");
  2238. addPropertyMaker("direction", m);
  2239. // glyph-orientation-horizontal
  2240. m = new ToBeImplementedProperty.Maker(PR_GLYPH_ORIENTATION_HORIZONTAL);
  2241. m.setInherited(true);
  2242. m.setDefault("0deg");
  2243. addPropertyMaker("glyph-orientation-horizontal", m);
  2244. // glyph-orientation-vertical
  2245. m = new ToBeImplementedProperty.Maker(PR_GLYPH_ORIENTATION_VERTICAL);
  2246. m.setInherited(true);
  2247. m.setDefault("auto");
  2248. addPropertyMaker("glyph-orientation-vertical", m);
  2249. // text-altitude
  2250. m = new LengthProperty.Maker(PR_TEXT_ALTITUDE);
  2251. m.setInherited(false);
  2252. m.addEnum("use-font-metrics", getEnumProperty(EN_USE_FONT_METRICS, "USE_FONT_METRICS"));
  2253. m.setDefault("use-font-metrics");
  2254. m.setPercentBase(LengthBase.FONTSIZE);
  2255. addPropertyMaker("text-altitude", m);
  2256. // text-depth
  2257. m = new LengthProperty.Maker(PR_TEXT_DEPTH);
  2258. m.setInherited(false);
  2259. m.addEnum("use-font-metrics", getEnumProperty(EN_USE_FONT_METRICS, "USE_FONT_METRICS"));
  2260. m.setDefault("use-font-metrics");
  2261. m.setPercentBase(LengthBase.FONTSIZE);
  2262. addPropertyMaker("text-depth", m);
  2263. // unicode-bidi
  2264. m = new EnumProperty.Maker(PR_UNICODE_BIDI);
  2265. m.setInherited(false);
  2266. m.addEnum("normal", getEnumProperty(EN_NORMAL, "NORMAL"));
  2267. m.addEnum("embed", getEnumProperty(EN_EMBED, "EMBED"));
  2268. m.addEnum("bidi-override", getEnumProperty(EN_BIDI_OVERRIDE, "BIDI_OVERRIDE"));
  2269. m.setDefault("normal");
  2270. addPropertyMaker("unicode-bidi", m);
  2271. // writing-mode
  2272. m = new EnumProperty.Maker(PR_WRITING_MODE);
  2273. m.setInherited(true);
  2274. m.setDefault("lr-tb");
  2275. m.addEnum("lr-tb", getEnumProperty(EN_LR_TB, "LR_TB"));
  2276. m.addEnum("rl-tb", getEnumProperty(EN_RL_TB, "RL_TB"));
  2277. m.addEnum("tb-rl", getEnumProperty(EN_TB_RL, "TB_RL"));
  2278. m.addEnum("tb-lr", getEnumProperty(EN_TB_LR, "TB_LR"));
  2279. m.addKeyword("lr", "lr-tb");
  2280. m.addKeyword("rl", "rl-tb");
  2281. m.addKeyword("tb", "tb-rl");
  2282. addPropertyMaker("writing-mode", m);
  2283. }
  2284. private void createMiscProperties() {
  2285. PropertyMaker m;
  2286. // content-type
  2287. m = new StringProperty.Maker(PR_CONTENT_TYPE);
  2288. m.setInherited(false);
  2289. m.setDefault("auto");
  2290. addPropertyMaker("content-type", m);
  2291. // id
  2292. m = new StringProperty.Maker(PR_ID);
  2293. m.setInherited(false);
  2294. m.setDefault("");
  2295. addPropertyMaker("id", m);
  2296. // fox:alt-text, used for accessibility
  2297. m = new StringProperty.Maker(PR_X_ALT_TEXT);
  2298. m.setInherited(false);
  2299. m.setDefault("");
  2300. addPropertyMaker("fox:alt-text", m);
  2301. // provisional-label-separation
  2302. m = new LengthProperty.Maker(PR_PROVISIONAL_LABEL_SEPARATION);
  2303. m.setInherited(true);
  2304. m.setDefault("6pt");
  2305. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  2306. addPropertyMaker("provisional-label-separation", m);
  2307. // provisional-distance-between-starts
  2308. m = new LengthProperty.Maker(PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS);
  2309. m.setInherited(true);
  2310. m.setDefault("24pt");
  2311. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  2312. addPropertyMaker("provisional-distance-between-starts", m);
  2313. // ref-id
  2314. m = new StringProperty.Maker(PR_REF_ID);
  2315. m.setInherited(false);
  2316. m.setDefault("");
  2317. addPropertyMaker("ref-id", m);
  2318. // score-spaces
  2319. m = new EnumProperty.Maker(PR_SCORE_SPACES);
  2320. m.useGeneric(genericBoolean);
  2321. m.setInherited(true);
  2322. m.setDefault("true");
  2323. addPropertyMaker("score-spaces", m);
  2324. // src
  2325. m = new URIProperty.Maker(PR_SRC);
  2326. m.setInherited(false);
  2327. m.setDefault("");
  2328. addPropertyMaker("src", m);
  2329. // visibility
  2330. m = new EnumProperty.Maker(PR_VISIBILITY);
  2331. m.setInherited(false);
  2332. m.addEnum("visible", getEnumProperty(EN_VISIBLE, "VISIBLE"));
  2333. m.addEnum("hidden", getEnumProperty(EN_HIDDEN, "HIDDEN"));
  2334. m.addEnum("collapse", getEnumProperty(EN_COLLAPSE, "COLLAPSE"));
  2335. m.setDefault("visible");
  2336. addPropertyMaker("visibility", m);
  2337. // z-index
  2338. m = new NumberProperty.Maker(PR_Z_INDEX);
  2339. m.setInherited(false);
  2340. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2341. m.setDefault("auto");
  2342. addPropertyMaker("z-index", m);
  2343. }
  2344. private void createShorthandProperties() { // CSOK: MethodLength
  2345. PropertyMaker m;
  2346. // background
  2347. m = new ToBeImplementedProperty.Maker(PR_BACKGROUND);
  2348. m.setInherited(false);
  2349. m.setDefault("none");
  2350. addPropertyMaker("background", m);
  2351. // background-position
  2352. m = new BackgroundPositionShorthand.Maker(PR_BACKGROUND_POSITION);
  2353. m.setInherited(false);
  2354. m.addKeyword("left", "0pt 50%");
  2355. m.addKeyword("left center", "0pt 50%");
  2356. m.addKeyword("center left", "0pt 50%");
  2357. m.addKeyword("right", "100% 50%");
  2358. m.addKeyword("right center", "100% 50%");
  2359. m.addKeyword("center right", "100% 50%");
  2360. m.addKeyword("center", "50% 50%");
  2361. m.addKeyword("center center", "50% 50%");
  2362. m.addKeyword("top", "50% 0pt");
  2363. m.addKeyword("top center", "50% 0pt");
  2364. m.addKeyword("center top", "50% 0pt");
  2365. m.addKeyword("bottom", "50% 100%");
  2366. m.addKeyword("bottom center", "50% 100%");
  2367. m.addKeyword("center bottom", "50% 100%");
  2368. m.addKeyword("top left", "0pt 0pt");
  2369. m.addKeyword("left top", "0pt 0pt");
  2370. m.addKeyword("top right", "100% 0pt");
  2371. m.addKeyword("right top", "100% 0pt");
  2372. m.addKeyword("bottom left", "0pt 100%");
  2373. m.addKeyword("left bottom", "0pt 100%");
  2374. m.addKeyword("bottom right", "100% 100%");
  2375. m.addKeyword("right bottom", "100% 100%");
  2376. m.setDefault("0pt 0pt");
  2377. m.setPercentBase(LengthBase.CUSTOM_BASE);
  2378. m.setDatatypeParser(new BackgroundPositionShorthand.Parser());
  2379. addPropertyMaker("background-position", m);
  2380. // border
  2381. m = new ListProperty.Maker(PR_BORDER);
  2382. m.setInherited(false);
  2383. m.setDefault("");
  2384. m.setDatatypeParser(new GenericShorthandParser());
  2385. addPropertyMaker("border", m);
  2386. // border-bottom
  2387. m = new ListProperty.Maker(PR_BORDER_BOTTOM);
  2388. m.setInherited(false);
  2389. m.setDefault("");
  2390. m.setDatatypeParser(new GenericShorthandParser());
  2391. addPropertyMaker("border-bottom", m);
  2392. // border-color
  2393. m = new ListProperty.Maker(PR_BORDER_COLOR);
  2394. m.setInherited(false);
  2395. m.setDefault("");
  2396. m.setDatatypeParser(new BoxPropShorthandParser());
  2397. addPropertyMaker("border-color", m);
  2398. // border-left
  2399. m = new ListProperty.Maker(PR_BORDER_LEFT);
  2400. m.setInherited(false);
  2401. m.setDefault("");
  2402. m.setDatatypeParser(new GenericShorthandParser());
  2403. addPropertyMaker("border-left", m);
  2404. // border-right
  2405. m = new ListProperty.Maker(PR_BORDER_RIGHT);
  2406. m.setInherited(false);
  2407. m.setDefault("");
  2408. m.setDatatypeParser(new GenericShorthandParser());
  2409. addPropertyMaker("border-right", m);
  2410. // border-style
  2411. m = new ListProperty.Maker(PR_BORDER_STYLE);
  2412. m.setInherited(false);
  2413. m.setDefault("");
  2414. m.setDatatypeParser(new BoxPropShorthandParser());
  2415. addPropertyMaker("border-style", m);
  2416. // border-spacing
  2417. m = new ListProperty.Maker(PR_BORDER_SPACING);
  2418. m.setInherited(true);
  2419. m.setDefault("0pt");
  2420. m.setDatatypeParser(new BorderSpacingShorthandParser());
  2421. addPropertyMaker("border-spacing", m);
  2422. // border-top
  2423. m = new ListProperty.Maker(PR_BORDER_TOP);
  2424. m.setInherited(false);
  2425. m.setDefault("");
  2426. m.setDatatypeParser(new GenericShorthandParser());
  2427. addPropertyMaker("border-top", m);
  2428. // border-width
  2429. m = new ListProperty.Maker(PR_BORDER_WIDTH);
  2430. m.setInherited(false);
  2431. m.setDefault("");
  2432. m.setDatatypeParser(new BoxPropShorthandParser());
  2433. addPropertyMaker("border-width", m);
  2434. // cue
  2435. m = new ToBeImplementedProperty.Maker(PR_CUE);
  2436. m.setInherited(false);
  2437. m.setDefault("");
  2438. addPropertyMaker("cue", m);
  2439. // font
  2440. m = new FontShorthandProperty.Maker(PR_FONT);
  2441. m.setInherited(true);
  2442. m.addEnum("caption", getEnumProperty(EN_CAPTION, "CAPTION"));
  2443. m.addEnum("icon", getEnumProperty(EN_ICON, "ICON"));
  2444. m.addEnum("message-box", getEnumProperty(EN_MESSAGE_BOX, "MESSAGE_BOX"));
  2445. m.addEnum("menu", getEnumProperty(EN_MENU, "MENU"));
  2446. m.addEnum("small-caption", getEnumProperty(EN_SMALL_CAPTION, "SMALL_CAPTION"));
  2447. m.addEnum("status-bar", getEnumProperty(EN_STATUS_BAR, "STATUS_BAR"));
  2448. m.setDefault("");
  2449. m.setDatatypeParser(new FontShorthandParser());
  2450. addPropertyMaker("font", m);
  2451. // margin
  2452. m = new ListProperty.Maker(PR_MARGIN);
  2453. m.setInherited(false);
  2454. m.setDefault("");
  2455. m.setDatatypeParser(new BoxPropShorthandParser());
  2456. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  2457. addPropertyMaker("margin", m);
  2458. // padding
  2459. m = new ListProperty.Maker(PR_PADDING);
  2460. m.setInherited(false);
  2461. m.setDatatypeParser(new BoxPropShorthandParser());
  2462. m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
  2463. addPropertyMaker("padding", m);
  2464. // page-break-after
  2465. m = new EnumProperty.Maker(PR_PAGE_BREAK_AFTER);
  2466. m.setInherited(false);
  2467. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2468. m.addEnum("always", getEnumProperty(EN_ALWAYS, "ALWAYS"));
  2469. m.addEnum("avoid", getEnumProperty(EN_AVOID, "AVOID"));
  2470. m.addEnum("left", getEnumProperty(EN_LEFT, "LEFT"));
  2471. m.addEnum("right", getEnumProperty(EN_RIGHT, "RIGHT"));
  2472. m.setDefault("auto");
  2473. m.setDatatypeParser(new PageBreakShorthandParser());
  2474. addPropertyMaker("page-break-after", m);
  2475. // page-break-before
  2476. m = new EnumProperty.Maker(PR_PAGE_BREAK_BEFORE);
  2477. m.setInherited(false);
  2478. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2479. m.addEnum("always", getEnumProperty(EN_ALWAYS, "ALWAYS"));
  2480. m.addEnum("avoid", getEnumProperty(EN_AVOID, "AVOID"));
  2481. m.addEnum("left", getEnumProperty(EN_LEFT, "LEFT"));
  2482. m.addEnum("right", getEnumProperty(EN_RIGHT, "RIGHT"));
  2483. m.setDefault("auto");
  2484. m.setDatatypeParser(new PageBreakShorthandParser());
  2485. addPropertyMaker("page-break-before", m);
  2486. // page-break-inside
  2487. m = new EnumProperty.Maker(PR_PAGE_BREAK_INSIDE);
  2488. m.setInherited(true);
  2489. m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
  2490. m.addEnum("avoid", getEnumProperty(EN_AVOID, "AVOID"));
  2491. m.setDefault("auto");
  2492. m.setDatatypeParser(new PageBreakShorthandParser());
  2493. addPropertyMaker("page-break-inside", m);
  2494. // pause
  2495. m = new ToBeImplementedProperty.Maker(PR_PAUSE);
  2496. m.setInherited(false);
  2497. m.setDefault("");
  2498. addPropertyMaker("pause", m);
  2499. // position
  2500. m = new EnumProperty.Maker(PR_POSITION);
  2501. m.setInherited(false);
  2502. m.addEnum("static", getEnumProperty(EN_STATIC, "STATIC"));
  2503. m.addEnum("relative", getEnumProperty(EN_RELATIVE, "RELATIVE"));
  2504. m.addEnum("absolute", getEnumProperty(EN_ABSOLUTE, "ABSOLUTE"));
  2505. m.addEnum("fixed", getEnumProperty(EN_FIXED, "FIXED"));
  2506. m.setDefault("static");
  2507. m.setDatatypeParser(new PositionShorthandParser());
  2508. addPropertyMaker("position", m);
  2509. // size
  2510. m = new ToBeImplementedProperty.Maker(PR_SIZE);
  2511. m.setInherited(false);
  2512. m.setDefault("auto");
  2513. addPropertyMaker("size", m);
  2514. // vertical-align
  2515. m = new LengthProperty.Maker(PR_VERTICAL_ALIGN);
  2516. m.setInherited(false);
  2517. m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
  2518. m.addEnum("middle", getEnumProperty(EN_MIDDLE, "MIDDLE"));
  2519. m.addEnum("sub", getEnumProperty(EN_SUB, "SUB"));
  2520. m.addEnum("super", getEnumProperty(EN_SUPER, "SUPER"));
  2521. m.addEnum("text-top", getEnumProperty(EN_TEXT_TOP, "TEXT_TOP"));
  2522. m.addEnum("text-bottom", getEnumProperty(EN_TEXT_BOTTOM, "TEXT_BOTTOM"));
  2523. m.addEnum("top", getEnumProperty(EN_TOP, "TOP"));
  2524. m.addEnum("bottom", getEnumProperty(EN_BOTTOM, "BOTTOM"));
  2525. m.setDatatypeParser(new VerticalAlignShorthandParser());
  2526. m.setDefault("baseline");
  2527. m.setPercentBase(LengthBase.ALIGNMENT_ADJUST);
  2528. addPropertyMaker("vertical-align", m);
  2529. // white-space
  2530. m = new EnumProperty.Maker(PR_WHITE_SPACE);
  2531. m.setInherited(true);
  2532. m.addEnum("normal", getEnumProperty(EN_NORMAL, "NORMAL"));
  2533. m.addEnum("pre", getEnumProperty(EN_PRE, "PRE"));
  2534. m.addEnum("nowrap", getEnumProperty(EN_NO_WRAP, "NO_WRAP"));
  2535. m.setDefault("normal");
  2536. m.setDatatypeParser(new WhiteSpaceShorthandParser());
  2537. addPropertyMaker("white-space", m);
  2538. // xml:lang
  2539. m = new StringProperty.Maker(PR_XML_LANG);
  2540. m.setInherited(true);
  2541. m.setDefault("");
  2542. m.setDatatypeParser(new XMLLangShorthandParser());
  2543. addPropertyMaker("xml:lang", m);
  2544. // xml:base
  2545. m = new URIProperty.Maker(PR_X_XML_BASE);
  2546. m.setInherited(true);
  2547. m.setDefault("");
  2548. addPropertyMaker("xml:base", m);
  2549. }
  2550. }