jdk/src/share/classes/javax/swing/plaf/synth/Region.java
author darcy
Wed, 02 Jul 2014 23:03:27 -0700
changeset 25565 ce603b34c98d
parent 23010 6dadb192ad81
permissions -rw-r--r--
8043548: Fix raw and unchecked lint warnings in javax.swing.plaf.* 8042849: Fix raw and unchecked warnings in com.sun.java.swing Reviewed-by: pchelko, alexsch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
25565
ce603b34c98d 8043548: Fix raw and unchecked lint warnings in javax.swing.plaf.*
darcy
parents: 23010
diff changeset
     2
 * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3457
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3457
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3457
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3457
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3457
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
package javax.swing.plaf.synth;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    27
import sun.awt.AppContext;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    28
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    29
import java.util.HashMap;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    30
import java.util.Locale;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    31
import java.util.Map;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    32
import javax.swing.JComponent;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    33
import javax.swing.UIDefaults;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * A distinct rendering area of a Swing component.  A component may
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * support one or more regions.  Specific component regions are defined
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * by the typesafe enumeration in this class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * Regions are typically used as a way to identify the <code>Component</code>s
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * and areas a particular style is to apply to. Synth's file format allows you
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * to bind styles based on the name of a <code>Region</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * The name is derived from the field name of the constant:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * <ol>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 *  <li>Map all characters to lowercase.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *  <li>Map the first character to uppercase.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 *  <li>Map the first character after underscores to uppercase.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 *  <li>Remove all underscores.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * </ol>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * For example, to identify the <code>SPLIT_PANE</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * <code>Region</code> you would use <code>SplitPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * The following shows a custom <code>SynthStyleFactory</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * that returns a specific style for split panes:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 *    public SynthStyle getStyle(JComponent c, Region id) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *        if (id == Region.SPLIT_PANE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *            return splitPaneStyle;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 *        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 *        ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 *    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * The following <a href="doc-files/synthFileFormat.html">xml</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * accomplishes the same thing:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * <pre>
20169
d7fa6d7586c9 8025085: [javadoc] some errors in javax/swing
yan
parents: 5506
diff changeset
    65
 * &lt;style id="splitPaneStyle"&gt;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 *   ...
20169
d7fa6d7586c9 8025085: [javadoc] some errors in javax/swing
yan
parents: 5506
diff changeset
    67
 * &lt;/style&gt;
d7fa6d7586c9 8025085: [javadoc] some errors in javax/swing
yan
parents: 5506
diff changeset
    68
 * &lt;bind style="splitPaneStyle" type="region" key="SplitPane"/&gt;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * @author Scott Violet
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
public class Region {
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    75
    private static final Object UI_TO_REGION_MAP_KEY = new Object();
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    76
    private static final Object LOWER_CASE_NAME_MAP_KEY = new Object();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * ArrowButton's are special types of buttons that also render a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * directional indicator, typically an arrow. ArrowButtons are used by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * composite components, for example ScrollBar's contain ArrowButtons.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     * To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     * <code>ArrowButton</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    85
    public static final Region ARROW_BUTTON = new Region("ArrowButton", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * Button region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     * <code>Button</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    91
    public static final Region BUTTON = new Region("Button", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     * CheckBox region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * <code>CheckBox</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
    97
    public static final Region CHECK_BOX = new Region("CheckBox", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * CheckBoxMenuItem region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * the name <code>CheckBoxMenuItem</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   103
    public static final Region CHECK_BOX_MENU_ITEM = new Region("CheckBoxMenuItem", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     * ColorChooser region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * the name <code>ColorChooser</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   109
    public static final Region COLOR_CHOOSER = new Region("ColorChooser", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * ComboBox region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * the name <code>ComboBox</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   115
    public static final Region COMBO_BOX = new Region("ComboBox", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * DesktopPane region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * the name <code>DesktopPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   121
    public static final Region DESKTOP_PANE = new Region("DesktopPane", false);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   122
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * DesktopIcon region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     * the name <code>DesktopIcon</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   127
    public static final Region DESKTOP_ICON = new Region("DesktopIcon", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     * EditorPane region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     * the name <code>EditorPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   133
    public static final Region EDITOR_PANE = new Region("EditorPane", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * FileChooser region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * the name <code>FileChooser</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   139
    public static final Region FILE_CHOOSER = new Region("FileChooser", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * FormattedTextField region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * the name <code>FormattedTextField</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   145
    public static final Region FORMATTED_TEXT_FIELD = new Region("FormattedTextField", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * InternalFrame region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * the name <code>InternalFrame</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   151
    public static final Region INTERNAL_FRAME = new Region("InternalFrame", false);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   152
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     * TitlePane of an InternalFrame. The TitlePane typically
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * shows a menu, title, widgets to manipulate the internal frame.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * <code>InternalFrameTitlePane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   159
    public static final Region INTERNAL_FRAME_TITLE_PANE = new Region("InternalFrameTitlePane", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * Label region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * <code>Label</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   165
    public static final Region LABEL = new Region("Label", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * List region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     * <code>List</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   171
    public static final Region LIST = new Region("List", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * Menu region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * <code>Menu</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   177
    public static final Region MENU = new Region("Menu", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * MenuBar region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * <code>MenuBar</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   183
    public static final Region MENU_BAR = new Region("MenuBar", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     * MenuItem region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     * <code>MenuItem</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   189
    public static final Region MENU_ITEM = new Region("MenuItem", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     * Accelerator region of a MenuItem. To bind a style to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
     * <code>Region</code> use the name <code>MenuItemAccelerator</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   195
    public static final Region MENU_ITEM_ACCELERATOR = new Region("MenuItemAccelerator", true);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * OptionPane region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     * the name <code>OptionPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   201
    public static final Region OPTION_PANE = new Region("OptionPane", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * Panel region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * <code>Panel</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   207
    public static final Region PANEL = new Region("Panel", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * PasswordField region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * the name <code>PasswordField</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   213
    public static final Region PASSWORD_FIELD = new Region("PasswordField", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     * PopupMenu region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * the name <code>PopupMenu</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   219
    public static final Region POPUP_MENU = new Region("PopupMenu", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * PopupMenuSeparator region. To bind a style to this <code>Region</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * use the name <code>PopupMenuSeparator</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   225
    public static final Region POPUP_MENU_SEPARATOR = new Region("PopupMenuSeparator", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * ProgressBar region. To bind a style to this <code>Region</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     * use the name <code>ProgressBar</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   231
    public static final Region PROGRESS_BAR = new Region("ProgressBar", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     * RadioButton region. To bind a style to this <code>Region</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * use the name <code>RadioButton</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   237
    public static final Region RADIO_BUTTON = new Region("RadioButton", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     * RegionButtonMenuItem region. To bind a style to this <code>Region</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * use the name <code>RadioButtonMenuItem</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   243
    public static final Region RADIO_BUTTON_MENU_ITEM = new Region("RadioButtonMenuItem", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * RootPane region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     * the name <code>RootPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   249
    public static final Region ROOT_PANE = new Region("RootPane", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
     * ScrollBar region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     * the name <code>ScrollBar</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   255
    public static final Region SCROLL_BAR = new Region("ScrollBar", false);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   256
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     * Track of the ScrollBar. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     * the name <code>ScrollBarTrack</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   261
    public static final Region SCROLL_BAR_TRACK = new Region("ScrollBarTrack", true);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   262
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * Thumb of the ScrollBar. The thumb is the region of the ScrollBar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     * that gives a graphical depiction of what percentage of the View is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * currently visible. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     * the name <code>ScrollBarThumb</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   269
    public static final Region SCROLL_BAR_THUMB = new Region("ScrollBarThumb", true);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
     * ScrollPane region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     * the name <code>ScrollPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   275
    public static final Region SCROLL_PANE = new Region("ScrollPane", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
     * Separator region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
     * the name <code>Separator</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   281
    public static final Region SEPARATOR = new Region("Separator", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * Slider region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     * the name <code>Slider</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   287
    public static final Region SLIDER = new Region("Slider", false);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   288
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
     * Track of the Slider. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
     * the name <code>SliderTrack</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   293
    public static final Region SLIDER_TRACK = new Region("SliderTrack", true);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   294
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     * Thumb of the Slider. The thumb of the Slider identifies the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     * value. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     * <code>SliderThumb</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   300
    public static final Region SLIDER_THUMB = new Region("SliderThumb", true);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
     * Spinner region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     * <code>Spinner</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   306
    public static final Region SPINNER = new Region("Spinner", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
     * SplitPane region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
     * <code>SplitPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   312
    public static final Region SPLIT_PANE = new Region("SplitPane", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
     * Divider of the SplitPane. To bind a style to this <code>Region</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
     * use the name <code>SplitPaneDivider</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   318
    public static final Region SPLIT_PANE_DIVIDER = new Region("SplitPaneDivider", true);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
     * TabbedPane region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
     * the name <code>TabbedPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   324
    public static final Region TABBED_PANE = new Region("TabbedPane", false);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   325
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
     * Region of a TabbedPane for one tab. To bind a style to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
     * <code>Region</code> use the name <code>TabbedPaneTab</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   330
    public static final Region TABBED_PANE_TAB = new Region("TabbedPaneTab", true);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   331
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     * Region of a TabbedPane containing the tabs. To bind a style to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     * <code>Region</code> use the name <code>TabbedPaneTabArea</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   336
    public static final Region TABBED_PANE_TAB_AREA = new Region("TabbedPaneTabArea", true);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   337
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     * Region of a TabbedPane containing the content. To bind a style to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
     * <code>Region</code> use the name <code>TabbedPaneContent</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   342
    public static final Region TABBED_PANE_CONTENT = new Region("TabbedPaneContent", true);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
     * Table region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
     * the name <code>Table</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   348
    public static final Region TABLE = new Region("Table", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
     * TableHeader region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
     * the name <code>TableHeader</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   354
    public static final Region TABLE_HEADER = new Region("TableHeader", false);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   355
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
     * TextArea region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
     * the name <code>TextArea</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   360
    public static final Region TEXT_AREA = new Region("TextArea", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
     * TextField region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
     * the name <code>TextField</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   366
    public static final Region TEXT_FIELD = new Region("TextField", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     * TextPane region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
     * the name <code>TextPane</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   372
    public static final Region TEXT_PANE = new Region("TextPane", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
     * ToggleButton region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
     * the name <code>ToggleButton</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   378
    public static final Region TOGGLE_BUTTON = new Region("ToggleButton", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
     * ToolBar region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
     * the name <code>ToolBar</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   384
    public static final Region TOOL_BAR = new Region("ToolBar", false);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   385
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
     * Region of the ToolBar containing the content. To bind a style to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
     * <code>Region</code> use the name <code>ToolBarContent</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   390
    public static final Region TOOL_BAR_CONTENT = new Region("ToolBarContent", true);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   391
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
     * Region for the Window containing the ToolBar. To bind a style to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
     * <code>Region</code> use the name <code>ToolBarDragWindow</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   396
    public static final Region TOOL_BAR_DRAG_WINDOW = new Region("ToolBarDragWindow", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
     * ToolTip region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
     * the name <code>ToolTip</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   402
    public static final Region TOOL_TIP = new Region("ToolTip", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
     * ToolBar separator region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
     * the name <code>ToolBarSeparator</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   408
    public static final Region TOOL_BAR_SEPARATOR = new Region("ToolBarSeparator", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
     * Tree region. To bind a style to this <code>Region</code> use the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
     * <code>Tree</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   414
    public static final Region TREE = new Region("Tree", false);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   415
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
     * Region of the Tree for one cell. To bind a style to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
     * <code>Region</code> use the name <code>TreeCell</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   420
    public static final Region TREE_CELL = new Region("TreeCell", true);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
     * Viewport region. To bind a style to this <code>Region</code> use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
     * the name <code>Viewport</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   426
    public static final Region VIEWPORT = new Region("Viewport", false);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   428
    private static Map<String, Region> getUItoRegionMap() {
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   429
        AppContext context = AppContext.getAppContext();
25565
ce603b34c98d 8043548: Fix raw and unchecked lint warnings in javax.swing.plaf.*
darcy
parents: 23010
diff changeset
   430
        @SuppressWarnings("unchecked")
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   431
        Map<String, Region> map = (Map<String, Region>) context.get(UI_TO_REGION_MAP_KEY);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   432
        if (map == null) {
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   433
            map = new HashMap<String, Region>();
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   434
            map.put("ArrowButtonUI", ARROW_BUTTON);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   435
            map.put("ButtonUI", BUTTON);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   436
            map.put("CheckBoxUI", CHECK_BOX);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   437
            map.put("CheckBoxMenuItemUI", CHECK_BOX_MENU_ITEM);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   438
            map.put("ColorChooserUI", COLOR_CHOOSER);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   439
            map.put("ComboBoxUI", COMBO_BOX);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   440
            map.put("DesktopPaneUI", DESKTOP_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   441
            map.put("DesktopIconUI", DESKTOP_ICON);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   442
            map.put("EditorPaneUI", EDITOR_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   443
            map.put("FileChooserUI", FILE_CHOOSER);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   444
            map.put("FormattedTextFieldUI", FORMATTED_TEXT_FIELD);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   445
            map.put("InternalFrameUI", INTERNAL_FRAME);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   446
            map.put("InternalFrameTitlePaneUI", INTERNAL_FRAME_TITLE_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   447
            map.put("LabelUI", LABEL);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   448
            map.put("ListUI", LIST);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   449
            map.put("MenuUI", MENU);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   450
            map.put("MenuBarUI", MENU_BAR);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   451
            map.put("MenuItemUI", MENU_ITEM);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   452
            map.put("OptionPaneUI", OPTION_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   453
            map.put("PanelUI", PANEL);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   454
            map.put("PasswordFieldUI", PASSWORD_FIELD);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   455
            map.put("PopupMenuUI", POPUP_MENU);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   456
            map.put("PopupMenuSeparatorUI", POPUP_MENU_SEPARATOR);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   457
            map.put("ProgressBarUI", PROGRESS_BAR);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   458
            map.put("RadioButtonUI", RADIO_BUTTON);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   459
            map.put("RadioButtonMenuItemUI", RADIO_BUTTON_MENU_ITEM);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   460
            map.put("RootPaneUI", ROOT_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   461
            map.put("ScrollBarUI", SCROLL_BAR);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   462
            map.put("ScrollPaneUI", SCROLL_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   463
            map.put("SeparatorUI", SEPARATOR);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   464
            map.put("SliderUI", SLIDER);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   465
            map.put("SpinnerUI", SPINNER);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   466
            map.put("SplitPaneUI", SPLIT_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   467
            map.put("TabbedPaneUI", TABBED_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   468
            map.put("TableUI", TABLE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   469
            map.put("TableHeaderUI", TABLE_HEADER);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   470
            map.put("TextAreaUI", TEXT_AREA);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   471
            map.put("TextFieldUI", TEXT_FIELD);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   472
            map.put("TextPaneUI", TEXT_PANE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   473
            map.put("ToggleButtonUI", TOGGLE_BUTTON);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   474
            map.put("ToolBarUI", TOOL_BAR);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   475
            map.put("ToolTipUI", TOOL_TIP);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   476
            map.put("ToolBarSeparatorUI", TOOL_BAR_SEPARATOR);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   477
            map.put("TreeUI", TREE);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   478
            map.put("ViewportUI", VIEWPORT);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   479
            context.put(UI_TO_REGION_MAP_KEY, map);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   480
        }
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   481
        return map;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   482
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   484
    private static Map<Region, String> getLowerCaseNameMap() {
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   485
        AppContext context = AppContext.getAppContext();
25565
ce603b34c98d 8043548: Fix raw and unchecked lint warnings in javax.swing.plaf.*
darcy
parents: 23010
diff changeset
   486
        @SuppressWarnings("unchecked")
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   487
        Map<Region, String> map = (Map<Region, String>) context.get(LOWER_CASE_NAME_MAP_KEY);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   488
        if (map == null) {
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   489
            map = new HashMap<Region, String>();
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   490
            context.put(LOWER_CASE_NAME_MAP_KEY, map);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   491
        }
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   492
        return map;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   493
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
    static Region getRegion(JComponent c) {
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   496
        return getUItoRegionMap().get(c.getUIClassID());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
    static void registerUIs(UIDefaults table) {
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   500
        for (Object key : getUItoRegionMap().keySet()) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
            table.put(key, "javax.swing.plaf.synth.SynthLookAndFeel");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   505
    private final String name;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   506
    private final boolean subregion;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   508
    private Region(String name, boolean subregion) {
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   509
        if (name == null) {
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   510
            throw new NullPointerException("You must specify a non-null name");
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   511
        }
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   512
        this.name = name;
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   513
        this.subregion = subregion;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
     * Creates a Region with the specified name. This should only be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
     * used if you are creating your own <code>JComponent</code> subclass
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
     * with a custom <code>ComponentUI</code> class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
     * @param name Name of the region
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
     * @param ui String that will be returned from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
     *           <code>component.getUIClassID</code>. This will be null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
     *           if this is a subregion.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
     * @param subregion Whether or not this is a subregion.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
    protected Region(String name, String ui, boolean subregion) {
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   528
        this(name, subregion);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   529
        if (ui != null) {
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   530
            getUItoRegionMap().put(ui, this);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     * Returns true if the Region is a subregion of a Component, otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     * false. For example, <code>Region.BUTTON</code> corresponds do a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     * <code>Component</code> so that <code>Region.BUTTON.isSubregion()</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     * returns false.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
     * @return true if the Region is a subregion of a Component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
    public boolean isSubregion() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
        return subregion;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
     * Returns the name of the region.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
     * @return name of the Region.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
    public String getName() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
        return name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
     * Returns the name, in lowercase.
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   557
     *
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   558
     * @return lower case representation of the name of the Region
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
    String getLowerCaseName() {
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   561
        Map<Region, String> lowerCaseNameMap = getLowerCaseNameMap();
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   562
        String lowerCaseName = lowerCaseNameMap.get(this);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   563
        if (lowerCaseName == null) {
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   564
            lowerCaseName = name.toLowerCase(Locale.ENGLISH);
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   565
            lowerCaseNameMap.put(this, lowerCaseName);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
        }
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   567
        return lowerCaseName;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
     * Returns the name of the Region.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
     * @return name of the Region.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
     */
3457
fcf975361ffe 6660049: Synth Region.uiToRegionMap/lowerCaseNameMap are mutable statics
malenkov
parents: 1639
diff changeset
   575
    @Override
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
        return name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
}