view make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/SynthModel.jibx.xml @ 1173:7f45fcc04f8e

6591875: Nimbus Swing Look and Feel Reviewed-by: jasper, ohair
author peterz
date Sat, 25 Apr 2009 21:17:50 +0400
parents
children
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?>

<!--
 Copyright 1998-2004 Sun Microsystems, Inc.  All Rights Reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

 This code is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License version 2 only, as
 published by the Free Software Foundation.  Sun designates this
 particular file as subject to the "Classpath" exception as provided
 by Sun in the LICENSE file that accompanied this code.

 This code is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 version 2 for more details (a copy is included in the LICENSE file that
 accompanied this code).

 You should have received a copy of the GNU General Public License version
 2 along with this work; if not, write to the Free Software Foundation,
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 CA 95054 USA or visit www.sun.com if you need additional information or
 have any questions.
-->

<!DOCTYPE binding SYSTEM "http://jibx.sourceforge.net">
<binding>
    <mapping class="org.jdesktop.synthdesigner.synthmodel.UIDefault" abstract="true" post-set="postSet">
        <value name="name" field="name" style="attribute"/>
    </mapping>
    <!-- == AWT TYPES =========================================================================================== -->
    <mapping class="java.awt.Color"
             marshaller="org.jdesktop.swingx.designer.jibxhelpers.ColorMapper"
             unmarshaller="org.jdesktop.swingx.designer.jibxhelpers.ColorMapper"/>
    <mapping class="java.lang.Class"
             marshaller="org.jdesktop.synthdesigner.synthmodel.jibxhelpers.ClassMapper"
             unmarshaller="org.jdesktop.synthdesigner.synthmodel.jibxhelpers.ClassMapper"/>
    <!-- == UI FONT =========================================================================================== -->
    <mapping name="typeface" class="org.jdesktop.swingx.designer.font.Typeface" post-set="postSet">
        <value name="family" field="name" style="attribute" usage="optional"/>
        <value name="bold" field="bold" style="attribute" usage="optional" default="Default"/>
        <value name="italic" field="italic" style="attribute" usage="optional" default="Default"/>
        <value name="size" field="size" style="attribute" usage="optional"/>
        <value name="sizeOffset" field="sizeOffset" style="attribute" usage="optional" default="1"/>
        <value name="uiDefaultParentName" field="uiDefaultParentName" style="attribute" usage="optional"/>
    </mapping>
    <mapping name="uiFont" class="org.jdesktop.synthdesigner.synthmodel.UIFont"
             extends="org.jdesktop.synthdesigner.synthmodel.UIDefault">
        <structure map-as="org.jdesktop.synthdesigner.synthmodel.UIDefault"/>
        <collection get-method="getFonts" set-method="setFonts" create-type="java.util.ArrayList"/>
    </mapping>
    <!-- == UI INSETS =========================================================================================== -->
    <mapping name="uiInsets" class="org.jdesktop.synthdesigner.synthmodel.UIInsets"
             extends="org.jdesktop.synthdesigner.synthmodel.UIDefault">
        <structure map-as="org.jdesktop.synthdesigner.synthmodel.UIDefault"/>
        <structure name="insets" get-method="getInsets" set-method="setInsets"
                   marshaller="org.jdesktop.swingx.designer.jibxhelpers.InsetsMapper"
                   unmarshaller="org.jdesktop.swingx.designer.jibxhelpers.InsetsMapper"/>
    </mapping>
    <!-- == UI PAINT =========================================================================================== -->
    <mapping name="matte" class="org.jdesktop.swingx.designer.paint.Matte" post-set="postSet">
        <value name="red" field="red" style="attribute"/>
        <value name="green" field="green" style="attribute"/>
        <value name="blue" field="blue" style="attribute"/>
        <value name="alpha" field="alpha" style="attribute"/>
        <value name="uiDefaultParentName" field="uiDefaultParentName" style="attribute" usage="optional"/>
        <value name="componentPropertyName" field="componentPropertyName" style="attribute" usage="optional"/>
        <value name="hueOffset" field="hueOffset" style="attribute"/>
        <value name="saturationOffset" field="saturationOffset" style="attribute"/>
        <value name="brightnessOffset" field="brightnessOffset" style="attribute"/>
        <value name="alphaOffset" field="alphaOffset" style="attribute"/>
        <value name="uiResource" field="uiResource" style="attribute" usage="optional" default="true"/>
    </mapping>
    <mapping class="org.jdesktop.synthdesigner.synthmodel.UIPaint" abstract="true" type-name="uipaint"
             extends="org.jdesktop.synthdesigner.synthmodel.UIDefault">
        <structure map-as="org.jdesktop.synthdesigner.synthmodel.UIDefault"/>
        <structure get-method="getPaint" set-method="setPaint"/>
    </mapping>
    <mapping name="uiPaint" class="org.jdesktop.synthdesigner.synthmodel.UIPaint"
             extends="org.jdesktop.synthdesigner.synthmodel.UIDefault">
        <structure map-as="uipaint"/>
    </mapping>
    <mapping name="uiColor" class="org.jdesktop.synthdesigner.synthmodel.UIColor"
             extends="org.jdesktop.synthdesigner.synthmodel.UIPaint">
        <structure map-as="uipaint"/>
    </mapping>
    <!-- == UI STYLE =========================================================================================== -->
    <mapping class="org.jdesktop.synthdesigner.synthmodel.UIStyle" abstract="true" post-set="postSet">
        <structure field="font" usage="optional"/>
        <structure name="textForeground" usage="optional">
            <structure field="textForeground" usage="optional"/>
        </structure>
        <structure name="textBackground" usage="optional">
            <structure field="textBackground" usage="optional"/>
        </structure>
        <structure name="background" usage="optional">
            <structure field="background" usage="optional"/>
        </structure>
        <value name="inherit-font" field="fontInherited" usage="optional" default="true"/>
        <value name="inherit-textForeground" field="textForegroundInherited" usage="optional" default="true"/>
        <value name="inherit-textBackground" field="textBackgroundInherited" usage="optional" default="true"/>
        <value name="inherit-background" field="backgroundInherited" usage="optional" default="true"/>
        <value name="hintAlphaInterpolation" field="hintAlphaInterpolation" usage="optional"/>
        <value name="hintAntialiasing" field="hintAntialiasing" usage="optional"/>
        <value name="hintColorRendering" field="hintColorRendering" usage="optional"/>
        <value name="hintDithering" field="hintDithering" usage="optional"/>
        <value name="hintFractionalMetrics" field="hintFractionalMetrics" usage="optional"/>
        <value name="hintInterpolation" field="hintInterpolation" usage="optional"/>
        <value name="hintRendering" field="hintRendering" usage="optional"/>
        <value name="hintStrokeControl" field="hintStrokeControl" usage="optional"/>
        <value name="hintTextAntialiasing" field="hintTextAntialiasing" usage="optional"/>
        <value name="cacheSettingsInherited" field="cacheSettingsInherited" usage="optional" default="true"/>
        <value name="cacheMode" field="cacheMode" usage="optional" default="FIXED_SIZES"/>
        <value name="maxHozCachedImgScaling" field="maxHozCachedImgScaling" usage="optional" default="1"/>
        <value name="maxVertCachedImgScaling" field="maxVertCachedImgScaling" usage="optional" default="1"/>
        <collection name="uiproperties" field="uiProperties" create-type="java.util.ArrayList">
            <structure marshaller="org.jdesktop.synthdesigner.synthmodel.jibxhelpers.UIPropertyMapper"
                       unmarshaller="org.jdesktop.synthdesigner.synthmodel.jibxhelpers.UIPropertyMapper"/>
        </collection>
    </mapping>
    <!-- == UI STATE =========================================================================================== -->
    <mapping name="stateType" class="org.jdesktop.synthdesigner.synthmodel.UIStateType">
        <value name="key" field="key" style="attribute"/>
        <structure name="codeSnippet" usage="optional" test-method="hasCodeSnippet">
            <value field="codeSnippet" style="cdata" usage="optional"/>
        </structure>
    </mapping>
    <mapping name="state" class="org.jdesktop.synthdesigner.synthmodel.UIState" post-set="postSet" pre-set="preSet">
        <value name="stateKeys" field="stateKeys" style="attribute" get-method="getStateKeys" set-method="setStateKeys"
               serializer="org.jdesktop.synthdesigner.synthmodel.UIState.keysToString"
               deserializer="org.jdesktop.synthdesigner.synthmodel.UIState.stringToKeys"/>
        <value name="inverted" field="inverted" style="attribute" usage="optional"/>
        <structure name="style" field="style"/>
        <structure field="canvas"
                   marshaller="org.jdesktop.swingx.designer.jibxhelpers.CanvasMapper"
                   unmarshaller="org.jdesktop.swingx.designer.jibxhelpers.CanvasMapper"/>
    </mapping>
    <!-- == REGIONS =========================================================================================== -->
    <mapping class="org.jdesktop.synthdesigner.synthmodel.UIRegion" abstract="true"
             type-name="region" pre-set="preSet">
        <value name="name" field="name" style="attribute"/>
        <value name="ui" field="ui" style="attribute" usage="optional"/>
        <value name="subregion" field="subregion" style="attribute"/>
        <value name="key" field="key" style="attribute" usage="optional"/>
        <value name="title" field="title" style="attribute" usage="optional"/>
        <structure name="contentMargins" field="contentMargins"
                   marshaller="org.jdesktop.swingx.designer.jibxhelpers.InsetsMapper"
                   unmarshaller="org.jdesktop.swingx.designer.jibxhelpers.InsetsMapper"/>
        <structure name="style" field="style"/>
        <collection name="backgroundStates" field="backgroundStates" create-type="java.util.ArrayList"/>
        <collection name="foregroundStates" field="foregroundStates" create-type="java.util.ArrayList"/>
        <collection name="borderStates" field="borderStates" create-type="java.util.ArrayList"/>
        <collection name="regions" field="subRegions" create-type="java.util.ArrayList"/>
    </mapping>
    <mapping name="region" class="org.jdesktop.synthdesigner.synthmodel.UIRegion">
        <structure map-as="region"/>
    </mapping>
    <mapping name="uiIconRegion" class="org.jdesktop.synthdesigner.synthmodel.UIIconRegion"
             extends="org.jdesktop.synthdesigner.synthmodel.UIRegion">
        <structure map-as="region"/>
        <value name="basicKey" field="basicKey" style="attribute" usage="optional"/>
    </mapping>
    <mapping name="uiComponent" class="org.jdesktop.synthdesigner.synthmodel.UIComponent"
             extends="org.jdesktop.synthdesigner.synthmodel.UIRegion">
        <value name="opaque" field="opaque" style="attribute"/>
        <value name="componentName" field="componentName" style="attribute" usage="optional"/>
        <value name="type" field="type" style="attribute"/>
        <collection name="stateTypes" field="stateTypes" create-type="java.util.ArrayList"/>
        <structure map-as="region"/>
    </mapping>
    <!-- == BASE MODEL =========================================================================================== -->
    <mapping name="synthModel" class="org.jdesktop.synthdesigner.synthmodel.SynthModel" pre-set="preSet">
        <collection name="insets" field="insets" create-type="java.util.ArrayList"/>
        <collection name="colors" field="colors" create-type="java.util.ArrayList"/>
        <collection name="fonts" field="fonts" create-type="java.util.ArrayList"/>
        <structure name="style" field="globalStyle"/>
        <collection name="components" field="components" create-type="java.util.ArrayList"/>
    </mapping>
</binding>