Class SkinChooser

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SkinChooser extends JPanel
Skin Chooser.
Version:
$Revision: 1.3 $, $Date: 2004/07/18 16:54:48 $
Author:
$Author: l2fprod $
See Also:
  • Constructor Details

    • SkinChooser

      public SkinChooser()
      Construct a new SkinChooser pane.
  • Method Details

    • setSkinLocations

      public void setSkinLocations(String[] directories)
      Set search paths
      Parameters:
      directories - search paths
    • setThemePackMode

      public void setThemePackMode(boolean b)
      Set theme pack mode to true if you want to select a theme pack from the chooser.
      Parameters:
      b - the new value
    • getSkinLocations

      public String[] getSkinLocations()
      Returns:
      search paths
    • getThemePackMode

      public boolean getThemePackMode()
      Returns:
      true if the chooser shows only theme packs
    • getSelectedSkins

      public String[] getSelectedSkins()
      Returns:
      the currently selected skins
    • refreshList

      public void refreshList()
      Refresh the skin list.
      See Also:
    • apply

      public void apply() throws Exception
      Apply current selection.
      The method sets the current skin (SkinLookAndFeel.setSkin) then calls UIManager.setLookAndFeel.
      Throws:
      Exception - Description of Exception
    • buildSkinList

      protected void buildSkinList(Vector v, File directory)
      Recursively traverse directory and add skin files to v .
      Skin files are added if accept(skinFile) returns true
      Parameters:
      v - vector to store skin list
      directory - the directory to list for skin files
    • accept

      protected boolean accept(File f)
      Check if a given file is a skin file.
      Subclasses can override this method to provide better handling of skin files.
      The default implementation checks if the file ends with gtkrc or themerc.
      Parameters:
      f - the file to check
      Returns:
      true if the file is a valid skin file
    • showPreviewWindow

      protected void showPreviewWindow()
      Description of the Method