cz.vity.freerapid.swing
Class LookAndFeels

java.lang.Object
  extended by cz.vity.freerapid.swing.LookAndFeels

public final class LookAndFeels
extends Object

Nacita definovany look&feel

Author:
Vity

Method Summary
 List<LaF> getAvailableLookAndFeels()
          Vraci seznam vsech dostupnych lookfeelu v aplikaci - parsovani lookandfeels.properties
static LookAndFeels getInstance()
          Vraci instanci tridy LookAndFeel (singleton)
 LaF getSelectedLaF()
          Vraci aktualne vybrany lookandfeel
 boolean loadLookAndFeel(LaF laf, boolean updateTree)
          Provadi vlastni nacitani lookandfeelu v aplikace (pro zobrazeni)
 void loadLookAndFeelSettings()
          Z uzivatelskych nastaveni nacte aktualne zvoleny lookandfeel a nacte ho do aplikace jako aktualni
 void storeSelectedLaF(LaF laf)
          Uklada do uzivatelskych properties aktualne zvoleny lookandfeel
static void updateComponentTreeUI(Component c)
          A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel.
static void updateWindowUI(Window window)
          Method to attempt a dynamic update for all components of the given Window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LookAndFeels getInstance()
Vraci instanci tridy LookAndFeel (singleton)

Returns:
Instance tridy LookAndFeel

getAvailableLookAndFeels

public final List<LaF> getAvailableLookAndFeels()
Vraci seznam vsech dostupnych lookfeelu v aplikaci - parsovani lookandfeels.properties

Returns:
seznam

getSelectedLaF

public final LaF getSelectedLaF()
Vraci aktualne vybrany lookandfeel

Returns:
zvoleny lookandfeel

storeSelectedLaF

public final void storeSelectedLaF(LaF laf)
Uklada do uzivatelskych properties aktualne zvoleny lookandfeel

Parameters:
laf -

loadLookAndFeelSettings

public final void loadLookAndFeelSettings()
Z uzivatelskych nastaveni nacte aktualne zvoleny lookandfeel a nacte ho do aplikace jako aktualni


loadLookAndFeel

public final boolean loadLookAndFeel(LaF laf,
                                     boolean updateTree)
Provadi vlastni nacitani lookandfeelu v aplikace (pro zobrazeni)

Parameters:
laf - definice lookandfeelu
updateTree - true - updatne komponentovy strom
Returns:
vraci true, pokud nacteni probehlo v poradku, jinak false

updateWindowUI

public static void updateWindowUI(Window window)
Method to attempt a dynamic update for all components of the given Window.

Parameters:
window - The Window for which the look and feel update has to be performed against.

updateComponentTreeUI

public static void updateComponentTreeUI(Component c)
A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel.

Based on the Sun SwingUtilities.updateComponentTreeUI, but ensures that the update happens on the components of a JToolbar before the JToolbar itself.