com.birosoft.liquid
Class LiquidLookAndFeel

java.lang.Object
  extended by javax.swing.LookAndFeel
      extended by javax.swing.plaf.basic.BasicLookAndFeel
          extended by com.birosoft.liquid.LiquidLookAndFeel
All Implemented Interfaces:
java.io.Serializable

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

The Liquid look and feel. There's a special property to switch the support for rounded windows of internal frames on or off: Use Liquidlookandfeel.roundedWindows = false to turn this support off. It causes slower rendering especially in the case of dragging the internal frame. By default it is tuned on. Another property sets whether the windows look and feel should be used for the file chooser: xplookandfeel.windowslfforfilechooser= true If set to true it'll be used. Currently this leads to a black border around the icons. By default this option is disabled.

See Also:
Serialized Form

Field Summary
protected static boolean defaultRowBackgroundMode
           
protected static javax.swing.UIDefaults uiDefaults
           
 
Constructor Summary
LiquidLookAndFeel()
          This constructor installs the Liquid Look and Feel with the default color theme.
 
Method Summary
protected static boolean areStipplesUsed()
           
static java.awt.Color getBackgroundColor()
           
static java.awt.Color getButtonBackground()
           
static javax.swing.plaf.ColorUIResource getControl()
           
static java.awt.Color getDarkControl()
          used for SliderUI Ticks
 java.lang.String getDescription()
          Return a one line description of this look and feel implementation, e.g.
static java.awt.Color getDesktopColor()
           
 java.lang.String getID()
          Return a string that identifies this look and feel.
static java.awt.Color getLightControl()
           
 java.lang.String getName()
          Return a short string that identifies this look and feel, e.g.
 boolean getSupportsWindowDecorations()
           
static java.awt.Color getWindowBackground()
           
protected static java.awt.Color getWindowTitleInactiveForeground()
           
protected  void initClassDefaults(javax.swing.UIDefaults table)
          Initializes the uiClassID to BasicComponentUI mapping.
protected  void initComponentDefaults(javax.swing.UIDefaults table)
          Initializes the default values for many ui widgets and puts them in the given ui defaults table.
protected  void initSystemColorDefaults(javax.swing.UIDefaults table)
          Initializes the system colors.
 boolean isNativeLookAndFeel()
          If the underlying platform has a "native" look and feel, and this is an implementation of it, return true.
 boolean isSupportedLookAndFeel()
          Return true if the underlying platform supports and or permits this look and feel.
static javax.swing.ImageIcon loadIcon(java.lang.String file, java.lang.Object invoker)
          Loads an image icon.
static javax.swing.ImageIcon loadIconImmediately(java.lang.String file, java.lang.Object invoker)
          Loads an image icon immediately.
static void setDefaultRowBackgroundMode(boolean b)
          This method will be used for setting background mode of gui elements which have rows (tables, lists, combos...).
static void setDefaultTableBackgroundMode(boolean b)
          Deprecated. Table rows are not only gui elements which use different colors for row background.
static void setLiquidDecorations(boolean b)
          This method will be used for setting windows decorations
static void setStipples(boolean b)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, getDefaults, initialize, loadSystemColors, playSound, uninitialize
 
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, getDisabledIcon, getDisabledSelectedIcon, getLayoutStyle, 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

uiDefaults

protected static javax.swing.UIDefaults uiDefaults

defaultRowBackgroundMode

protected static boolean defaultRowBackgroundMode
Constructor Detail

LiquidLookAndFeel

public LiquidLookAndFeel()
This constructor installs the Liquid Look and Feel with the default color theme.

Method Detail

getID

public java.lang.String getID()
Return a string that identifies this look and feel. This string will be used by applications/services that want to recognize well known look and feel implementations. Presently the well known names are "Motif", "Windows", "Mac", "Metal". Note that a LookAndFeel derived from a well known superclass that doesn't make any fundamental changes to the look or feel shouldn't override this method.

Specified by:
getID in class javax.swing.LookAndFeel
Returns:
The Metouia Look and Feel identifier.

