public class Fx extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
FX_OPTION_USE_COMPRESSED_ICONS |
static int |
FX_OPTION_USE_ICONS_FOR_ALL_IMAGES |
static int |
FX_OPTION_USE_ICONS_FOR_SYSTEM_IMAGES |
static int |
fxOptions |
| Modifier and Type | Method and Description |
|---|---|
static ISurface |
createDefaultWindow() |
static int |
decodeAlignment(String specs)
Decode alignments that can either be "L" or "R", and default to CENTER if not specified.
|
static int |
decodeAlignment(String specs,
int defaultValue)
Decode alignments that can either be "L" or "R", and default to CENTER if not specified.
|
static int |
decodeAnchors(String specs)
Decode anchors that can either be N|S|E|W, and default to CENTER if not specified.
|
static int |
decodeAnchors(String specs,
int defaultValue)
Decode anchors that can either be N|S|E|W, and default to CENTER if not specified.
|
static int |
decodeCellConstraints(String specs)
Decode cell constraints that can be h|H|v|V|F, and default to STRETCH if not specified.
|
static int |
decodeCellConstraints(String specs,
int defaultValue)
Decode cell constraints that can be h|H|v|V|F.
|
static int |
decodeFillConstraintsAndAnchor(String specs)
Decode fill constraints that can be N|S|E|W|h|H|v|V|F, and default to STRETCH if not specified.
|
static int |
decodeFillConstraintsAndAnchor(String specs,
int defaultValue)
Decode fill constraints that can be N|S|E|W|h|H|v|V|F.
|
static int |
getAlphaLevel(int[] values,
int offset,
int width,
int height,
int rowStride)
Checks alpha levels of the pixels.
|
static String |
getArialHelvetica()
Get the name of a valid installed Arial or Helvetica font.
|
static IConsole |
getConsole(String title,
int buttonsAndOptions,
int maxLines) |
static Font |
getDefaultFont() |
static FontMetrics |
getDefaultFontMetrics() |
static ISurface |
getDefaultSurface() |
static String |
getDefaultWindowTitle() |
static FontMetrics |
getFontMetrics(Font f)
Get a FontMetrics for a particular font, using the default surface.
|
static String |
getMonospacedCourierFont()
Get the name of a valid installed Courier Font that is monospaced.
|
static ITaskbarEntry |
getTaskbarEntry() |
static String |
getTimesRoman()
Get the name of a valid installed Times font.
|
static boolean |
isMonospaced(Font f)
For this to return true it must be monospaced AND scalable.
|
static boolean |
isScalable(Font f) |
static IImage |
loadPicture(Object source)
Load a Picture given a String name or a FormattedDataSource.
|
static void |
postPicture(String imageName,
IImage image)
Put an image into the ImageCache.
|
static Handle |
printerDialog(PropertyList printerProperties) |
static ImageData |
scaleImage(ImageData src,
int newWidth,
int newHeight) |
static void |
setFxHandler(IFxHandler handler) |
static Image |
toImage(IImage iimage,
Rect subArea)
Convert an IImage or portion thereof into an Image optimized for display.
|
static Font |
toMonospacedFont(Font possiblyMonospacedFont,
int size)
Find a monospaced Font.
|
static boolean |
yieldToEvents(int max)
Yield to user interface events if possible.
|
public static final int FX_OPTION_USE_ICONS_FOR_SYSTEM_IMAGES
public static final int FX_OPTION_USE_ICONS_FOR_ALL_IMAGES
public static final int FX_OPTION_USE_COMPRESSED_ICONS
public static int fxOptions
public static Image toImage(IImage iimage, Rect subArea) throws IllegalArgumentException
iimage - the source IImage.subArea - an optional sub-area in the image.IllegalArgumentException - if the sub-area is not null but not fully within the source image.public static boolean isScalable(Font f)
public static boolean isMonospaced(Font f)
f - the font to test.public static String getMonospacedCourierFont()
public static String getArialHelvetica()
public static String getTimesRoman()
public static Font toMonospacedFont(Font possiblyMonospacedFont, int size)
possiblyMonospacedFont - a Font that may be monospaced or null.size - if possiblyMonospacedFont is null this should be a size
for the returned font. Otherwise the size for possiblyMonospacedFont is used.public static int getAlphaLevel(int[] values,
int offset,
int width,
int height,
int rowStride)
values - the pixel values.offset - the start of the first pixel value.width - the number of values per lines to check.height - the number of lines to check.rowStride - the number of values in a line.public static void setFxHandler(IFxHandler handler)
public static Font getDefaultFont()
public static FontMetrics getDefaultFontMetrics()
public static FontMetrics getFontMetrics(Font f)
f - the Font.public static ISurface getDefaultSurface()
public static String getDefaultWindowTitle()
public static ISurface createDefaultWindow()
public static IImage loadPicture(Object source)
source - the source of the picture, which should be a name or a FormattedDataSource.public static void postPicture(String imageName, IImage image)
imageName - image - public static ITaskbarEntry getTaskbarEntry()
public static boolean yieldToEvents(int max)
maxTime - the maximum time to yield for.public static Handle printerDialog(PropertyList printerProperties)
public static int decodeAnchors(String specs)
specs - the specification string.public static int decodeAnchors(String specs, int defaultValue)
specs - the specification string.defaultValue - the default value.public static int decodeAlignment(String specs)
specs - the specification string.public static int decodeAlignment(String specs, int defaultValue)
specs - the specification string.defaultValue - the default value.public static int decodeCellConstraints(String specs)
specs - the specification string.public static int decodeCellConstraints(String specs, int defaultValue)
specs - the specification string.defaultValue - the default value.public static int decodeFillConstraintsAndAnchor(String specs)
specs - the specification string.public static int decodeFillConstraintsAndAnchor(String specs, int defaultValue)
specs - the specification string.defaultValue - the default value.