|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.LookAndFeel javax.swing.plaf.basic.BasicLookAndFeel com.alee.laf.WebLookAndFeel
public class WebLookAndFeel
This core class contains methods to install, configure and uninstall WebLookAndFeel.
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 |
---|
public static final java.lang.String PROPERTY_HONOR_USER_BORDER
Boolean.TRUE
on a component, UI delegates should follow the typical Swing behavior of not
overriding a user-defined border on it.
public static final java.lang.String PROPERTY_HONOR_USER_BORDERS
true
, UI delegates should follow the typical Swing behavior of not overriding a
user-defined border if one is installed on components.
public static final java.lang.String LOOK_AND_FEEL_PROPERTY
public static final java.lang.String ORIENTATION_PROPERTY
public static final java.lang.String MARGIN_PROPERTY
public static final java.lang.String ENABLED_PROPERTY
public static final java.lang.String MODEL_PROPERTY
public static final java.lang.String TOOLBAR_FLOATABLE_PROPERTY
public static final java.lang.String WINDOW_DECORATION_STYLE_PROPERTY
public static final java.lang.String WINDOW_RESIZABLE_PROPERTY
public static final java.lang.String WINDOW_ICON_PROPERTY
public static final java.lang.String WINDOW_TITLE_PROPERTY
public static final java.lang.String VISIBLE_PROPERTY
public static final java.lang.String DOCUMENT_PROPERTY
public static final java.lang.String OPAQUE_PROPERTY
public static final java.lang.String PAINTER_PROPERTY
public static final java.lang.String RENDERER_PROPERTY
public static final java.lang.String DROP_LOCATION
public static final AltProcessor altProcessor
public static java.lang.String labelUI
public static java.lang.String verticalLabelUI
public static java.lang.String multiLineLabelUI
public static java.lang.String toolTipUI
public static java.lang.String buttonUI
public static java.lang.String splitButtonUI
public static java.lang.String toggleButtonUI
public static java.lang.String checkBoxUI
public static java.lang.String tristateCheckBoxUI
public static java.lang.String radioButtonUI
public static java.lang.String menuBarUI
public static java.lang.String menuUI
public static java.lang.String popupMenuUI
public static java.lang.String menuItemUI
public static java.lang.String checkBoxMenuItemUI
public static java.lang.String radioButtonMenuItemUI
public static java.lang.String popupMenuSeparatorUI
public static java.lang.String separatorUI
public static java.lang.String scrollBarUI
public static java.lang.String scrollPaneUI
public static java.lang.String viewportUI
public static java.lang.String textFieldUI
public static java.lang.String passwordFieldUI
public static java.lang.String formattedTextFieldUI
public static java.lang.String textAreaUI
public static java.lang.String editorPaneUI
public static java.lang.String textPaneUI
public static java.lang.String toolBarUI
public static java.lang.String toolBarSeparatorUI
public static java.lang.String tableUI
public static java.lang.String tableHeaderUI
public static java.lang.String colorChooserUI
public static java.lang.String fileChooserUI
public static java.lang.String panelUI
public static java.lang.String rootPaneUI
public static java.lang.String tabbedPaneUI
public static java.lang.String splitPaneUI
public static java.lang.String progressBarUI
public static java.lang.String sliderUI
public static java.lang.String spinnerUI
public static java.lang.String treeUI
public static java.lang.String listUI
public static java.lang.String comboBoxUI
public static java.lang.String desktopPaneUI
public static java.lang.String desktopIconUI
public static java.lang.String internalFrameUI
public static java.lang.String optionPaneUI
public static java.awt.Font globalControlFont
public static java.awt.Font buttonFont
public static java.awt.Font toggleButtonFont
public static java.awt.Font radioButtonFont
public static java.awt.Font checkBoxFont
public static java.awt.Font colorChooserFont
public static java.awt.Font labelFont
public static java.awt.Font listFont
public static java.awt.Font panelFont
public static java.awt.Font progressBarFont
public static java.awt.Font scrollPaneFont
public static java.awt.Font viewportFont
public static java.awt.Font sliderFont
public static java.awt.Font tabbedPaneFont
public static java.awt.Font tableFont
public static java.awt.Font tableHeaderFont
public static java.awt.Font titledBorderFont
public static java.awt.Font toolBarFont
public static java.awt.Font treeFont
public static java.awt.Font globalTooltipFont
public static java.awt.Font toolTipFont
public static java.awt.Font globalAlertFont
public static java.awt.Font optionPaneFont
public static java.awt.Font globalMenuFont
public static java.awt.Font menuBarFont
public static java.awt.Font menuFont
public static java.awt.Font menuItemFont
public static java.awt.Font radioButtonMenuItemFont
public static java.awt.Font checkBoxMenuItemFont
public static java.awt.Font popupMenuFont
public static java.awt.Font globalAcceleratorFont
public static java.awt.Font menuItemAcceleratorFont
public static java.awt.Font radioButtonMenuItemAcceleratorFont
public static java.awt.Font checkBoxMenuItemAcceleratorFont
public static java.awt.Font menuAcceleratorFont
public static java.awt.Font globalTitleFont
public static java.awt.Font internalFrameFont
public static java.awt.Font globalTextFont
public static java.awt.Font comboBoxFont
public static java.awt.Font spinnerFont
public static java.awt.Font textFieldFont
public static java.awt.Font formattedTextFieldFont
public static java.awt.Font passwordFieldFont
public static java.awt.Font textAreaFont
public static java.awt.Font textPaneFont
public static java.awt.Font editorPaneFont
Constructor Detail |
---|
public WebLookAndFeel()
Method Detail |
---|
public java.lang.String getName()
getName
in class javax.swing.LookAndFeel
public java.lang.String getID()
getID
in class javax.swing.LookAndFeel
public java.lang.String getDescription()
getDescription
in class javax.swing.LookAndFeel
public boolean isNativeLookAndFeel()
isNativeLookAndFeel
in class javax.swing.LookAndFeel
public boolean isSupportedLookAndFeel()
isSupportedLookAndFeel
in class javax.swing.LookAndFeel
public boolean getSupportsWindowDecorations()
getSupportsWindowDecorations
in class javax.swing.LookAndFeel
protected void initClassDefaults(javax.swing.UIDefaults table)
initClassDefaults
in class javax.swing.plaf.basic.BasicLookAndFeel
table
- UIDefaults tableprotected void initSystemColorDefaults(javax.swing.UIDefaults table)
UIDefaults
that are not used by WebLookAndFeel directly, but will help custom
components that assume BasicLookAndFeel conventions.
initSystemColorDefaults
in class javax.swing.plaf.basic.BasicLookAndFeel
table
- UIDefaults tableprotected void initComponentDefaults(javax.swing.UIDefaults table)
initComponentDefaults
in class javax.swing.plaf.basic.BasicLookAndFeel
table
- UI defaults tableprotected static void initializeFont(javax.swing.UIDefaults table, java.lang.String key, java.awt.Font font, java.awt.Font globalFont)
table
- UIDefaults tablekey
- component font keyfont
- custom fontglobalFont
- global fontprotected static SwingLazyValue createLazyFont(java.awt.Font font)
font
- font
public void initialize()
initialize
in class javax.swing.plaf.basic.BasicLookAndFeel
public void uninitialize()
uninitialize
in class javax.swing.plaf.basic.BasicLookAndFeel
public static void setMnemonicHidden(boolean hide)
hide
- whether hide button mnemonics or notpublic static boolean isMnemonicHidden()
public static boolean install()
public static boolean install(boolean updateExistingComponents)
updateExistingComponents
- whether update all existing components or not
public static boolean isInstalled()
public static void initializeManagers()
public static java.util.List<java.awt.Image> getImages()
public static java.util.List<javax.swing.ImageIcon> getIcons()
public static java.awt.Image getImage(int size)
size
- square WebLookAndFeel image size
public static javax.swing.ImageIcon getIcon(int size)
size
- square WebLookAndFeel icon size
protected static void loadIcons()
public javax.swing.Icon getDisabledIcon(javax.swing.JComponent component, javax.swing.Icon icon)
getDisabledIcon
in class javax.swing.LookAndFeel
component
- component that requests disabled iconicon
- normal icon
public static void updateAllComponentUIs()
public javax.swing.LayoutStyle getLayoutStyle()
getLayoutStyle
in class javax.swing.LookAndFeel
public static boolean isDecorateFrames()
public static void setDecorateFrames(boolean decorateFrames)
decorateFrames
- whether look and feel should use custom decoration for newly created frames or notpublic static boolean isDecorateDialogs()
public static void setDecorateDialogs(boolean decorateDialogs)
decorateDialogs
- whether look and feel should use custom decoration for newly created dialogs or notpublic static boolean isAllowLinuxTransparency()
public static void setAllowLinuxTransparency(boolean allow)
allow
- whether per-pixel transparent windows usage is allowed on Linux systems or notpublic static int getScrollMode()
public static void setScrollMode(int scrollMode)
scrollMode
- new default scroll modepublic static void setDecorateAllWindows(boolean decorateAllWindows)
decorateAllWindows
- whether look and feel should use custom decoration for newly created frames and dialogs or notpublic static boolean isLeftToRight()
public static java.awt.ComponentOrientation getOrientation()
public static java.awt.ComponentOrientation getOppositeOrientation()
public static void setOrientation(boolean leftToRight)
leftToRight
- whether should set LTR orientation or RTL onepublic static void setOrientation(java.awt.ComponentOrientation orientation)
orientation
- new global component orientationpublic static void changeOrientation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |