|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.plaf.CompiereUtils
public class CompiereUtils
UI utilities
| Field Summary | |
|---|---|
static Color |
COL_1END
End Top Color - white 0 |
static Color |
COL_1TOP
Top Top Color - white 128 the higher the ligher |
static Color |
COL_2END
End End Color - black 64 the higher the darker |
static Color |
COL_2TOP
Top End Color - black 0 |
static Color |
COL_IN_1END
End Top Color - white 0 |
static Color |
COL_IN_1TOP
Top Top Color - white 128 the higher the ligher |
static Color |
COL_IN_2END
End End Color - black 64 the higher the darker |
static Color |
COL_IN_2TOP
Top End Color - black 0 |
static Color |
COL_IN_MIDDLE
middle |
static Color |
COL_OUT_MIDDLE
middle color |
static Color |
COL_TOGGLE_IN_1END
End Top Color - white 0 |
static Color |
COL_TOGGLE_IN_1TOP
Top Top Color - white 128 the higher the ligher |
static Color |
COL_TOGGLE_IN_2END
End End Color - black 64 the higher the darker |
static Color |
COL_TOGGLE_IN_2TOP
Top End Color - black 0 |
static Color |
COL_TOGGLE_IN_MIDDLE
middle |
protected static Component |
s_component
Component for media tracker |
protected static MediaTracker |
s_tracker
Media tracker |
| Constructor Summary | |
|---|---|
CompiereUtils()
|
|
| Method Summary | |
|---|---|
static void |
fillRectange(Graphics2D g2D,
JComponent c,
boolean round)
Fill Background with Color. |
static Color |
getTranslucentColor(Color c,
int alpha)
Helper to simplify creation of translucent colors |
static boolean |
isLeftToRight(Component c)
Convenience function for determining ComponentOrientation. |
static BufferedImage |
loadBufferedImage(File file,
int imageType)
Load an image from a given file into a BufferedImage. |
static BufferedImage |
loadBufferedImage(String path,
int imageType)
Load an image from a given path into a BufferedImage. |
static BufferedImage |
loadBufferedImage(URL url,
int imageType)
Loads an image from a given URL into a BufferedImage. |
static BufferedImage |
loadBufferedJPEGImage(URL url)
Load a JPEG image from a given location. |
static Image |
loadImage(String path)
load the image located at path. |
static Image |
loadImage(URL url)
Load the image located at URL. |
static void |
paint3Deffect(Graphics2D g2D,
JComponent c,
boolean round,
boolean out,
boolean toggle)
Paint 3D effect in (lighten in upper half, darken in lowerhalf) (called from paint methods) |
static void |
paint3Deffect(Graphics2D g2D,
Rectangle r,
boolean round,
boolean out)
Paint 3D effect in (lighten in upper half, darken in lowerhalf) (called from paint methods) |
static void |
setNotBuffered(Component c)
Set Not Buffered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Color COL_1TOP
public static final Color COL_1END
public static final Color COL_OUT_MIDDLE
public static final Color COL_2TOP
public static final Color COL_2END
public static final Color COL_IN_1TOP
public static final Color COL_IN_1END
public static final Color COL_IN_MIDDLE
public static final Color COL_IN_2TOP
public static final Color COL_IN_2END
public static final Color COL_TOGGLE_IN_1TOP
public static final Color COL_TOGGLE_IN_1END
public static final Color COL_TOGGLE_IN_MIDDLE
public static final Color COL_TOGGLE_IN_2TOP
public static final Color COL_TOGGLE_IN_2END
protected static final Component s_component
protected static final MediaTracker s_tracker
| Constructor Detail |
|---|
public CompiereUtils()
| Method Detail |
|---|
public static void fillRectange(Graphics2D g2D,
JComponent c,
boolean round)
g2D - Graphicsc - Componentround - paint round corners
public static void paint3Deffect(Graphics2D g2D,
Rectangle r,
boolean round,
boolean out)
g2D - Graphicsr - Ractangleround - paint round cornersout - paint sticking out (not pressed)
public static void paint3Deffect(Graphics2D g2D,
JComponent c,
boolean round,
boolean out,
boolean toggle)
g2D - Graphicsc - Componentround - paint round cornersout - paint sticking out (not pressed)toggle - whether this is a toggle button area
public static Color getTranslucentColor(Color c,
int alpha)
c - Coloralpha - alpha
public static void setNotBuffered(Component c)
c - public static Image loadImage(String path)
path - location of image file in local file system
- otherwise relative to class
File.toURL()public static Image loadImage(URL url)
url - URL where the image file is located.
File.toURL()
public static BufferedImage loadBufferedImage(File file,
int imageType)
file - File where the image file is located.imageType - one of the image type defined in the BufferedImage class.
BufferedImage
public static BufferedImage loadBufferedImage(String path,
int imageType)
path - Name of file where the image file is located.imageType - one of the image type defined in the BufferedImage class.
BufferedImage
public static BufferedImage loadBufferedImage(URL url,
int imageType)
url - URL where the image file is located.imageType - one of the image type defined in the BufferedImage class.
BufferedImagepublic static BufferedImage loadBufferedJPEGImage(URL url)
url - URL where the image file is located.
public static boolean isLeftToRight(Component c)
c - Component
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||