|
||||||||||
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 javax.swing.ImageIcon |
createIcon(java.lang.String pImageName)
Creates a new ImageIcon from the given name. |
static java.awt.Color |
getAverageColor(java.awt.Color pColor1,
java.awt.Color pColor2)
Gets the average color from pColor1 and pColor2. |
static ICellEditor |
getDefaultCellEditor(java.lang.Class<?> pClass)
Gets the default ICellEditor for the given class. |
static java.awt.Cursor |
getGlobalCursor(java.awt.Component pComponent)
Gets the application global cursor. |
static javax.swing.ImageIcon |
getIcon(java.lang.String pImageName)
Gets an ImageIcon from the resource bundle. |
static javax.swing.ImageIcon |
getIcon(java.lang.String pImageName,
byte[] pData)
Gets an ImageIcon from the resource bundle. |
static java.awt.Image |
getImage(java.lang.String pImageName)
Gets an image from the resource bundle. |
static java.awt.Image |
getImage(java.lang.String pImageName,
byte[] pData)
Gets an ImageIcon from the resource bundle. |
static java.lang.String |
getImageMapping(java.lang.String pMappingName)
Gets the image name for the given mapping name. |
static java.lang.String[] |
getImageMappingNames()
Gets all used mapping names. |
static java.awt.Dimension |
getMinimumSize(java.awt.Component pComponent)
Gets the minimum size of a component. |
static java.awt.Dimension |
getPreferredSize(java.awt.Component pComponent)
Gets the preferred size of a component. |
static java.awt.Color |
getSystemColor(java.lang.String pType)
Gets the system color. |
static java.awt.Window |
getWindowWillBeActiveSoon()
Get the window, that will get the focus soon. |
static void |
installActions(javax.swing.text.JTextComponent pComponent)
Installs copy/paste/cut actions for the given text component. |
static void |
invokeLater(java.lang.Runnable pRunnable)
Uses InvokerLaterThread, to invoke guarantee even in another Thread, that it will be invoked later. |
static void |
revalidateAll(java.awt.Component pComponent)
Searches the parent tree until a parent without layout was found. |
static void |
revalidateAllDelayed(java.awt.Component pComponent)
Searches the parent tree until a parent without layout was found. |
static void |
setDefaultCellEditor(java.lang.Class<?> pClass,
ICellEditor pCellEditor)
Sets the default ICellEditor for the given class. |
static void |
setGlobalCursor(java.awt.Component pComponent,
java.awt.Cursor pCursor)
Sets an application global cursor. |
static void |
setImageMapping(java.lang.String pMappingName,
java.lang.String pImageName)
Sets the image name for the given mapping name. |
static void |
setSystemColor(java.lang.String pType,
java.awt.Color pSystemColor)
Sets the system color. |
static void |
setWindowWillBeActiveSoon(java.awt.Window pWindow)
set the window, that will get the focus soon. |
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 java.awt.Dimension getPreferredSize(java.awt.Component pComponent)
pComponent
- the component
public static java.awt.Dimension getMinimumSize(java.awt.Component pComponent)
pComponent
- the component
public static void setWindowWillBeActiveSoon(java.awt.Window pWindow)
pWindow
- the window.public static java.awt.Window getWindowWillBeActiveSoon()
public static void revalidateAllDelayed(java.awt.Component pComponent)
SwingUtilities.invokeLater(Runnable)
.
pComponent
- the start componentpublic static void revalidateAll(java.awt.Component pComponent)
pComponent
- the start componentpublic static javax.swing.ImageIcon createIcon(java.lang.String pImageName)
ImageIcon
from the given name.
pImageName
- the name of the image to get.
ImageIcon
for the specified name, null
if it
could not be created,public static ICellEditor getDefaultCellEditor(java.lang.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(java.lang.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 java.awt.Color getSystemColor(java.lang.String pType)
pType
- the color type
public static void setSystemColor(java.lang.String pType, java.awt.Color pSystemColor)
pType
- the color typepSystemColor
- the system colorpublic static java.awt.Color getAverageColor(java.awt.Color pColor1, java.awt.Color pColor2)
pColor1
- the first Color.pColor2
- the second Color.
public static java.awt.Image getImage(java.lang.String pImageName)
pImageName
- the icon resource name
Image
or null
if the resource is not availablepublic static javax.swing.ImageIcon getIcon(java.lang.String pImageName)
pImageName
- the icon resource name
Image
or null
if the resource is not availablepublic static java.awt.Image getImage(java.lang.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 javax.swing.ImageIcon getIcon(java.lang.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 java.lang.String getImageMapping(java.lang.String pMappingName)
pMappingName
- the mapping name.
public static void setImageMapping(java.lang.String pMappingName, java.lang.String pImageName)
pMappingName
- the mapping name.pImageName
- the image name.public static java.lang.String[] getImageMappingNames()
public static java.awt.Cursor getGlobalCursor(java.awt.Component pComponent)
pComponent
- the component.
public static void setGlobalCursor(java.awt.Component pComponent, java.awt.Cursor pCursor)
pComponent
- the component.pCursor
- the cursor.public static void invokeLater(java.lang.Runnable pRunnable)
pRunnable
- the Runnablepublic static void installActions(javax.swing.text.JTextComponent pComponent)
pComponent
- the text component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |