|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.ui.swing.ext.JVxUtil
public final class JVxUtil
The JVxUtil
is a utility class with often used
functionality encapsulated in useful methods.
Constructor Summary | |
---|---|
protected |
JVxUtil()
Invisible constructor, because the JVxUtil class is a utility class. |
Method Summary | |
---|---|
static Color |
getAverageColor(Color pColor1,
Color pColor2)
Gets the average color from pColor1 and pColor2. |
static ICellEditor |
getDefaultCellEditor(Class<?> pClass)
Gets the default ICellEditor for the given class. |
static Cursor |
getGlobalCursor(Component pComponent)
Gets the application global cursor. |
static ImageIcon |
getIcon(String pImageName)
Gets an ImageIcon from the resource bundle. |
static ImageIcon |
getIcon(String pImageName,
byte[] pData)
Gets an ImageIcon from the resource bundle. |
static Image |
getImage(String pImageName)
Gets an image from the resource bundle. |
static Image |
getImage(String pImageName,
byte[] pData)
Gets an ImageIcon from the resource bundle. |
static String |
getImageMapping(String pMappingName)
Gets the image name for the given mapping name. |
static String[] |
getImageMappingNames()
Gets all used mapping names. |
static Dimension |
getMinimumSize(Component pComponent)
Gets the minimum size of a component. |
static Dimension |
getPreferredSize(Component pComponent)
Gets the preferred size of a component. |
static Color |
getSystemColor(String pType)
Gets the system color. |
static void |
installActions(JTextComponent pComponent)
Installs copy/paste/cut actions for the given text component. |
static void |
invokeLater(Runnable pRunnable)
Uses InvokerLaterThread, to invoke guarantee even in another Thread, that it will be invoked later. |
static void |
revalidateAll(Component pComponent)
Searches the parent tree until a parent without layout was found. |
static void |
setDefaultCellEditor(Class<?> pClass,
ICellEditor pCellEditor)
Sets the default ICellEditor for the given class. |
static void |
setGlobalCursor(Component pComponent,
Cursor pCursor)
Sets an application global cursor. |
static void |
setImageMapping(String pMappingName,
String pImageName)
Sets the image name for the given mapping name. |
static void |
setSystemColor(String pType,
Color pSystemColor)
Sets the system color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected JVxUtil()
JVxUtil
class is a utility class.
Method Detail |
---|
public static Dimension getPreferredSize(Component pComponent)
pComponent
- the component
public static Dimension getMinimumSize(Component pComponent)
pComponent
- the component
public static void revalidateAll(Component pComponent)
pComponent
- the start componentpublic static ICellEditor getDefaultCellEditor(Class<?> pClass)
ICellEditor
for the given class.
This function should always return an editor.
It should look for best matching editor with Class.isAssignableFrom.
pClass
- the class type to be edited.
ICellEditor
ICellEditor
public static void setDefaultCellEditor(Class<?> pClass, ICellEditor pCellEditor)
ICellEditor
for the given class.
This function should always return an editor.
It should look for best matching editor with Class.isAssignableFrom.
If the given ICellEditor is null, it is removed as editor for the given class.
pClass
- the class type to be edited.pCellEditor
- the ICellEditor
ICellEditor
public static Color getSystemColor(String pType)
pType
- the color type
public static void setSystemColor(String pType, Color pSystemColor)
pType
- the color typepSystemColor
- the system colorpublic static Color getAverageColor(Color pColor1, Color pColor2)
pColor1
- the first Color.pColor2
- the second Color.
public static Image getImage(String pImageName)
pImageName
- the icon resource name
Image
or null
if the resource is not availablepublic static ImageIcon getIcon(String pImageName)
pImageName
- the icon resource name
Image
or null
if the resource is not availablepublic static Image getImage(String pImageName, byte[] pData)
pImageName
- the image name (used for cache mechanism) or null
if
the image should not be cachedpData
- the image byte data
Image
or null
if the resource is not availablepublic static ImageIcon getIcon(String pImageName, byte[] pData)
pImageName
- the image name (used for cache mechanism) or null
if
the image should not be cachedpData
- the image byte data
Image
or null
if the resource is not availablepublic static String getImageMapping(String pMappingName)
pMappingName
- the mapping name.
public static void setImageMapping(String pMappingName, String pImageName)
pMappingName
- the mapping name.pImageName
- the image name.public static String[] getImageMappingNames()
public static Cursor getGlobalCursor(Component pComponent)
pComponent
- the component.
public static void setGlobalCursor(Component pComponent, Cursor pCursor)
pComponent
- the component.pCursor
- the cursor.public static void invokeLater(Runnable pRunnable)
pRunnable
- the Runnablepublic static void installActions(JTextComponent pComponent)
pComponent
- the text component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |