com.alee.laf
Class WebLookAndFeel

java.lang.Object
  extended by javax.swing.LookAndFeel
      extended by javax.swing.plaf.basic.BasicLookAndFeel
          extended by com.alee.laf.WebLookAndFeel
All Implemented Interfaces:
java.io.Serializable

public class WebLookAndFeel
extends javax.swing.plaf.basic.BasicLookAndFeel

This core class contains methods to install, configure and uninstall WebLookAndFeel.

Author:
Mikle Garin
See Also:
How to use WebLaF, How to build WebLaF from sources, Serialized Form

Field Summary
static AltProcessor altProcessor
          Alt hotkey processor for application windows with menu.
static java.awt.Font buttonFont
           
static java.lang.String buttonUI
          Button-related components.
static java.awt.Font checkBoxFont
           
static java.awt.Font checkBoxMenuItemAcceleratorFont
           
static java.awt.Font checkBoxMenuItemFont
           
static java.lang.String checkBoxMenuItemUI
           
static java.lang.String checkBoxUI
           
static java.awt.Font colorChooserFont
           
static java.lang.String colorChooserUI
          Chooser components.
static java.awt.Font comboBoxFont
           
static java.lang.String comboBoxUI
           
static java.lang.String desktopIconUI
           
static java.lang.String desktopPaneUI
          Desktop-pane-related components.
static java.lang.String DOCUMENT_PROPERTY
           
static java.lang.String DROP_LOCATION
           
static java.awt.Font editorPaneFont
           
static java.lang.String editorPaneUI
           
static java.lang.String ENABLED_PROPERTY
           
static java.lang.String fileChooserUI
           
static java.awt.Font formattedTextFieldFont
           
static java.lang.String formattedTextFieldUI
           
static java.awt.Font globalAcceleratorFont
           
static java.awt.Font globalAlertFont
           
static java.awt.Font globalControlFont
          Reassignable LookAndFeel fonts.
static java.awt.Font globalMenuFont
           
static java.awt.Font globalTextFont
           
static java.awt.Font globalTitleFont
           
static java.awt.Font globalTooltipFont
           
static java.awt.Font internalFrameFont
           
static java.lang.String internalFrameUI
           
static java.awt.Font labelFont
           
static java.lang.String labelUI
          Label-related components.
static java.awt.Font listFont
           
static java.lang.String listUI
           
static java.lang.String LOOK_AND_FEEL_PROPERTY
          Some known UI constants.
static java.lang.String MARGIN_PROPERTY
           
static java.awt.Font menuAcceleratorFont
           
static java.awt.Font menuBarFont
           
static java.lang.String menuBarUI
          Menu-related components.
static java.awt.Font menuFont
           
static java.awt.Font menuItemAcceleratorFont
           
static java.awt.Font menuItemFont
           
static java.lang.String menuItemUI
           
static java.lang.String menuUI
           
static java.lang.String MODEL_PROPERTY
           
static java.lang.String multiLineLabelUI
           
static java.lang.String OPAQUE_PROPERTY
           
static java.awt.Font optionPaneFont
           
static java.lang.String optionPaneUI
          Option pane component.
static java.lang.String ORIENTATION_PROPERTY
           
static java.lang.String PAINTER_PROPERTY
           
static java.awt.Font panelFont
           
static java.lang.String panelUI
          Container-related components.
static java.awt.Font passwordFieldFont
           
static java.lang.String passwordFieldUI
           
static java.awt.Font popupMenuFont
           
static java.lang.String popupMenuSeparatorUI
           
static java.lang.String popupMenuUI
           
static java.awt.Font progressBarFont
           
static java.lang.String progressBarUI
          Other data-related components.
static java.lang.String PROPERTY_HONOR_USER_BORDER
          If this client property is set to Boolean.TRUE on a component, UI delegates should follow the typical Swing behavior of not overriding a user-defined border on it.
static java.lang.String PROPERTY_HONOR_USER_BORDERS
          If this system property is set to true, UI delegates should follow the typical Swing behavior of not overriding a user-defined border if one is installed on components.
static java.awt.Font radioButtonFont
           
static java.awt.Font radioButtonMenuItemAcceleratorFont
           