getName

public java.lang.String getName()
Return a short string that identifies this look and feel, e.g. "CDE/Motif". This string should be appropriate for a menu item. Distinct look and feels should have different names, e.g. a subclass of MotifLookAndFeel that changes the way a few components are rendered should be called "CDE/Motif My Way"; something that would be useful to a user trying to select a L&F from a list of names.

Specified by:
getName in class javax.swing.LookAndFeel
Returns:
The look and feel short name.

getControl

public static javax.swing.plaf.ColorUIResource getControl()

getDescription

public java.lang.String getDescription()
Return a one line description of this look and feel implementation, e.g. "The CDE/Motif Look and Feel". This string is intended for the user, e.g. in the title of a window or in a ToolTip message.

Specified by:
getDescription in class javax.swing.LookAndFeel
Returns:
The look and feel short description.

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true. For example a CDE/Motif look and implementation would return true when the underlying platform was Solaris.

Specified by:
isNativeLookAndFeel in class javax.swing.LookAndFeel

isSupportedLookAndFeel

public final boolean isSupportedLookAndFeel()
Return true if the underlying platform supports and or permits this look and feel. This method returns false if the look and feel depends on special resources or legal agreements that aren't defined for the current platform.

Specified by:
isSupportedLookAndFeel in class javax.swing.LookAndFeel

getSupportsWindowDecorations

public boolean getSupportsWindowDecorations()
Overrides:
getSupportsWindowDecorations in class javax.swing.LookAndFeel

initClassDefaults

protected void initClassDefaults(javax.swing.UIDefaults table)
Initializes the uiClassID to BasicComponentUI mapping. The JComponent classes define their own uiClassID constants. This table must map those constants to a BasicComponentUI class of the appropriate type.

Overrides:
initClassDefaults in class javax.swing.plaf.basic.BasicLookAndFeel
Parameters:
table - The ui defaults table.

initSystemColorDefaults

protected void initSystemColorDefaults(javax.swing.UIDefaults table)
Initializes the system colors.

Overrides:
initSystemColorDefaults in class javax.swing.plaf.basic.BasicLookAndFeel
Parameters:
table - The ui defaults table.

initComponentDefaults

protected void initComponentDefaults(javax.swing.UIDefaults table)
Initializes the default values for many ui widgets and puts them in the given ui defaults table. Here is the place where borders can be changed.

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

loadIcon

public static javax.swing.ImageIcon loadIcon(java.lang.String file,
                                             java.lang.Object invoker)
Loads an image icon.

Parameters:
file - The image file name.
invoker - The refence of the invoking class, whose classloader will be used for loading the image.

loadIconImmediately

public static javax.swing.ImageIcon loadIconImmediately(java.lang.String file,
                                                        java.lang.Object invoker)
Loads an image icon immediately.

Parameters:
file - The image file name.
invoker - The refence of the invoking class, whose classloader will be used for loading the image.

getLightControl

public static java.awt.Color getLightControl()

getDarkControl

public static java.awt.Color getDarkControl()
used for SliderUI Ticks


getBackgroundColor

public static java.awt.Color getBackgroundColor()

getDesktopColor

public static java.awt.Color getDesktopColor()

getWindowTitleInactiveForeground

protected static java.awt.Color getWindowTitleInactiveForeground()

getWindowBackground

public static java.awt.Color getWindowBackground()

getButtonBackground

public static java.awt.Color getButtonBackground()

setDefaultTableBackgroundMode

public static void setDefaultTableBackgroundMode(boolean b)
Deprecated. Table rows are not only gui elements which use different colors for row background.


setDefaultRowBackgroundMode

public static void setDefaultRowBackgroundMode(boolean b)
This method will be used for setting background mode of gui elements which have rows (tables, lists, combos...).


setLiquidDecorations

public static void setLiquidDecorations(boolean b)
This method will be used for setting windows decorations


areStipplesUsed

protected static boolean areStipplesUsed()

setStipples

public static void setStipples(boolean b)