public class NameUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
optimizedNames |
Constructor and Description |
---|
NameUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
appendComponentClassName(java.lang.StringBuilder buffer,
java.lang.Object obj)
Returns component class name without the package name
|
static java.lang.String |
cleanupName(java.lang.String name)
Removes/replaces characters in the name that can cause problems when used in HTML and JavaScript
|
static java.lang.String |
cleanupName(java.lang.String name,
java.lang.String appendToName)
Removes/replaces characters in the name that can cause problems when used in HTML and JavaScript
|
static java.lang.String |
getButtonKeyName(java.lang.Object button)
Format of the key is: window.Window_Title.button.button_text
|
static java.lang.String |
getComponentClassName(java.lang.Object obj)
Returns component class name without the package name
|
static java.lang.String |
getComponentInputName(java.lang.Object obj)
Returns the HTML-friendly component name that will be used to refer to the component input field
|
static java.lang.String |
getComponentName(java.lang.Object obj) |
static java.lang.String |
getComponentName(java.lang.Object obj,
java.lang.String namePostfix)
Returns the HTML-friendly component name that will be used to refer to the component
|
static java.lang.String |
getMenuItemKeyName(java.lang.String actionString)
Format of the key is: window.Window_Title.menu.SubMenuIndex.MenuItemIndex.action
|
static boolean |
isSafeChar(char nextChar) |
static java.lang.String |
titleToKey(java.lang.String title)
Converts given string title to a form, acceptable as a property in the properties file (hash table)
|
public static java.lang.String getComponentClassName(java.lang.Object obj)
public static void appendComponentClassName(java.lang.StringBuilder buffer, java.lang.Object obj)
public static java.lang.String cleanupName(java.lang.String name)
name
- Stringpublic static java.lang.String cleanupName(java.lang.String name, java.lang.String appendToName)
name
- nameappendToName
- this string is appended to the name before the cleanup takes placepublic static boolean isSafeChar(char nextChar)
public static java.lang.String titleToKey(java.lang.String title)
public static java.lang.String getComponentInputName(java.lang.Object obj)
public static java.lang.String getComponentName(java.lang.Object obj)
public static java.lang.String getComponentName(java.lang.Object obj, java.lang.String namePostfix)
namePostfix
- is for add unique name for component because in case with TableCellRenderer
Swing uses one component for render all columns, so hashcode is the same
and we use col and row indexes as a postfix for determine correct cell.public static java.lang.String getMenuItemKeyName(java.lang.String actionString)
actionString
- the action string submitted by the HTML pagepublic static java.lang.String getButtonKeyName(java.lang.Object button)
button
- the button that the key is generated forCopyright © 2000-2012 CreamTec LLC. All Rights Reserved.