static java.awt.Font radioButtonMenuItemFont
           
static java.lang.String radioButtonMenuItemUI
           
static java.lang.String radioButtonUI
           
static java.lang.String RENDERER_PROPERTY
           
static java.lang.String rootPaneUI
           
static java.lang.String scrollBarUI
          Scroll-related components.
static java.awt.Font scrollPaneFont
           
static java.lang.String scrollPaneUI
           
static java.lang.String separatorUI
          Separator component.
static java.awt.Font sliderFont
           
static java.lang.String sliderUI
           
static java.awt.Font spinnerFont
           
static java.lang.String spinnerUI
           
static java.lang.String splitButtonUI
           
static java.lang.String splitPaneUI
           
static java.awt.Font tabbedPaneFont
           
static java.lang.String tabbedPaneUI
           
static java.awt.Font tableFont
           
static java.awt.Font tableHeaderFont
           
static java.lang.String tableHeaderUI
           
static java.lang.String tableUI
          Table-related components.
static java.awt.Font textAreaFont
           
static java.lang.String textAreaUI
           
static java.awt.Font textFieldFont
           
static java.lang.String textFieldUI
          Text-related components.
static java.awt.Font textPaneFont
           
static java.lang.String textPaneUI
           
static java.awt.Font titledBorderFont
           
static java.awt.Font toggleButtonFont
           
static java.lang.String toggleButtonUI
           
static java.lang.String TOOLBAR_FLOATABLE_PROPERTY
           
static java.awt.Font toolBarFont
           
static java.lang.String toolBarSeparatorUI
           
static java.lang.String toolBarUI
          Toolbar-related components.
static java.awt.Font toolTipFont
           
static java.lang.String toolTipUI
           
static java.awt.Font treeFont
           
static java.lang.String treeUI
           
static java.lang.String tristateCheckBoxUI
           
static java.lang.String verticalLabelUI
           
static java.awt.Font viewportFont
           
static java.lang.String viewportUI
           
static java.lang.String VISIBLE_PROPERTY
           
static java.lang.String WINDOW_DECORATION_STYLE_PROPERTY
           
static java.lang.String WINDOW_ICON_PROPERTY
           
static java.lang.String WINDOW_RESIZABLE_PROPERTY
           
static java.lang.String WINDOW_TITLE_PROPERTY
           
 
Constructor Summary
WebLookAndFeel()
           
 
Method Summary
static void changeOrientation()
          Changes current global component orientation to opposite one.
protected static SwingLazyValue createLazyFont(java.awt.Font font)
          Returns SwingLazyValue for specified font.
 java.lang.String getDescription()
          Returns short WebLookAndFeel description.
 javax.swing.Icon getDisabledIcon(javax.swing.JComponent component, javax.swing.Icon icon)
          Returns a beter disabled icon than BasicLookAndFeel offers.
static javax.swing.ImageIcon getIcon(int size)
          Returns square WebLookAndFeel icon of specified size.
static java.util.List<javax.swing.ImageIcon> getIcons()
          Returns a list of square WebLookAndFeel icons that can be used as window icons on any OS.
 java.lang.String getID()
          Returns unique WebLookAndFeel ID.
static java.awt.Image getImage(int size)
          Returns square WebLookAndFeel image of specified size.
static java.util.List<java.awt.Image> getImages()
          Returns a list of square WebLookAndFeel images that can be used as window icons on any OS.
 javax.swing.LayoutStyle getLayoutStyle()
          Returns custom WebLookAndFeel layout style.
 java.lang.String getName()
          Returns WebLookAndFeel name.
static java.awt.ComponentOrientation getOppositeOrientation()
          Returns orientation opposite to current global component orientation.
static java.awt.ComponentOrientation getOrientation()
          Returns current global component orientation.
static int getScrollMode()
          Returns default scroll mode used by JViewportUI to handle scrolling repaints.
 boolean getSupportsWindowDecorations()
          Returns whether window decorations are supported for undelying system.
protected  void initClassDefaults(javax.swing.UIDefaults table)
          Initializes WebLookAndFeel UI classes.
protected  void initComponentDefaults(javax.swing.UIDefaults table)
          Initializes WebLookAndFeel defaults (like default renderers, component borders and such).
 void initialize()
          Initializes custom WebLookAndFeel features.
protected static void initializeFont(javax.swing.UIDefaults table, java.lang.String key, java.awt.Font font, java.awt.Font globalFont)
          Initializes single component font.
static void initializeManagers()
          Initializes library managers.
protected  void initSystemColorDefaults(javax.swing.UIDefaults table)
          Adds some default colors to the UIDefaults that are not used by WebLookAndFeel directly, but will help custom components that assume BasicLookAndFeel conventions.
static boolean install()
          Installs WebLookAndFeel in one simple call.
static boolean install(boolean updateExistingComponents)
          Installs WebLookAndFeel in one simple call and updates all existing components if requested.
static boolean isAllowLinuxTransparency()
          Returns whether per-pixel transparent windows usage is allowed on Linux systems or not.
static boolean isDecorateDialogs()
          Returns whether look and feel uses custom decoration for newly created dialogs or not.
static boolean isDecorateFrames()
          Returns whether look and feel uses custom decoration for newly created frames or not.
static boolean isInstalled()
          Returns whether WebLookAndFeel is installed or not.
static boolean isLeftToRight()
          Returns whether LTR is current global component orientation or not.
static boolean isMnemonicHidden()
          Returns whether button mnemonics are hidden or not.
 boolean isNativeLookAndFeel()
          Always returns false since WebLookAndFeel is not native for any platform.
 boolean isSupportedLookAndFeel()
          Always returns true since WebLookAndFeel supports any platform which can run Java applications.
protected static void loadIcons()
          Loads square WebLookAndFeel icons listed in icons.xml file in resources folder.
static void setAllowLinuxTransparency(boolean allow)
          Sets whether per-pixel transparent windows usage is allowed on Linux systems or not.
static void setDecorateAllWindows(boolean decorateAllWindows)
          Sets whether look and feel should use custom decoration for newly created frames and dialogs or not.
static void setDecorateDialogs(boolean decorateDialogs)
          Sets whether look and feel should use custom decoration for newly created dialogs or not.
static void setDecorateFrames(boolean decorateFrames)
          Sets whether look and feel should use custom decoration for newly created frames or not.
static void setMnemonicHidden(boolean hide)
          Hides or displays button mnemonics.
static void setOrientation(boolean leftToRight)
          Sets current global component orientation.
static void setOrientation(java.awt.ComponentOrientation orientation)
          Sets current global component orientation.
static void setScrollMode(int scrollMode)
          Sets default scroll mode used by JViewportUI to handle scrolling repaints.
 void uninitialize()
          Uninitializes custom WebLookAndFeel features.
static void updateAllComponentUIs()
          Forces global components UI update in all existing application windows.
 
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, getDefaults, loadSystemColors, playSound
 
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, getDisabledSelectedIcon, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninstallBorder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_HONOR_USER_BORDER

public static final java.lang.String PROPERTY_HONOR_USER_BORDER
If this client property is set to Boolean.TRUE on a component, UI delegates should follow the typical Swing behavior of not overriding a user-defined border on it.

See Also:
Constant Field Values

PROPERTY_HONOR_USER_BORDERS

public static final java.lang.String PROPERTY_HONOR_USER_BORDERS
If this system property is set to true, UI delegates should follow the typical Swing behavior of not overriding a user-defined border if one is installed on components.

See Also:
Constant Field Values

LOOK_AND_FEEL_PROPERTY

public static final java.lang.String LOOK_AND_FEEL_PROPERTY
Some known UI constants.

See Also:
Constant Field Values

ORIENTATION_PROPERTY

public static final java.lang.String ORIENTATION_PROPERTY
See Also:
Constant Field Values

MARGIN_PROPERTY

public static final java.lang.String MARGIN_PROPERTY
See Also:
Constant Field Values

ENABLED_PROPERTY

public static final java.lang.String ENABLED_PROPERTY
See Also:
Constant Field Values

MODEL_PROPERTY

public static final java.lang.String MODEL_PROPERTY
See Also:
Constant Field Values

TOOLBAR_FLOATABLE_PROPERTY

public static final java.lang.String TOOLBAR_FLOATABLE_PROPERTY
See Also:
Constant Field Values

