public class ClassicTheme extends java.lang.Object implements Theme
Theme
emulates the look of old Windows classic theme. It features very static UI,
with little or no sensitivity to mouse hovering. The color palette is low, with few colors
outside the line of gray tones. This makes the theme useful when application need to run with
lower resources.
The theme features multiple widgets with 3D aspect in order to improve overall look.
Modifier and Type | Class and Description |
---|---|
static class |
ClassicTheme.TextLookAndFeelImpl
Implements text look and feel immutable instances.
|
Theme.TextLookAndFeel
Modifier and Type | Field and Description |
---|---|
private static int |
ALERT_BOX_PADDING
Padding for alert boxes.
|
private static int |
BORDER_SIZE
Border size of main window border.
|
private static int |
BROWSE_DATA_OFFSET_LEFT
Left offset of a text inside a browse cell.
|
private static int |
BROWSE_DATA_OFFSET_LEFT_RA
Left offset of a text inside a browse cell, if column is right-aligned.
|
private static int |
BROWSE_LABEL_OFFSET_LEFT
Left offset of a text inside a browse label.
|
private static int |
BROWSE_LABEL_OFFSET_LEFT_RA
Left offset of a text inside a browse label, if column is right-aligned.
|
private static int |
BROWSE_LABEL_OFFSET_RIGHT
Right offset of a text inside a browse label.
|
private static ColorRgb |
BROWSE_ROW_XOR_COLOR
Color which is XORed with background to draw current row highlighting (dotted rectangle) in
browse widget.
|
private static int |
CAPTION_BUTTON_HEIGHT
Standard caption button height for this theme.
|
private static int |
CAPTION_BUTTON_WIDTH
Standard caption button width for this theme.
|
private java.util.Map<java.lang.String,ImageWrapper<?>> |
captionButtonImages
Cache with images from caption buttons.
|
private static int |
CHECKBOX_SIZE
Checkbox width or length
|
private static int |
CHECKBOX_SPACE
The space between checkbox and its label.
|
private static int |
COMBO_BOX_BUTTON_SIZE
Size of the drop-down button image.
|
private static int |
COMBO_BOX_ENTRY_DELTA
Dimension delta to draw entry field for DROP-DOWN and SIMPLE modes.
|
private static int |
COMBO_BOX_ENTRY_SHIFT
Shift in X and Y to draw entry field for DROP-DOWN and SIMPLE modes.
|
private java.util.Map<java.lang.Integer,ColorRgb> |
defaultColors
Cached map with default system colors.
|
private static int |
MENU_CHECKMARK_WIDTH
Check-mark width (for toggle-box) in pixels.
|
private static int |
MENU_LEFT_PAD
This menu-item left padding in a sub-menu body or in a MENUBAR in pixels.
|
private static int |
MENU_RIGHT_PAD
This menu-item right padding in a sub-menu body or in a MENUBAR in pixels.
|
private static int |
MENU_SM_ARROW_WIDTH
Sub-menu arrow width in pixels.
|
private static int |
MODAL_BORDER_SIZE
Border size of modal window border.
|
private static int |
PREBUILT_ARROW_IMAGE_SIZE
Prebuilt image size of the arrow style button.
|
private static int |
RADIO_BUTTON_EXTRA_DIST
Radio Button Radio buttons extra distance.
|
private static int |
RADIO_BUTTON_IMAGE_SIZE
Radio Button Control image size.
|
private static int |
RADIO_BUTTON_IMAGE_SPACE
Radio Button Control image reserved space.
|
private static ColorRgb |
ROW_TOGGLE_OUTLINE_COLOR
Color of the outline of the current toggle-box cell.
|
protected static int |
ROW_TOGGLE_SIZE
Default size of an in-browse toggle-box.
|
static int |
SCROLLBAR_THUMB_MIN_SIZE
Scrollbar's Thumb button minimum size
|
static int |
SCROLLBAR_WIDTH
The overall pixel width for vertical scrollbar or height for horizontal scrollbar.
|
private ImageWrapper<?> |
scrollbarImgBg
The image object for background fill.
|
private boolean |
scrollbarImgBgLoaded
Prohibits multiple attempts to load
scrollbarImgBg . |
private static int |
SMALL_CAPTION_BUTTON_HEIGHT
Small caption button height for this theme.
|
private static int |
SMALL_CAPTION_BUTTON_WIDTH
Small caption button width for this theme.
|
static int |
THREE_D_BORDER_OFFSET
Additional offset for 3d borders.
|
private static int |
TITLE_BAR_HEIGHT
Standard titlebar height for this theme.
|
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_NONE, ALIGN_RIGHT, ALIGN_TOP, HORIZONTAL_ALIGN_MASK, VERTICAL_ALIGN_MASK
Constructor and Description |
---|
ClassicTheme() |
Modifier and Type | Method and Description |
---|---|
void |
draw3DBorder(ThreeDBorderGuiImpl border,
GuiDriver gd,
int x,
int y,
int width,
int height)
Draws a
ThreeDBorderGuiImpl widget. |
void |
drawAlertBox(GuiDriver gd,
int x,
int y,
int width,
int height,
int paragraphWidth,
ImageWrapper icon,
java.lang.String text,
FontDetails font)
Renders borders of a top-level window.
|
protected void |
drawBrowseCell(BrowseColumnGuiImpl column,
GuiDriver gd,
int viewportIndex,
java.lang.String text)
Draw the cell.
|
protected void |
drawBrowseCellLabel(BrowseColumnGuiImpl column,
GuiDriver gd,
java.lang.String text,
int x,
int y)
Draw the text inside a label or cell.
|
protected void |
drawBrowseCellText(BrowseColumnGuiImpl column,
GuiDriver gd,
boolean label,
boolean selectedRow,
java.lang.String text,
NativeRectangle clipRectangle,
int lineNumber,
int viewportRowIndex)
Draw the text inside a label or cell.
|
void |
drawBrowseColumnDrag(BrowseGuiImpl browseGui,
GuiDriver gd,
int x,
int y,
int width,
int height)
Draw animation of a dragged column in a
BrowseGuiImpl widget. |
void |
drawBrowseColumnLabel(BrowseColumnGuiImpl column,
GuiDriver gd,
int x,
int y,
int width,
int height)
Draw the label on a
BrowseColumnGuiImpl widget. |
protected void |
drawBrowseColumnLabelRect(BrowseColumnGuiImpl column,
GuiDriver gd,
int topOffset,
boolean markersBody,
boolean markersLabel,
boolean selectedRow)
Draw label-style rectangle.
|
void |
drawBrowseMarkersColumn(BrowseColumnGuiImpl column,
GuiDriver gd,
int x,
int y,
int width,
int height)
Draw a browse marker column
BrowseColumnGuiImpl widget (without label). |
void |
drawBrowseNormalColumn(BrowseColumnGuiImpl column,
GuiDriver gd,
int x,
int y,
int width,
int height)
Draw a normal column
BrowseColumnGuiImpl widget (without label). |
void |
drawBrowseResizingColumn(BrowseGuiImpl browse,
GuiDriver gd,
int left,
int top,
int right,
int bottom)
Draw animation of a dragged column in a
BrowseGuiImpl widget. |
void |
drawBrowseRowHighlight(BrowseGuiImpl browse,
GuiDriver gd,
int x,
int y,
int width,
int height)
Highlight the currently active row in a
BrowseGuiImpl widget. |
void |
drawBrowseTitlePanel(BrowseGuiImpl browse,
GuiDriver gd,
GuiColorResolver gc,
GuiFontResolver gf,
int x,
int y,
int width,
int height)
Draw the title panel of a
BrowseGuiImpl widget. |
void |
drawButton(ButtonGuiImpl button,
GuiDriver gd,
GuiColorResolver gc,
GuiFontResolver gf,
int x,
int y,
int width,
int height)
Renders borders of a top-level window.
|
private void |
drawButtonBorder(GuiDriver gd,
NativePoint orig,
NativeDimension dim,
boolean focused,
boolean pressed,
boolean flat,
boolean mouseIn)
Draw bottom border simulating 3D effect.
|
private void |
drawButtonImages(ButtonGuiImpl button,
GuiDriver gd,
GuiColorResolver gc,
NativePoint orig,
NativeDimension dim,
boolean pressed,
boolean flat,
boolean mouseIn)
Draw button internals with different states using preloaded images.
|
private void |
drawButtonInternal(ButtonGuiImpl button,
GuiDriver gd,
GuiColorResolver gc,
GuiFontResolver gf,
NativePoint orig,
NativeDimension dim,
boolean focused,
boolean pressed,
boolean flat,
boolean mouseIn)
Draw button internals with different states.
|
void |
drawCaptionButton(CaptionButton button,
GuiDriver gd,
int x,
int y,
int width,
int height)
Renders a
CaptionButton . |
protected void |
drawCaret(GuiDriver gd,
int x1,
int y1,
int x2,
int y2)
Renders a caret for an enabled widget (
FillInGuiImpl or EditorGuiImpl ). |
private void |
drawCheckBox(ToggleBoxGuiImpl checkbox,
GuiDriver gd,
int x,
int y,
int width,
int height,
boolean pressed,
boolean hover) |
private void |
drawCheckmark(GuiDriver gd,
NativePoint p,
ColorRgb chkMarkColor)
Draws checkmark at specified point using specified driver and using specified color.
|
void |
drawComboBoxButton(ComboBoxGuiImpl combo,
GuiDriver gd,
int x,
int y,
int width,
int height,
boolean pressed,
boolean enabled,
boolean hover)
Renders the opening button of the combo box widget.
|
void |
drawComboBoxEntryField(ComboBoxGuiImpl combo,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height,
FontDetails<?> font,
boolean pressed,
boolean enabled,
boolean hover)
Renders the entry field of a combo box.
|
void |
drawComboBoxFieldBorder(ComboBoxGuiImpl combo,
GuiDriver gd,
int x,
int y,
int width,
int height,
boolean pressed,
boolean enabled,
boolean hover)
Renders the border (and possibly the background) of the combo box widget.
|
void |
drawEditorCaret(EditorGuiImpl editor,
GuiDriver gd,
int x1,
int y1,
int x2,
int y2)
Renders caret of the editor widget.
|
void |
drawEditorContent(EditorGuiImpl editor,
GuiDriver gd,
GuiFontResolver gf,
GuiColorResolver gc,
int x,
int y,
int width,
int height,
NativePoint selStart,
NativePoint selEnd,
int dx,
int dy)
Renders the content of an
EditorGuiImpl widget. |
void |
drawFileChooserThumbnailBackground(GuiDriver gd,
int x,
int y,
int width,
int height,
boolean selected,
boolean hover,
boolean focus)
Draws a File or Folder Thumbnail of from a file/dir chooser dialog.
|
void |
drawFillInBorder(GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height,
boolean border3D,
boolean hasFocus,
boolean hover)
Renders the border (and possibly the background) of the fill-in widget.
|
void |
drawFillInCaret(FillInGuiImpl fillIn,
GuiDriver gd,
int x1,
int y1,
int x2,
int y2)
Renders caret of the fill-in widget.
|
void |
drawFrameTitle(FrameGuiImpl frame,
GuiDriver gd,
GuiColorResolver gc,
GuiFontResolver gf,
int x,
int y,
int width,
int height)
Draw the title panel of a
BrowseGuiImpl widget. |
void |
drawLabel(LabelGuiImpl label,
GuiDriver gd,
GuiColorResolver gc,
GuiFontResolver gf,
int x,
int y,
int width,
int height,
boolean emptyMode)
Renders a label.
|
void |
drawLabelUnderline(GuiDriver gd,
int x,
int y,
int width,
int height,
ColorRgb fgColor)
Draw the horizontal bar under a label if the label is underlined.
|
void |
drawLineBorder(LineBorderGuiImpl border,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height)
Draw the line border
LineBorderGuiImpl widget. |
void |
drawMenuBackground(GuiDriver gd,
int x,
int y,
int width,
int height,
boolean popup)
Renders the background of a menu widget.
|
void |
drawMenuBarElement(MenuElement element,
GuiDriver gd,
GuiFontResolver gf,
int x,
int y,
int width,
int height,
boolean hover)
Draws an element of a menu in a menubar.
|
void |
drawMenuItemBackground(AbstractWidget item,
GuiDriver gd,
int x,
int y,
int width,
int height,
boolean hover)
Renders the background of an item in a menu widget.
|
void |
drawMenuItemContent(AbstractWidget item,
GuiDriver gd,
GuiFontResolver gf,
int x,
int y,
int width,
int height,
int textHeight,
boolean focused)
Renders the foreground content of menu item in a popup menu.
|
void |
drawMenuSeparator(GuiDriver gd,
int x,
int y,
int width,
int height)
Renders the separator line in a menu widget.
|
private static void |
drawMenuTitle(MenuElement<?> menuElement,
GuiDriver gd,
GuiFontResolver gf,
NativePoint tp,
java.lang.String title,
MnemonicInfo label)
Draws title string at the specified point.
|
private void |
drawPrepackagedImages(ButtonGuiImpl button,
GuiDriver gd,
GuiColorResolver gc,
NativePoint orig,
NativeDimension dim,
boolean pressed,
boolean flat,
boolean mouseIn)
Draw button internals with different states using preloaded prepackaged images.
|
void |
drawRadioButton(RadioButtonGuiImpl rb,
GuiDriver gd,
GuiColorResolver gc,
GuiFontResolver gf,
int x,
int y,
int width,
int height,
boolean focused,
boolean hover)
Renders a GUI radio button widget.
|
void |
drawRectangle(RectangleGuiImpl rect,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height)
Draws a
RectangleGuiImpl widget. |
protected void |
drawRowToggleImage(GuiDriver gd,
BrowseColumnGuiImpl column,
int viewportRowIndex,
boolean checked)
Draw the image of a non-edited in-browse toggle-box.
|
void |
drawScrollBarButton(GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height,
ScrollBar.Position pos,
boolean horizontal,
boolean enabled,
boolean pressed,
boolean highlighted)
Renders a button of the scrollbar widget.
|
void |
drawScrollBarGauge(GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height,
boolean horizontal)
Renders the gauge (background) of the scrollbar widget.
|
void |
drawScrollBarThumb(GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height,
boolean pressed,
boolean hover,
boolean horizontal)
Renders the thumb/slider of the scrollbar widget.
|
void |
drawSelectionFocus(GuiDriver gd,
int x,
int y,
int width,
int height)
Utility method for drawing a dotted rectangle using XOR operation.
|
void |
drawSelectionListBackground(GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height)
Renders the background of a selection list.
|
void |
drawSelectionListItem(ComboBoxGuiImpl box,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height,
java.lang.String text,
int fontSize,
boolean enabled,
boolean highlighted,
boolean selected)
Renders a single item in a combo box selection list.
|
void |
drawSliderBackground(SliderGuiImpl slider,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int w,
int h)
Draws the background of a
SliderGuiImpl widget. |
void |
drawSliderFrame(SliderGuiImpl slider,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int w,
int h)
Draws the dotted frame border of a
SliderGuiImpl widget. |
void |
drawSliderThumb(SliderGuiImpl slider,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int w,
int h)
Draws the slider thumb of a
SliderGuiImpl widget. |
void |
drawSliderTicMarks(SliderGuiImpl slider,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int length)
Draws the slider tic marks of a
SliderGuiImpl widget. |
void |
drawSliderTrack(SliderGuiImpl slider,
GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int w)
Draws the slide track of a
SliderGuiImpl widget. |
void |
drawSliderValue(SliderGuiImpl slider,
GuiDriver gd,
GuiColorResolver gc,
GuiFontResolver gf,
int x,
int y,
int w,
int h)
Draws the current screen value of a
SliderGuiImpl widget. |
void |
drawStatusBar(GuiDriver gd,
GuiColorResolver gc,
int x,
int y,
int width,
int height,
java.lang.String text,
GuiFontResolver.FontCache cache,
NativePoint bounds,
NativeDimension txtDim,
boolean resizable)
Renders the status bar of a top-level window.
|
void |
drawToggleBox(ToggleBoxGuiImpl cb,
GuiDriver gd,
GuiColorResolver gc,
GuiFontResolver gf,
int x,
int y,
int width,
int height,
boolean pressed,
boolean hover)
Renders a GUI toggle box widget.
|
void |
drawToolTip(GuiDriver gd,
int x,
int y,
int width,
int height,
FontDetails fnt,
java.lang.String text)
Draw a
ToolTip . |
void |
drawWindowBorder(GuiDriver gd,
int x,
int y,
int width,
int height,
NativeInsets border,
boolean active)
Renders borders of a top-level window.
|
void |
drawWindowTitle(GuiDriver gd,
GuiFontResolver gf,
int x,
int y,
int width,
int height,
java.lang.String title,
boolean active)
Renders the text on the titlebar of a top-level window.
|
void |
drawWindowTitleBar(GuiDriver gd,
int x,
int y,
int width,
int height,
boolean active)
Renders the background of the titlebar of a top-level window.
|
int |
get3DBorderOffset()
Obtain the offset in a 3D bordered widget.
|
int |
getAlertBoxPadding()
Obtain the padding for alert boxes.
|
java.lang.String |
getBinaryResourceLocation()
Obtain the location of binary resources (like pixmaps and sprites) used by this theme.
|
ColorRgb |
getBrowseCellForegroundColor(BrowseColumnGuiImpl column,
boolean label,
boolean selected,
int viewportRowIndex)
Get foreground color of the selected cell type.
|
ColorRgb |
getBrowseCellSeparatorColor(BrowseGuiImpl browse)
Get the cell separator color.
|
int |
getBrowseDataOffsetLeft(boolean rightAligned)
Get left offset of a text inside a browse cell.
|
int |
getBrowseLabelOffsetLeft(boolean rightAligned)
Get left offset of a text inside a browse label.
|
int |
getBrowseLabelOffsetRight()
Get right offset of a text inside a browse label.
|
protected ImageWrapper |
getBrowseMarkerArrow(boolean selected)
Get row marker image for a row.
|
int |
getCaptionButtonHeight(CaptionButtonType type,
boolean maximized)
Returns the height of a caption button on window's title bar.
|
int |
getCaptionButtonsAlignment(CaptionButtonType type)
Get the alignment of caption button for this theme.
|
int |
getCaptionButtonWidth(CaptionButtonType type,
boolean dialog)
Returns the width of a caption button on window's title bar.
|
int |
getCheckBoxSize()
Obtain the size of image on a checkbox widget.
|
int |
getCheckBoxSpace()
Obtains the space needed by a checkbox widget.
|
ColorRgb |
getColumnBackgroundColor(BrowseColumnGuiImpl column)
Get column background color.
|
ColorRgb |
getColumnLabelBackgroundColor(BrowseColumnGuiImpl column)
Get column label background color.
|
int |
getComboBoxButtonSize()
Obtain the size of the button that opens the combo box.
|
int |
getComboBoxDropDownOffset()
Obtain the vertical distance between the combo box and the scrolling selection list.
|
int |
getComboBoxEntryShift()
Obtain the shifting distance in a combo box widget.
|
int |
getComboBoxFieldExtraSpace(boolean horiz,
boolean is3D)
Obtain the field extra space for combo box layout.
|
java.util.Map<java.lang.String,java.lang.String> |
getDefaultFontAliases()
Obtain the map of default font aliases specific to current
Theme , to which a key
defaults, if not overridden in the directory. |
java.util.Map<java.lang.Integer,ColorRgb> |
getDefaultSystemPalette()
Obtain the default system palette for this theme.
|
ColorRgb |
getFileChooserForegroundColor(GuiDriver gd,
boolean focused,
boolean selected,
boolean hover,
boolean filename,
boolean infoLabel,
boolean infodata)
Obtain color information needed to render the foreground of a thumbnail.
|
ColorRgb |
getHyperlinkColor(boolean selectedRow)
Get the hyperlink color.
|
FontDetails |
getHyperlinkFont(WidgetId windowId,
FontDetails sourceFont)
Get the hyperlink font basing on the regular text font.
|
ImageWrapper |
getImage(java.lang.String name,
int width,
int height,
boolean antialias)
Obtain an image resource specific to this
Theme . |
int |
getMenuBarElementMinSize(boolean horiz)
Obtain the minimum size of a titlebar element for this Theme, including any border.
|
int |
getMenuCheckmarkWidth()
Obtain the width of the check mark to for togglable menus.
|
NativeInsets |
getMenuInsets()
Obtain the insets of a popup menu.
|
int |
getMenuItemHeight(MenuElement menuItem)
Obtain the height of a
MenuElement in a menu widget. |
int |
getMenuLeftPad()
Obtain the left padding of the test in a menu item.
|
int |
getMenuRightPad()
Obtain the right padding of the test in a menu item.
|
int |
getMenuSeparatorHeight()
Obtain the fixed height of a separator in a popup menu widget.
|
int |
getMenuSmArrowWidth()
Obtain the width of the arrow marking menus with submenus (including additional space).
|
java.lang.String |
getName()
Get the name of this
Theme . |
char |
getPasswordCharacter()
Obtain the character used to replace text in password fields.
|
int |
getPrebuiltArrowImageSize()
Utility method that returns the size of the prebuilt arrow images.
|
int |
getRadioButtonExtraDist()
Obtain the extra distance in a radio button.
|
protected ImageWrapper |
getRadioButtonImage(boolean on,
boolean enabled,
boolean hover,
boolean pressed)
Obtain the image from a radio button with specified attributes.
|
int |
getRadioButtonImageSpace()
Obtain the distance before text, including the radio button (text offset).
|
protected ImageWrapper |
getRowToggleImage(boolean checked)
Get the image of a non-edited in-browse toggle-box.
|
NativePoint |
getRowToggleOffset(BrowseColumnGuiImpl column,
boolean editor)
Get the offset of the in-browse toggle-box relatively to the containing cell.
|
protected NativePoint |
getRowToggleOffsetCentered(BrowseColumnGuiImpl column,
boolean editor)
Get the offset of the in-browse toggle-box, centered in the containing cell, relatively to
that cell.
|
NativeDimension |
getRowToggleSize(BrowseColumnGuiImpl column,
boolean editor)
Get the size of the in-browse toggle-box.
|
int |
getScrollBarButtonHeight()
Obtain the size of the scroll button on the direction of the scroll.
|
int |
getScrollBarButtonWidth()
Obtain the size of the scroll button on the direction perpendicular to scroll direction.
|
int |
getScrollBarGaugeWidth()
Obtain the width of the gauge of a scrollbar widget.
|
int |
getScrollBarThumbMinSize()
Obtain the minimum size of the thumb/slider of a scrollbar widget.
|
int |
getScrollBarThumbWidth()
Obtain the thumb/slider width in a scrollbar widget.
|
protected ColorRgb |
getSliderTicmarkColor(GuiColorResolver gc)
Obtain the color used for drawing the tic-marks for this
Theme . |
int |
getSpaceBeforeButton(CaptionButtonType type)
Return the amount of space to the right of this button.
|
java.util.Map<java.lang.String,java.lang.String> |
getStandardFontTable()
Obtain the map of standard fonts specific to current
Theme , to which a key defaults,
if not overridden in the directory. |
Theme.TextLookAndFeel |
getTextLookAndFeel(GuiColorResolver gcd,
GuiColorResolver gce)
Returns text look and feel.
|
Theme.TextLookAndFeel |
getTextLookAndFeel(GuiDriver gd,
GuiColorResolver gc,
boolean enabledTextProperty,
boolean verticallyCenteredText)
Returns the text look and feel depending on the requested text properties to be selected or
unselected and enabled or disabled.
|
java.awt.Font |
getTitleBarFont()
Obtain the
Font used to render the windows title. |
int |
getTitleBarHeight(boolean maximized)
Returns the height of window's titleBar.
|
java.awt.Color |
getTitleBarTextColor(boolean active)
Obtain the
Color used to render the windows title. |
NativeInsets |
getWindowBorderInsets(boolean modal)
Returns the window's border insets.
|
int |
getWindowIconAlignment()
Get the icon alignment for this theme.
|
int |
getWindowTitleAlignment()
Get the title alignment for this theme.
|
protected boolean |
isBrowseLabelBorderDrawQuirk(BrowseColumnGuiImpl column)
There is 4GL quirk: right edge of the label's border is not drawn for the last locked
column.
|
boolean |
isClassic()
Check whether this is a classic theme.
|
boolean |
isMouseHoverSensitive()
Check if the theme is mouse hover sensitive.
|
double |
layoutTitleBar(TopLevelWindow window,
Widget icon,
Label title,
CaptionButton[] buttons,
double width,
CoordinatesConversion c)
Do the layout of a titlebar.
|
void |
releaseResources()
Release any held resources when this
Theme is removed. |
protected void |
setBrowseCellBackgroundSelectionColor(GuiDriver gd,
ColorRgb unselColor)
Set the selected cell background color into the
gd GuiDriver . |
protected void |
setCompositeXorColor(GuiDriver gd)
Sets the composite color for XOR operations on browse widgets.
|
private static final int TITLE_BAR_HEIGHT
private static final int CAPTION_BUTTON_WIDTH
private static final int CAPTION_BUTTON_HEIGHT
private static final int SMALL_CAPTION_BUTTON_HEIGHT
private static final int SMALL_CAPTION_BUTTON_WIDTH
private static final int BORDER_SIZE
private static final int MODAL_BORDER_SIZE
private static final int PREBUILT_ARROW_IMAGE_SIZE
private static final int RADIO_BUTTON_IMAGE_SIZE
private static final int RADIO_BUTTON_EXTRA_DIST
private static final int RADIO_BUTTON_IMAGE_SPACE
private static final int CHECKBOX_SPACE
private static final int CHECKBOX_SIZE
private static final int MENU_LEFT_PAD
private static final int MENU_RIGHT_PAD
private static final int MENU_CHECKMARK_WIDTH
private static final int MENU_SM_ARROW_WIDTH
public static final int SCROLLBAR_WIDTH
public static final int SCROLLBAR_THUMB_MIN_SIZE
private static int ALERT_BOX_PADDING
public static final int THREE_D_BORDER_OFFSET
private static final int COMBO_BOX_BUTTON_SIZE
private static final int COMBO_BOX_ENTRY_SHIFT
private static final int COMBO_BOX_ENTRY_DELTA
private static final ColorRgb ROW_TOGGLE_OUTLINE_COLOR
private static final ColorRgb BROWSE_ROW_XOR_COLOR
private static final int BROWSE_LABEL_OFFSET_LEFT
private static final int BROWSE_LABEL_OFFSET_LEFT_RA
private static final int BROWSE_LABEL_OFFSET_RIGHT
private static final int BROWSE_DATA_OFFSET_LEFT
private static final int BROWSE_DATA_OFFSET_LEFT_RA
protected static final int ROW_TOGGLE_SIZE
private ImageWrapper<?> scrollbarImgBg
private boolean scrollbarImgBgLoaded
scrollbarImgBg
.private java.util.Map<java.lang.String,ImageWrapper<?>> captionButtonImages
private java.util.Map<java.lang.Integer,ColorRgb> defaultColors
public java.lang.String getName()
Theme
.public void releaseResources()
Theme
is removed.releaseResources
in interface Theme
public ImageWrapper getImage(java.lang.String name, int width, int height, boolean antialias)
Theme
. The image can be cached for
performance reasons. It will be automatically released when releaseResources()
is
called, when a new Theme
is loaded and this one is removed.getImage
in interface Theme
name
- The name of the image as path within jar bundle.width
- The desired with of the returned image. This is only a hint. If available, an
image with exact width is returned. One need to check the size of the returned
ImageWrapper
to know the exact value.height
- The desired with of the returned image. This is only a hint. If available, an
image with exact width is returned. One need to check the size of the returned
ImageWrapper
to know the exact value.antialias
- if true
and image is scaled to meet the size hints, an smooth scaling
algorithm will be used, otherwise a faster one will be used but the image quality
will be lower. If image is not scaled the parameter is ignored.ImageWrapper
containing the requested image resource if it can be found
and loaded and null
otherwise.public java.lang.String getBinaryResourceLocation()
getBinaryResourceLocation
in interface Theme
public boolean isMouseHoverSensitive()
isMouseHoverSensitive
in interface Theme
false
. This theme is NOT mouse hover sensitive.public boolean isClassic()
public java.util.Map<java.lang.Integer,ColorRgb> getDefaultSystemPalette()
getDefaultSystemPalette
in interface Theme
public java.util.Map<java.lang.String,java.lang.String> getStandardFontTable()
Theme
, to which a key defaults,
if not overridden in the directory.getStandardFontTable
in interface Theme
Theme
.public java.util.Map<java.lang.String,java.lang.String> getDefaultFontAliases()
Theme
, to which a key
defaults, if not overridden in the directory.getDefaultFontAliases
in interface Theme
Theme
.public int getPrebuiltArrowImageSize()
getPrebuiltArrowImageSize
in interface Theme
public int getTitleBarHeight(boolean maximized)
getTitleBarHeight
in interface Theme
maximized
- On some themes, the maximized window have a different title bar height when
maximized.public NativeInsets getWindowBorderInsets(boolean modal)
getWindowBorderInsets
in interface Theme
modal
- Usually the modal dialogs/windows have a different width if modal.public int getCaptionButtonHeight(CaptionButtonType type, boolean maximized)
getCaptionButtonHeight
in interface Theme
type
- On some specific themes, the height of buttons is not the same.maximized
- On some themes, the maximized window have a different button height when
maximized.public int getCaptionButtonWidth(CaptionButtonType type, boolean dialog)
getCaptionButtonWidth
in interface Theme
type
- On some specific themes, the width of buttons is not the same.dialog
- true
for dialogs. The dialogs may have specific width for caption buttons.public int getCaptionButtonsAlignment(CaptionButtonType type)
getCaptionButtonsAlignment
in interface Theme
type
- On some specific themes, the alignment of buttons is not the same.public int getWindowTitleAlignment()
getWindowTitleAlignment
in interface Theme
public int getWindowIconAlignment()
getWindowIconAlignment
in interface Theme
public int getSpaceBeforeButton(CaptionButtonType type)
getSpaceBeforeButton
in interface Theme
type
- The caption button type.public java.awt.Color getTitleBarTextColor(boolean active)
Color
used to render the windows title.getTitleBarTextColor
in interface Theme
active
- true
if the rendered window is active. The inactive window is usually fade.Color
used to render the windows title.public double layoutTitleBar(TopLevelWindow window, Widget icon, Label title, CaptionButton[] buttons, double width, CoordinatesConversion c)
Theme
can define how its components are arranged.layoutTitleBar
in interface Theme
window
- The window whose titlebar is laid out.icon
- The icon widget of the window (if any).title
- The Label
that displays the window's title.buttons
- An array with the CaptionButton
-s present on the titlebar of this window.width
- The width of the window (in character units).c
- the CoordinatesConversion
used for possible units conversions.public java.awt.Font getTitleBarFont()
Font
used to render the windows title.getTitleBarFont
in interface Theme
Font
used to render the windows title.public void drawCaptionButton(CaptionButton button, GuiDriver gd, int x, int y, int width, int height)
CaptionButton
.drawCaptionButton
in interface Theme
button
- The CaptionButton
to be drawn.gd
- The GuiDriver
used for drawing operations. Note that internal state of
this object can affect the resulting output.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public void drawWindowTitleBar(GuiDriver gd, int x, int y, int width, int height, boolean active)
drawWindowTitleBar
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.active
- true
if the drawn windows is active.public void drawWindowTitle(GuiDriver gd, GuiFontResolver gf, int x, int y, int width, int height, java.lang.String title, boolean active)
drawWindowTitle
in interface Theme
gd
- The GuiDriver
used for drawing operations.gf
- The GuiFontResolver
for selecting the required font.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.title
- The title of the window.active
- true
if the drawn windows is active.public void drawWindowBorder(GuiDriver gd, int x, int y, int width, int height, NativeInsets border, boolean active)
drawWindowBorder
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.border
- The width of the border on each side.active
- true
if the drawn windows is active.public void drawButton(ButtonGuiImpl button, GuiDriver gd, GuiColorResolver gc, GuiFontResolver gf, int x, int y, int width, int height)
drawButton
in interface Theme
button
- The ButtonGuiImpl
to be rendered.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
to be used for color selection.gf
- The GuiFontResolver
to be used.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.private void drawButtonBorder(GuiDriver gd, NativePoint orig, NativeDimension dim, boolean focused, boolean pressed, boolean flat, boolean mouseIn)
gd
- The GuiDriver.orig
- Button origin.dim
- Button size.focused
- Is the button focused.pressed
- Is the button pressed.flat
- Is the button flat?mouseIn
- true
if mouse hovering the button.private void drawButtonInternal(ButtonGuiImpl button, GuiDriver gd, GuiColorResolver gc, GuiFontResolver gf, NativePoint orig, NativeDimension dim, boolean focused, boolean pressed, boolean flat, boolean mouseIn)
button
- gd
- gc
- gf
- orig
- Button origin.dim
- Button size.focused
- Is the button focused.pressed
- Is the button pressed.flat
- Is mouse over the buttonmouseIn
- true
if mouse hovering the button.private void drawButtonImages(ButtonGuiImpl button, GuiDriver gd, GuiColorResolver gc, NativePoint orig, NativeDimension dim, boolean pressed, boolean flat, boolean mouseIn)
button
- gd
- gc
- orig
- Button origin.dim
- Button size.pressed
- Is the button pressed.flat
- mouseIn
- true
if mouse hovering the button.private void drawPrepackagedImages(ButtonGuiImpl button, GuiDriver gd, GuiColorResolver gc, NativePoint orig, NativeDimension dim, boolean pressed, boolean flat, boolean mouseIn)
button
- gd
- gc
- orig
- Button origin.dim
- Button size.pressed
- Is the button pressed.flat
- mouseIn
- true
if mouse hovering the button.public int getAlertBoxPadding()
getAlertBoxPadding
in interface Theme
public void drawAlertBox(GuiDriver gd, int x, int y, int width, int height, int paragraphWidth, ImageWrapper icon, java.lang.String text, FontDetails font)
drawAlertBox
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.paragraphWidth
- The width of the paragraph.icon
- The ImageWrapper
containing the image to be shown in the alert dialog. May
be null
.text
- The text to be displayed in this alert box.font
- The FontDetails
needed for text layout.public void drawRadioButton(RadioButtonGuiImpl rb, GuiDriver gd, GuiColorResolver gc, GuiFontResolver gf, int x, int y, int width, int height, boolean focused, boolean hover)
drawRadioButton
in interface Theme
rb
- The RadioButtonGuiImpl
to be rendered.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
to be used for color selection.gf
- The GuiFontResolver
to be used.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.focused
- true
if the radio button have the focushover
- true
if mouse is hovering over the checkbox. Some styles are mouse hoveringpublic int getRadioButtonExtraDist()
getRadioButtonExtraDist
in interface Theme
public int getRadioButtonImageSpace()
getRadioButtonImageSpace
in interface Theme
protected ImageWrapper getRadioButtonImage(boolean on, boolean enabled, boolean hover, boolean pressed)
on
- The button state. true
if button is on.enabled
- true
is button enabled.hover
- true
if mouse is hovering over the button. Some styles are mouse hovering
sensitive.pressed
- true
if the radio button is pressed (the mouse button is down on the
button).ImageWrapper
containing the image with requested properties.public int getCheckBoxSpace()
getCheckBoxSpace
in interface Theme
public int getCheckBoxSize()
getCheckBoxSize
in interface Theme
public void drawToggleBox(ToggleBoxGuiImpl cb, GuiDriver gd, GuiColorResolver gc, GuiFontResolver gf, int x, int y, int width, int height, boolean pressed, boolean hover)
drawToggleBox
in interface Theme
cb
- The ToggleBoxGuiImpl
to be rendered.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
to be used for color selection.gf
- The GuiFontResolver
to be used.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.pressed
- true
if the checkbox is pressed (the mouse button is down on the button).hover
- true
if mouse is hovering over the checkbox. Some styles are mouse hoveringprivate void drawCheckBox(ToggleBoxGuiImpl checkbox, GuiDriver gd, int x, int y, int width, int height, boolean pressed, boolean hover)
private void drawCheckmark(GuiDriver gd, NativePoint p, ColorRgb chkMarkColor)
p
- Target point.chkMarkColor
- ColorRgb - RGB color for checkmark.public int getScrollBarButtonWidth()
getScrollBarButtonWidth
in interface Theme
public int getScrollBarThumbWidth()
getScrollBarThumbWidth
in interface Theme
public int getScrollBarGaugeWidth()
getScrollBarGaugeWidth
in interface Theme
public int getScrollBarButtonHeight()
getScrollBarButtonHeight
in interface Theme
public int getScrollBarThumbMinSize()
getScrollBarThumbMinSize
in interface Theme
public void drawScrollBarGauge(GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height, boolean horizontal)
drawScrollBarGauge
in interface Theme
gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.horizontal
- The direction of the scrollbar, true
for horizontal.public void drawScrollBarThumb(GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height, boolean pressed, boolean hover, boolean horizontal)
drawScrollBarThumb
in interface Theme
gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.pressed
- If the mouse is dragging the thumb of the scrollbar.hover
- Is mouse hovering this component ?horizontal
- The direction of the scrollbar, true
for horizontal.public void drawScrollBarButton(GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height, ScrollBar.Position pos, boolean horizontal, boolean enabled, boolean pressed, boolean highlighted)
drawScrollBarButton
in interface Theme
gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.pos
- The position of the button (UP/DOWN, LEFT/RIGHT).horizontal
- The direction of the scrollbar, true
for horizontal.enabled
- If the button is enabled.pressed
- If the button is down (pressed by mouse).highlighted
- If the mouse is hovering over the button.public int get3DBorderOffset()
get3DBorderOffset
in interface Theme
public char getPasswordCharacter()
getPasswordCharacter
in interface Theme
public void drawFillInBorder(GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height, boolean border3D, boolean hasFocus, boolean hover)
drawFillInBorder
in interface Theme
gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.border3D
- If fill-in widget has a 3d border. Some flat Theme
s may ignore this.hasFocus
- The fill-in widget is focused.hover
- The mouse is hovering over the fill-in widget.public void drawFillInCaret(FillInGuiImpl fillIn, GuiDriver gd, int x1, int y1, int x2, int y2)
drawFillInCaret
in interface Theme
fillIn
- The FillInGuiImpl
widget whose caret is to be rendered.gd
- The GuiDriver
used for drawing operations.x1
- The left extremity of the caret.y1
- The top extremity of the caret.x2
- The right extremity of the caret.y2
- The bottom extremity of the caret.protected void drawCaret(GuiDriver gd, int x1, int y1, int x2, int y2)
FillInGuiImpl
or EditorGuiImpl
).gd
- The GuiDriver
used for drawing operations.x1
- The left extremity of the caret.y1
- The top extremity of the caret.x2
- The right extremity of the caret.y2
- public void drawStatusBar(GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height, java.lang.String text, GuiFontResolver.FontCache cache, NativePoint bounds, NativeDimension txtDim, boolean resizable)
drawStatusBar
in interface Theme
gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used for color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.text
- The text in the status bar.cache
- The font cache used for text rendering.bounds
- The NativePoint
where the text is drawn.txtDim
- The NativeDimension
of the text displayed in status bar.resizable
- true
window is resizable. In this case a "grip" is drawn in the lower right
corner.public int getComboBoxFieldExtraSpace(boolean horiz, boolean is3D)
getComboBoxFieldExtraSpace
in interface Theme
horiz
- Direction. true
for horizontal space.is3D
- Whether this is widget has a 3D border.public int getComboBoxEntryShift()
getComboBoxEntryShift
in interface Theme
public void drawComboBoxEntryField(ComboBoxGuiImpl combo, GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height, FontDetails<?> font, boolean pressed, boolean enabled, boolean hover)
drawComboBoxEntryField
in interface Theme
combo
- The ComboBoxGuiImpl
whose entry field is painted.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.font
- A FontDetails
used for text rendering.pressed
- true
if the widget is pressed (and eventually open).enabled
- Whether the widget has the focus.hover
- The mouse is hovering over the fill-in widget.public void drawComboBoxFieldBorder(ComboBoxGuiImpl combo, GuiDriver gd, int x, int y, int width, int height, boolean pressed, boolean enabled, boolean hover)
drawComboBoxFieldBorder
in interface Theme
combo
- The ComboBoxGuiImpl
whose border is being painted.gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.pressed
- true
if the widget is pressed (and eventually open).enabled
- Whether the widget has the focus.hover
- The mouse is hovering over the fill-in widget.public int getComboBoxButtonSize()
getComboBoxButtonSize
in interface Theme
public void drawComboBoxButton(ComboBoxGuiImpl combo, GuiDriver gd, int x, int y, int width, int height, boolean pressed, boolean enabled, boolean hover)
drawComboBoxButton
in interface Theme
combo
- The ComboBoxGuiImpl
whose border is being painted.gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.pressed
- true
if the widget is pressed (and eventually open).enabled
- Whether the widget has the focus.hover
- The mouse is hovering over the fill-in widget.public void drawSelectionListBackground(GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height)
drawSelectionListBackground
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.gc
- The GuiColorResolver
used color selection.public void drawSelectionListItem(ComboBoxGuiImpl box, GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height, java.lang.String text, int fontSize, boolean enabled, boolean highlighted, boolean selected)
drawSelectionListItem
in interface Theme
box
- The ComboBoxGuiImpl
whose border is being painted.gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.text
- The text to be displayed on this itemfontSize
- The size of teh font to be used.highlighted
- The mouse is hovering over the fill-in widget.enabled
- Whether the widget has the focus.gc
- The GuiColorResolver
used color selection.public int getComboBoxDropDownOffset()
getComboBoxDropDownOffset
in interface Theme
public int getMenuBarElementMinSize(boolean horiz)
getMenuBarElementMinSize
in interface Theme
horiz
- If true
returns the minimum width, if false
returns minimum height.public int getMenuLeftPad()
getMenuLeftPad
in interface Theme
public int getMenuRightPad()
getMenuRightPad
in interface Theme
public int getMenuCheckmarkWidth()
getMenuCheckmarkWidth
in interface Theme
public int getMenuSmArrowWidth()
getMenuSmArrowWidth
in interface Theme
public NativeInsets getMenuInsets()
getMenuInsets
in interface Theme
public int getMenuSeparatorHeight()
getMenuSeparatorHeight
in interface Theme
public int getMenuItemHeight(MenuElement menuItem)
MenuElement
in a menu widget.getMenuItemHeight
in interface Theme
public void drawMenuBackground(GuiDriver gd, int x, int y, int width, int height, boolean popup)
drawMenuBackground
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.popup
- true
for popup menus.public void drawMenuSeparator(GuiDriver gd, int x, int y, int width, int height)
drawMenuSeparator
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public void drawMenuItemContent(AbstractWidget item, GuiDriver gd, GuiFontResolver gf, int x, int y, int width, int height, int textHeight, boolean focused)
drawMenuItemContent
in interface Theme
item
- The MenuItemGuiImpl
or SubMenuGuiImpl
to be drawn.gd
- The GuiDriver
used for drawing operations.gf
- The GuiFontResolver
to be used.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.textHeight
- The height of the text.focused
- true
if this item is highlighted/focused.private static void drawMenuTitle(MenuElement<?> menuElement, GuiDriver gd, GuiFontResolver gf, NativePoint tp, java.lang.String title, MnemonicInfo label)
menuElement
- MenuItem or SubMenu widget.gd
- GUI driver.gf
- GUI font resolver.tp
- Target point.title
- The title of menu widget.label
- Prepared title string.java.lang.IllegalArgumentException
- When menuWdg is not a MenuItem or SubMenu.public void drawMenuBarElement(MenuElement element, GuiDriver gd, GuiFontResolver gf, int x, int y, int width, int height, boolean hover)
drawMenuBarElement
in interface Theme
element
- The MenuElement
widget to be painted.gd
- The GuiDriver
used for drawing operations.gf
- GUI font resolver.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.hover
- true
if this item is highlighted/focused.public void drawMenuItemBackground(AbstractWidget item, GuiDriver gd, int x, int y, int width, int height, boolean hover)
drawMenuItemBackground
in interface Theme
item
- The MenuItemGuiImpl
or SubMenuGuiImpl
to be drawn.gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.hover
- true
if this item is highlighted/focused.public void drawLabel(LabelGuiImpl label, GuiDriver gd, GuiColorResolver gc, GuiFontResolver gf, int x, int y, int width, int height, boolean emptyMode)
drawLabel
in interface Theme
label
- The LabelGuiImpl
to be drawn.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.gf
- The GuiFontResolver
to be used.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.emptyMode
- If it is true
, empty string is displayed.public void drawLabelUnderline(GuiDriver gd, int x, int y, int width, int height, ColorRgb fgColor)
drawLabelUnderline
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.fgColor
- The color attribute for the line.protected void setCompositeXorColor(GuiDriver gd)
gd
- the active GuiDriver
used to draw the browse widget.public void drawBrowseRowHighlight(BrowseGuiImpl browse, GuiDriver gd, int x, int y, int width, int height)
BrowseGuiImpl
widget.drawBrowseRowHighlight
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.browse
- The BrowseGuiImpl
widget.public void drawBrowseColumnDrag(BrowseGuiImpl browseGui, GuiDriver gd, int x, int y, int width, int height)
BrowseGuiImpl
widget.drawBrowseColumnDrag
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.browseGui
- The BrowseGuiImpl
widget.public void drawBrowseResizingColumn(BrowseGuiImpl browse, GuiDriver gd, int left, int top, int right, int bottom)
BrowseGuiImpl
widget.drawBrowseResizingColumn
in interface Theme
browse
- The BrowseGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.left
- The left offset of the resized column.top
- The top offset where the columns start.right
- The right offset of the resized column.bottom
- The bottom offset where the columns end.public void drawBrowseTitlePanel(BrowseGuiImpl browse, GuiDriver gd, GuiColorResolver gc, GuiFontResolver gf, int x, int y, int width, int height)
BrowseGuiImpl
widget.drawBrowseTitlePanel
in interface Theme
browse
- The BrowseGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.gf
- The GuiFontResolver
to be used.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public void drawBrowseColumnLabel(BrowseColumnGuiImpl column, GuiDriver gd, int x, int y, int width, int height)
BrowseColumnGuiImpl
widget.drawBrowseColumnLabel
in interface Theme
column
- The BrowseGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public void drawBrowseMarkersColumn(BrowseColumnGuiImpl column, GuiDriver gd, int x, int y, int width, int height)
BrowseColumnGuiImpl
widget (without label).drawBrowseMarkersColumn
in interface Theme
column
- The BrowseGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public void drawBrowseNormalColumn(BrowseColumnGuiImpl column, GuiDriver gd, int x, int y, int width, int height)
BrowseColumnGuiImpl
widget (without label).drawBrowseNormalColumn
in interface Theme
column
- The BrowseGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.protected ImageWrapper getBrowseMarkerArrow(boolean selected)
selected
- true
if the row is selected.protected void drawRowToggleImage(GuiDriver gd, BrowseColumnGuiImpl column, int viewportRowIndex, boolean checked)
gd
- The GuiDriver
used for drawing operations.column
- Column which contains the toggle-box.viewportRowIndex
- 0-based index (in the viewport) of the row which contains the toggle-box.checked
- true
if the toggle-box is checked, false
it is not
checked.protected ImageWrapper getRowToggleImage(boolean checked)
checked
- true
if the toggle-box is checked, false
it is not
checked.protected void setBrowseCellBackgroundSelectionColor(GuiDriver gd, ColorRgb unselColor)
gd
GuiDriver
.gd
- The GuiDriver
to set the color for separators.unselColor
- The color for unselected cells. If null
then the unselected cells'
background is not drawn.public ColorRgb getBrowseCellSeparatorColor(BrowseGuiImpl browse)
getBrowseCellSeparatorColor
in interface Theme
browse
- The browse widget.public ColorRgb getBrowseCellForegroundColor(BrowseColumnGuiImpl column, boolean label, boolean selected, int viewportRowIndex)
getBrowseCellForegroundColor
in interface Theme
column
- The parent BrowseColumnGuiImpl
of the cell.label
- true
for label cell, false
for normal cell.selected
- true
if the row is selected.viewportRowIndex
- 0-based number of the target row in the viewport (for cells only). -1
for general cell foreground color.public ColorRgb getColumnBackgroundColor(BrowseColumnGuiImpl column)
getColumnBackgroundColor
in interface Theme
column
- The browse column.public ColorRgb getColumnLabelBackgroundColor(BrowseColumnGuiImpl column)
getColumnLabelBackgroundColor
in interface Theme
column
- The browse column.protected void drawBrowseColumnLabelRect(BrowseColumnGuiImpl column, GuiDriver gd, int topOffset, boolean markersBody, boolean markersLabel, boolean selectedRow)
column
- The BrowseGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.topOffset
- Top offset, in pixels.markersBody
- true
if it is a cell in the markers column.markersLabel
- true
if it is the label area in the markers column.selectedRow
- Is the current row selected ?protected void drawBrowseCell(BrowseColumnGuiImpl column, GuiDriver gd, int viewportIndex, java.lang.String text)
column
- The BrowseGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.viewportIndex
- 0-based viewport index of the row the cell belongs to.text
- Cell text.protected void drawBrowseCellText(BrowseColumnGuiImpl column, GuiDriver gd, boolean label, boolean selectedRow, java.lang.String text, NativeRectangle clipRectangle, int lineNumber, int viewportRowIndex)
column
- The BrowseGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.label
- true
to draw the text inside a label. false
to draw the
text inside a cell.selectedRow
- true
if the row the cell belongs to is selected.text
- ext to draw.clipRectangle
- Clipping rectangle.lineNumber
- 0-based number of line in the label/cell.viewportRowIndex
- 0-based number of the target row in the viewport (for cells only).protected void drawBrowseCellLabel(BrowseColumnGuiImpl column, GuiDriver gd, java.lang.String text, int x, int y)
column
- The BrowseColumnGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.text
- Text to draw.x
- Starting X coord of the text.y
- Starting Y coord of the text.public void drawToolTip(GuiDriver gd, int x, int y, int width, int height, FontDetails fnt, java.lang.String text)
ToolTip
.drawToolTip
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.fnt
- The FontDetails
to be used when drawing the text.text
- The actual text to be drawn.public void drawFrameTitle(FrameGuiImpl frame, GuiDriver gd, GuiColorResolver gc, GuiFontResolver gf, int x, int y, int width, int height)
BrowseGuiImpl
widget.drawFrameTitle
in interface Theme
frame
- The FrameGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.gf
- The GuiFontResolver
to be used.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public NativePoint getRowToggleOffset(BrowseColumnGuiImpl column, boolean editor)
getRowToggleOffset
in interface Theme
column
- The column that contains the toggle-box.editor
- true
if the toggle-box is contained in the current cell, i.e. it is the
editor. false
for all other inactive toggle boxes.public NativeDimension getRowToggleSize(BrowseColumnGuiImpl column, boolean editor)
getRowToggleSize
in interface Theme
column
- The column that contains the toggle-box.editor
- true
if the toggle-box is contained in the current cell, i.e. it is the
editor. false
for all other inactive toggle boxes.public void drawLineBorder(LineBorderGuiImpl border, GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height)
LineBorderGuiImpl
widget.drawLineBorder
in interface Theme
border
- The FrameGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public void drawRectangle(RectangleGuiImpl rect, GuiDriver gd, GuiColorResolver gc, int x, int y, int width, int height)
RectangleGuiImpl
widget.drawRectangle
in interface Theme
rect
- The RectangleGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public void draw3DBorder(ThreeDBorderGuiImpl border, GuiDriver gd, int x, int y, int width, int height)
ThreeDBorderGuiImpl
widget.draw3DBorder
in interface Theme
border
- The RectangleGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public void drawEditorContent(EditorGuiImpl editor, GuiDriver gd, GuiFontResolver gf, GuiColorResolver gc, int x, int y, int width, int height, NativePoint selStart, NativePoint selEnd, int dx, int dy)
EditorGuiImpl
widget.drawEditorContent
in interface Theme
editor
- The EditorGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gf
- The GuiFontResolver
to be used.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.selStart
- selection start anchor.selEnd
- selection end anchor.dx
- the full horizontal delta (left-side text which is scrolled by caret or by mouse).dy
- offset when scrolling vertically via the scrollbar (the cursor does not move).public void drawEditorCaret(EditorGuiImpl editor, GuiDriver gd, int x1, int y1, int x2, int y2)
drawEditorCaret
in interface Theme
editor
- The EditorGuiImpl
widget whose caret is to be rendered.gd
- The GuiDriver
used for drawing operations.x1
- The left extremity of the caret.y1
- The top extremity of the caret.x2
- The right extremity of the caret.y2
- public void drawSelectionFocus(GuiDriver gd, int x, int y, int width, int height)
drawSelectionFocus
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.public int getBrowseLabelOffsetLeft(boolean rightAligned)
getBrowseLabelOffsetLeft
in interface Theme
rightAligned
- true
if the column is right-aligned. false
if the column
is left-aligned.public int getBrowseLabelOffsetRight()
getBrowseLabelOffsetRight
in interface Theme
public int getBrowseDataOffsetLeft(boolean rightAligned)
getBrowseDataOffsetLeft
in interface Theme
rightAligned
- true
if the column is right-aligned. false
if the column
is left-aligned.public Theme.TextLookAndFeel getTextLookAndFeel(GuiDriver gd, GuiColorResolver gc, boolean enabledTextProperty, boolean verticallyCenteredText)
getTextLookAndFeel
in interface Theme
gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.enabledTextProperty
- The true value defines a request to get the enabled text look and feel, otherwise
the false value defines a request for the look and feel of disabled text.verticallyCenteredText
- The true value defines a request to get the vertically centered text.public Theme.TextLookAndFeel getTextLookAndFeel(GuiColorResolver gcd, GuiColorResolver gce)
getTextLookAndFeel
in interface Theme
gcd
- The gui color resolver used for normal text.gce
- The gui color resolver used for selected text.protected NativePoint getRowToggleOffsetCentered(BrowseColumnGuiImpl column, boolean editor)
column
- The column that contains the toggle-box.editor
- true
if the toggle-box is contained in the current cell, i.e. it is the
editor. false
for all other inactive toggle boxes.protected boolean isBrowseLabelBorderDrawQuirk(BrowseColumnGuiImpl column)
Because in FWD a browse column contains its right separator, not the left, scrollable area has no leftmost border and we emulate the underlying part of the leftmost border by fully drawing rightmost border of the locked area if the scroll position is 0.
column
- Column which is tested if it is the last locked column.true
if the upper part of the column's right separator should NOT be
drawn because of the quirk described above.public void drawFileChooserThumbnailBackground(GuiDriver gd, int x, int y, int width, int height, boolean selected, boolean hover, boolean focus)
drawFileChooserThumbnailBackground
in interface Theme
gd
- The GuiDriver
used for drawing operations.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.width
- The width of the painted widget/component.height
- The height of the painted widget/component.selected
- true
if the thumbnail is currently selected.hover
- true
if the mouse is currently hovering the thumbnail.focus
- true
if the thumbnail has focus.public ColorRgb getFileChooserForegroundColor(GuiDriver gd, boolean focused, boolean selected, boolean hover, boolean filename, boolean infoLabel, boolean infodata)
getFileChooserForegroundColor
in interface Theme
gd
- The GuiDriver
used for drawing operations.focused
- true
if thumbnail is focused.selected
- true
if thumbnail is selected.hover
- true
if mouse hovers the thumbnail.filename
- true
to obtain the color of the filename.infoLabel
- true
to obtain the info label (for details view).infodata
- true
to obtain the info value (for details view).public FontDetails getHyperlinkFont(WidgetId windowId, FontDetails sourceFont)
getHyperlinkFont
in interface Theme
windowId
- ID of the currentWindow.sourceFont
- Regular font.public ColorRgb getHyperlinkColor(boolean selectedRow)
getHyperlinkColor
in interface Theme
selectedRow
- true
if the hyperlink belongs to the selected row.public void drawSliderBackground(SliderGuiImpl slider, GuiDriver gd, GuiColorResolver gc, int x, int y, int w, int h)
SliderGuiImpl
widget.drawSliderBackground
in interface Theme
slider
- The SliderGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.w
- The width of the painted widget/component.h
- The height of the painted widget/component.public void drawSliderTrack(SliderGuiImpl slider, GuiDriver gd, GuiColorResolver gc, int x, int y, int w)
SliderGuiImpl
widget.drawSliderTrack
in interface Theme
slider
- The SliderGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.w
- The width of the painted widget/component.public void drawSliderThumb(SliderGuiImpl slider, GuiDriver gd, GuiColorResolver gc, int x, int y, int w, int h)
SliderGuiImpl
widget.drawSliderThumb
in interface Theme
slider
- The SliderGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the thumb to be painted/component.y
- The vertical location (in pixel units) of the thumb to be painted/component.w
- The width of the thumb.h
- The height of the thumb.public void drawSliderTicMarks(SliderGuiImpl slider, GuiDriver gd, GuiColorResolver gc, int x, int y, int length)
SliderGuiImpl
widget.drawSliderTicMarks
in interface Theme
slider
- The SliderGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.length
- The trackbar length.protected ColorRgb getSliderTicmarkColor(GuiColorResolver gc)
Theme
.gc
- The GuiColorResolver
used color selection.public void drawSliderFrame(SliderGuiImpl slider, GuiDriver gd, GuiColorResolver gc, int x, int y, int w, int h)
SliderGuiImpl
widget.drawSliderFrame
in interface Theme
slider
- The SliderGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.w
- The width of the painted widget/component.h
- The height of the painted widget/component.public void drawSliderValue(SliderGuiImpl slider, GuiDriver gd, GuiColorResolver gc, GuiFontResolver gf, int x, int y, int w, int h)
SliderGuiImpl
widget.drawSliderValue
in interface Theme
slider
- The SliderGuiImpl
widget.gd
- The GuiDriver
used for drawing operations.gf
- The GuiFontResolver
to be used.gc
- The GuiColorResolver
used color selection.x
- The horizontal location (in pixel units) of the widget to be painted/component.y
- The vertical location (in pixel units) of the widget to be painted/component.w
- The width of the painted widget/component.h
- The height of the painted widget/component.