public class GuiStyle extends Object implements UIConstants
Modifier and Type | Class and Description |
---|---|
static class |
GuiStyle.DefaultFormSpecs |
Modifier and Type | Field and Description |
---|---|
static int |
ABUT_LEAVE_BORDERS |
static int |
ABUT_MERGE_INPUT_AND_BUTTON |
static int |
ABUT_NO_BORDERS |
static int |
ABUT_REVERSE_BORDER_CHANGE |
static boolean |
adjustToFontSize |
static int |
buttonEdge |
static int |
buttonFadePercent |
static int |
buttonPressedPercent |
static int |
checkboxEdge |
static boolean |
choiceAlwaysDrops |
static Color |
darkColor |
static boolean |
fadeInMenus |
static boolean |
globalDrawFlat |
static boolean |
globalPalmStyle |
static boolean |
globalSmallControls |
static boolean |
grayDisabledControls |
static int |
inputEdge |
static int |
menuItemSpacing |
static boolean |
menusAlwaysTakeGuiFont |
static int |
popupBeep
Set this to BEEP_NONE to silince the popup beep on mobile devices.
|
static int |
shadowThickness |
static Color |
softButtonBorder |
static Color |
softButtonGray |
static int |
standardBorder |
static int |
standardEdge |
static int |
STYLE_3D
Used with setStyle.
|
static int |
STYLE_ETCHED
Used with setStyle.
|
static int |
STYLE_PALM
Used with setStyle.
|
static int |
STYLE_SOFT
Used with setStyle.
|
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_ABUT_ANY, BF_ABUT_BOTTOM, BF_ABUT_LEFT, BF_ABUT_RIGHT, BF_ABUT_TOP, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN
ALWAYS_STRETCHABLE, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_HIDDEN, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TAG_BACKGROUND_IMAGE, TAG_BUSY_DISPLAY, TAG_COLORS, TAG_CONTROL_PAINTER, TAG_EXPOSE_GROUP, TAG_FIXEDSIZE, TAG_GRAY_BACKGROUND, TAG_HIDE_CONTROL_OBJECT, TAG_HIDE_PARENT, TAG_INNER_TEXT_INSETS, TAG_INPUT_STACK_PARENT, TAG_INSETS, TAG_MAKE_VISIBLE, TAG_MAXIMUMSIZE, TAG_MINIMUMSIZE, TAG_PAINT_CONTROL_LIST, TAG_PREFERRED_TEXT_SIZE, TAG_PREFERRED_TEXT_SIZE_HEIGHT, TAG_PREFERRED_TEXT_SIZE_WIDTH, TAG_PREFERREDSIZE, TAG_RECT, TAG_SHADOW_INSETS, TAG_SPAN, TAG_SWIPER, TAG_TEMPORARY_ERROR, TAG_TEXT_INSETS, TAG_TEXTSIZE, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, ContainerDontPaintChildren, Disabled, DisablePopupMenu, DisplayOnly, DontBuffer, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, ModifiersInheritedFromWindow, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpUIEvents, ShowSIP, ShrinkToNothing, SmallControl, TakeChildUIEvents, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown
Modifier and Type | Method and Description |
---|---|
static void |
draw3DRect(Graphics g,
Rect size,
int borderStyle,
boolean flat,
Color fill,
Color border)
Fill a rect.
|
static void |
draw3DRect(Graphics g,
Rect size,
int borderStyle,
Brush brush,
Color borderColor) |
static void |
drawMenuItemLines(Graphics gr,
int w,
int h,
FontMetrics fm,
boolean withSeparator) |
static void |
drawSoftBorder(Graphics g,
Control c) |
static void |
drawSoftBorder(Graphics g,
Rect size,
Color border,
int borderEdges) |
static void |
drawSoftButtonRect(Graphics g,
Rect size,
int borderStyle,
boolean pressed) |
static void |
drawSoftRect(Graphics g,
int x,
int y,
int width,
int height,
Color border,
int borderStyle) |
static Brush |
getButtonBrush(Color forColor,
boolean pressed) |
static Brush |
getButtonBrush(Color forColor,
boolean pressed,
int fadeDirection) |
static Color |
getDefaultBackground() |
static GuiStyle.DefaultFormSpecs |
getDefaultFormSpecs() |
static Color |
getDisabledAreaColor(Color defaultColor) |
static Color |
getMenuBackground(Color defaultColor) |
static Color |
getStandardBorder(Color defaultColor) |
static Color |
getStandardBorder(Color defaultColor,
int borderStyle,
int borderWidth) |
static int |
getStyle() |
static void |
highlightInsideRect(Graphics g,
Rect size,
int borderStyle) |
static void |
horizontalAbut(Control left,
Control right,
int options) |
static IImage |
iconizeMenuItem(IImage icon,
String text,
FontMetrics fm) |
static boolean |
isStyle(int style) |
static Color |
percentChange(Color c,
int percent,
boolean keepAlpha) |
static void |
removeAbut(Control c) |
static Control |
setBorder(Control c,
int borderFlags,
int borderWidth) |
static void |
setDefaultFormSpecs(GuiStyle.DefaultFormSpecs specs) |
static void |
setStyle(int style)
Set the style of Controls within an application.
|
static void |
softCorner(Graphics g,
int x,
int y,
int width,
int height,
Color c,
int border) |
static void |
verticalAbut(Control top,
Control bottom,
int options) |
public static int shadowThickness
public static boolean globalDrawFlat
public static boolean globalPalmStyle
public static boolean globalSmallControls
public static boolean grayDisabledControls
public static int standardEdge
public static int standardBorder
public static int inputEdge
public static int buttonEdge
public static int checkboxEdge
public static boolean choiceAlwaysDrops
public static boolean menusAlwaysTakeGuiFont
public static Color darkColor
public static Color softButtonGray
public static Color softButtonBorder
public static int buttonFadePercent
public static int buttonPressedPercent
public static boolean adjustToFontSize
public static int menuItemSpacing
public static final int STYLE_ETCHED
public static final int STYLE_3D
public static final int STYLE_SOFT
public static final int STYLE_PALM
public static final int ABUT_NO_BORDERS
public static final int ABUT_LEAVE_BORDERS
public static final int ABUT_MERGE_INPUT_AND_BUTTON
public static final int ABUT_REVERSE_BORDER_CHANGE
public static int popupBeep
public static boolean fadeInMenus
public static GuiStyle.DefaultFormSpecs getDefaultFormSpecs()
public static void setDefaultFormSpecs(GuiStyle.DefaultFormSpecs specs)
public static void softCorner(Graphics g, int x, int y, int width, int height, Color c, int border)
public static Brush getButtonBrush(Color forColor, boolean pressed, int fadeDirection)
public static void drawSoftRect(Graphics g, int x, int y, int width, int height, Color border, int borderStyle)
public static void drawSoftButtonRect(Graphics g, Rect size, int borderStyle, boolean pressed)
public static void draw3DRect(Graphics g, Rect size, int borderStyle, Brush brush, Color borderColor)
public static void draw3DRect(Graphics g, Rect size, int borderStyle, boolean flat, Color fill, Color border)
g
- size
- fill
- if this is null then you must set the brush before calling this method.border
- if this is null no border is drawn.public static void drawSoftBorder(Graphics g, Rect size, Color border, int borderEdges)
public static Color getStandardBorder(Color defaultColor, int borderStyle, int borderWidth)
public static Color getDefaultBackground()
public static IImage iconizeMenuItem(IImage icon, String text, FontMetrics fm)
public static void drawMenuItemLines(Graphics gr, int w, int h, FontMetrics fm, boolean withSeparator)
public static final void setStyle(int style)
style
- STYLE_ETCHED or STYLE_3Dpublic static int getStyle()
public static boolean isStyle(int style)
public static void removeAbut(Control c)