WINDOW_DECORATION_STYLE_PROPERTY

public static final java.lang.String WINDOW_DECORATION_STYLE_PROPERTY
See Also:
Constant Field Values

WINDOW_RESIZABLE_PROPERTY

public static final java.lang.String WINDOW_RESIZABLE_PROPERTY
See Also:
Constant Field Values

WINDOW_ICON_PROPERTY

public static final java.lang.String WINDOW_ICON_PROPERTY
See Also:
Constant Field Values

WINDOW_TITLE_PROPERTY

public static final java.lang.String WINDOW_TITLE_PROPERTY
See Also:
Constant Field Values

VISIBLE_PROPERTY

public static final java.lang.String VISIBLE_PROPERTY
See Also:
Constant Field Values

DOCUMENT_PROPERTY

public static final java.lang.String DOCUMENT_PROPERTY
See Also:
Constant Field Values

OPAQUE_PROPERTY

public static final java.lang.String OPAQUE_PROPERTY
See Also:
Constant Field Values

PAINTER_PROPERTY

public static final java.lang.String PAINTER_PROPERTY
See Also:
Constant Field Values

RENDERER_PROPERTY

public static final java.lang.String RENDERER_PROPERTY
See Also:
Constant Field Values

DROP_LOCATION

public static final java.lang.String DROP_LOCATION
See Also:
Constant Field Values

altProcessor

public static final AltProcessor altProcessor
Alt hotkey processor for application windows with menu.


labelUI

public static java.lang.String labelUI
Label-related components.


verticalLabelUI

public static java.lang.String verticalLabelUI

multiLineLabelUI

public static java.lang.String multiLineLabelUI

toolTipUI

public static java.lang.String toolTipUI

buttonUI

public static java.lang.String buttonUI
Button-related components.


splitButtonUI

public static java.lang.String splitButtonUI

toggleButtonUI

public static java.lang.String toggleButtonUI

checkBoxUI

public static java.lang.String checkBoxUI

tristateCheckBoxUI

public static java.lang.String tristateCheckBoxUI

radioButtonUI

public static java.lang.String radioButtonUI

menuBarUI

public static java.lang.String menuBarUI
Menu-related components.


menuUI

public static java.lang.String menuUI

popupMenuUI

public static java.lang.String popupMenuUI

menuItemUI

public static java.lang.String menuItemUI

checkBoxMenuItemUI

public static java.lang.String checkBoxMenuItemUI

radioButtonMenuItemUI

public static java.lang.String radioButtonMenuItemUI

popupMenuSeparatorUI

public static java.lang.String popupMenuSeparatorUI

separatorUI

public static java.lang.String separatorUI
Separator component.


scrollBarUI

public static java.lang.String scrollBarUI
Scroll-related components.


scrollPaneUI

public static java.lang.String scrollPaneUI

viewportUI

public static java.lang.String viewportUI

textFieldUI

public static java.lang.String textFieldUI
Text-related components.


passwordFieldUI

public static java.lang.String passwordFieldUI

formattedTextFieldUI

public static java.lang.String formattedTextFieldUI

textAreaUI

public static java.lang.String textAreaUI

editorPaneUI

public static java.lang.String editorPaneUI

textPaneUI

public static java.lang.String textPaneUI

toolBarUI

public static java.lang.String toolBarUI
Toolbar-related components.


toolBarSeparatorUI

public static java.lang.String toolBarSeparatorUI

tableUI

public static java.lang.String tableUI
Table-related components.


tableHeaderUI

public static java.lang.String tableHeaderUI

colorChooserUI

public static java.lang.String colorChooserUI
Chooser components.


fileChooserUI

public static java.lang.String fileChooserUI

panelUI

public static java.lang.String panelUI
Container-related components.


rootPaneUI

public static java.lang.String rootPaneUI

tabbedPaneUI

public static java.lang.String tabbedPaneUI

splitPaneUI

public static java.lang.String splitPaneUI

progressBarUI

public static java.lang.String progressBarUI
Other data-related components.


sliderUI

public static java.lang.String sliderUI

spinnerUI

public static java.lang.String spinnerUI

treeUI

public static java.lang.String treeUI

listUI

public static java.lang.String listUI

comboBoxUI

public static java.lang.String comboBoxUI

desktopPaneUI

public static java.lang.String desktopPaneUI
Desktop-pane-related components.


desktopIconUI

public static java.lang.String desktopIconUI

internalFrameUI

public static java.lang.String internalFrameUI

optionPaneUI

public static java.lang.String optionPaneUI
Option pane component.


globalControlFont

public static java.awt.Font globalControlFont
Reassignable LookAndFeel fonts.


buttonFont

public static java.awt.Font buttonFont

toggleButtonFont

public static java.awt.Font toggleButtonFont

radioButtonFont

public static java.awt.Font radioButtonFont

checkBoxFont

public static java.awt.Font checkBoxFont

colorChooserFont

public static java.awt.Font colorChooserFont

labelFont

public static java.awt.Font labelFont

listFont

public static java.awt.Font listFont

panelFont

public static java.awt.Font panelFont

progressBarFont

public static java.awt.Font progressBarFont

scrollPaneFont

public static java.awt.Font scrollPaneFont

viewportFont

public static java.awt.Font viewportFont

sliderFont

public static java.awt.Font sliderFont

tabbedPaneFont

public static java.awt.Font tabbedPaneFont

tableFont

public static java.awt.Font tableFont

tableHeaderFont

public static java.awt.Font tableHeaderFont

titledBorderFont

public static java.awt.Font titledBorderFont

toolBarFont

public static java.awt.Font toolBarFont

treeFont

public static java.awt.Font treeFont

globalTooltipFont

public static java.awt.Font globalTooltipFont

toolTipFont

public static java.awt.Font toolTipFont

globalAlertFont

public static java.awt.Font globalAlertFont

optionPaneFont

public static java.awt.Font optionPaneFont

globalMenuFont

public static java.awt.Font globalMenuFont

menuBarFont

public static java.awt.Font menuBarFont

menuFont

public static java.awt.Font menuFont

menuItemFont

public static java.awt.Font menuItemFont

radioButtonMenuItemFont

public static java.awt.Font radioButtonMenuItemFont

checkBoxMenuItemFont

public static java.awt.Font checkBoxMenuItemFont

popupMenuFont

public static java.awt.Font popupMenuFont

globalAcceleratorFont

public static java.awt.Font globalAcceleratorFont

menuItemAcceleratorFont

public static java.awt.Font menuItemAcceleratorFont

radioButtonMenuItemAcceleratorFont

public static java.awt.Font radioButtonMenuItemAcceleratorFont

checkBoxMenuItemAcceleratorFont

public static java.awt.Font checkBoxMenuItemAcceleratorFont

menuAcceleratorFont

public static java.awt.Font menuAcceleratorFont

globalTitleFont

public static java.awt.Font globalTitleFont

internalFrameFont

public static java.awt.Font internalFrameFont

globalTextFont

public static java.awt.Font globalTextFont

comboBoxFont

public static java.awt.Font comboBoxFont

spinnerFont

public static java.awt.Font spinnerFont

textFieldFont

public static java.awt.Font textFieldFont

formattedTextFieldFont

public static java.awt.Font formattedTextFieldFont

passwordFieldFont

public static java.awt.Font passwordFieldFont

textAreaFont

public static java.awt.Font textAreaFont

textPaneFont

public static java.awt.Font textPaneFont

editorPaneFont

public static java.awt.Font editorPaneFont
Constructor Detail

WebLookAndFeel

public WebLookAndFeel()
Method Detail

getName

public java.lang.String getName()
Returns WebLookAndFeel name.

Specified by:
getName in class javax.swing.LookAndFeel
Returns:
WebLookAndFeel name

getID

public java.lang.String getID()
Returns unique WebLookAndFeel ID.

Specified by:
getID in class javax.swing.LookAndFeel
Returns:
unique WebLookAndFeel ID

getDescription

public java.lang.String getDescription()
Returns short WebLookAndFeel description.

Specified by:
getDescription in class javax.swing.LookAndFeel
Returns:
short WebLookAndFeel description

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
Always returns false since WebLookAndFeel is not native for any platform.

Specified by:
isNativeLookAndFeel in class javax.swing.LookAndFeel
Returns:
false

isSupportedLookAndFeel

public boolean isSupportedLookAndFeel()
Always returns true since WebLookAndFeel supports any platform which can run Java applications.

Specified by:
isSupportedLookAndFeel in class javax.swing.LookAndFeel
Returns:
true

getSupportsWindowDecorations

public boolean getSupportsWindowDecorations()
Returns whether window decorations are supported for undelying system.

Overrides:
getSupportsWindowDecorations in class javax.swing.LookAndFeel
Returns:
true if window decorations are supported for undelying system, false otherwise

initClassDefaults

protected void initClassDefaults(javax.swing.UIDefaults table)
Initializes WebLookAndFeel UI classes.

Overrides:
initClassDefaults in class javax.swing.plaf.basic.BasicLookAndFeel
Parameters:
table - UIDefaults table

initSystemColorDefaults

protected void initSystemColorDefaults(javax.swing.UIDefaults table)
Adds some default colors to the UIDefaults that are not used by WebLookAndFeel directly, but will help custom components that assume BasicLookAndFeel conventions.

Overrides:
initSystemColorDefaults in class javax.swing.plaf.basic.BasicLookAndFeel
Parameters:
table - UIDefaults table

initComponentDefaults

protected void initComponentDefaults(javax.swing.UIDefaults table)
Initializes WebLookAndFeel defaults (like default renderers, component borders and such). This method will be called only in case WebLookAndFeel is installed through UIManager as current application LookAndFeel.

Overrides:
initComponentDefaults in class javax.swing.plaf.basic.BasicLookAndFeel
Parameters:
table - UI defaults table

initializeFont

protected static void initializeFont(javax.swing.UIDefaults table,
                                     java.lang.String key,
                                     java.awt.Font font,
                                     java.awt.Font globalFont)
Initializes single component font.

Parameters:
table - UIDefaults table
key - component font key
font - custom font
globalFont - global font

createLazyFont

protected static SwingLazyValue createLazyFont(java.awt.Font font)
Returns SwingLazyValue for specified font.

Parameters:
font - font
Returns:
SwingLazyValue for specified font

initialize

public void initialize()
Initializes custom WebLookAndFeel features.

Overrides:
initialize in class javax.swing.plaf.basic.BasicLookAndFeel

uninitialize

public void uninitialize()
Uninitializes custom WebLookAndFeel features.

Overrides:
uninitialize in class javax.swing.plaf.basic.BasicLookAndFeel

setMnemonicHidden

public static void setMnemonicHidden(boolean hide)
Hides or displays button mnemonics.

Parameters:
hide - whether hide button mnemonics or not

isMnemonicHidden

public static boolean isMnemonicHidden()
Returns whether button mnemonics are hidden or not.

Returns:
true if button mnemonics are hidden, false otherwise

install

public static boolean install()
Installs WebLookAndFeel in one simple call.

Returns:
true if WebLookAndFeel was successfuly installed, false otherwise

install

public static boolean install(boolean updateExistingComponents)
Installs WebLookAndFeel in one simple call and updates all existing components if requested.

Parameters:
updateExistingComponents - whether update all existing components or not
Returns:
true if WebLookAndFeel was successfuly installed, false otherwise

isInstalled

public static boolean isInstalled()
Returns whether WebLookAndFeel is installed or not.

Returns:
true if WebLookAndFeel is installed, false otherwise

initializeManagers

public static void initializeManagers()
Initializes library managers. Initialization order is strict since some managers require other managers to be loaded.


getImages

public static java.util.List<java.awt.Image> getImages()
Returns a list of square WebLookAndFeel images that can be used as window icons on any OS.

Returns:
list of square WebLookAndFeel images

getIcons

public static java.util.List<javax.swing.ImageIcon> getIcons()
Returns a list of square WebLookAndFeel icons that can be used as window icons on any OS.

Returns:
list of square WebLookAndFeel icons

getImage

public static java.awt.Image getImage(int size)
Returns square WebLookAndFeel image of specified size.

Parameters:
size - square WebLookAndFeel image size
Returns:
square WebLookAndFeel image

getIcon

public static javax.swing.ImageIcon getIcon(int size)
Returns square WebLookAndFeel icon of specified size.

Parameters:
size - square WebLookAndFeel icon size
Returns:
square WebLookAndFeel icon

loadIcons

protected static void loadIcons()
Loads square WebLookAndFeel icons listed in icons.xml file in resources folder. Loaded icons will have the same order they have in that xml file.


getDisabledIcon

public javax.swing.Icon getDisabledIcon(javax.swing.JComponent component,
                                        javax.swing.Icon icon)
Returns a beter disabled icon than BasicLookAndFeel offers. Generated disabled icons are cached within a weak hash map under icon key.

Overrides:
getDisabledIcon in class javax.swing.LookAndFeel
Parameters:
component - component that requests disabled icon
icon - normal icon
Returns:
disabled icon

updateAllComponentUIs

public static void updateAllComponentUIs()
Forces global components UI update in all existing application windows.


getLayoutStyle

public javax.swing.LayoutStyle getLayoutStyle()
Returns custom WebLookAndFeel layout style.

Overrides:
getLayoutStyle in class javax.swing.LookAndFeel
Returns:
custom WebLookAndFeel layout style

isDecorateFrames

public static boolean isDecorateFrames()
Returns whether look and feel uses custom decoration for newly created frames or not.

Returns:
true if look and feel uses custom decoration for newly created frames, false otherwise

setDecorateFrames

public static void setDecorateFrames(boolean decorateFrames)
Sets whether look and feel should use custom decoration for newly created frames or not.

Parameters:
decorateFrames - whether look and feel should use custom decoration for newly created frames or not

isDecorateDialogs

public static boolean isDecorateDialogs()
Returns whether look and feel uses custom decoration for newly created dialogs or not.

Returns:
true if look and feel uses custom decoration for newly created dialogs, false otherwise

setDecorateDialogs

public static void setDecorateDialogs(boolean decorateDialogs)
Sets whether look and feel should use custom decoration for newly created dialogs or not.

Parameters:
decorateDialogs - whether look and feel should use custom decoration for newly created dialogs or not

isAllowLinuxTransparency

public static boolean isAllowLinuxTransparency()
Returns whether per-pixel transparent windows usage is allowed on Linux systems or not.

Returns:
true if per-pixel transparent windows usage is allowed on Linux systems, false otherwise

setAllowLinuxTransparency

public static void setAllowLinuxTransparency(boolean allow)
Sets whether per-pixel transparent windows usage is allowed on Linux systems or not. This might be an unstable feature so it is disabled by default. Use it at your own risk.

Parameters:
allow - whether per-pixel transparent windows usage is allowed on Linux systems or not

getScrollMode

public static int getScrollMode()
Returns default scroll mode used by JViewportUI to handle scrolling repaints.

Returns:
default scroll mode used by JViewportUI to handle scrolling repaints

setScrollMode

public static void setScrollMode(int scrollMode)
Sets default scroll mode used by JViewportUI to handle scrolling repaints.

Parameters:
scrollMode - new default scroll mode

setDecorateAllWindows

public static void setDecorateAllWindows(boolean decorateAllWindows)
Sets whether look and feel should use custom decoration for newly created frames and dialogs or not.

Parameters:
decorateAllWindows - whether look and feel should use custom decoration for newly created frames and dialogs or not

isLeftToRight

public static boolean isLeftToRight()
Returns whether LTR is current global component orientation or not.

Returns:
true if LTR is current global component orientation, false otherwise

getOrientation

public static java.awt.ComponentOrientation getOrientation()
Returns current global component orientation.

Returns:
current global component orientation

getOppositeOrientation

public static java.awt.ComponentOrientation getOppositeOrientation()
Returns orientation opposite to current global component orientation.

Returns:
orientation opposite to current global component orientation

setOrientation

public static void setOrientation(boolean leftToRight)
Sets current global component orientation.

Parameters:
leftToRight - whether should set LTR orientation or RTL one

setOrientation

public static void setOrientation(java.awt.ComponentOrientation orientation)
Sets current global component orientation.

Parameters:
orientation - new global component orientation

changeOrientation

public static void changeOrientation()
Changes current global component orientation to opposite one.