org.tentackle.plaf.tsubstance
Class TSubstanceLookAndFeel

java.lang.Object
  extended by javax.swing.LookAndFeel
      extended by javax.swing.plaf.basic.BasicLookAndFeel
          extended by org.jvnet.substance.SubstanceLookAndFeel
              extended by org.jvnet.substance.skin.SubstanceModerateLookAndFeel
                  extended by org.tentackle.plaf.tsubstance.TSubstanceLookAndFeel
All Implemented Interfaces:
Serializable, TentackleLookAndFeel

public class TSubstanceLookAndFeel
extends org.jvnet.substance.skin.SubstanceModerateLookAndFeel
implements TentackleLookAndFeel

Author:
harald
See Also:
Serialized Form

Field Summary
protected static MetalTheme currentTheme
           
 
Fields inherited from class org.jvnet.substance.SubstanceLookAndFeel
BACKGROUND_COMPOSITE, backgroundComposites, BORDER_ANIMATION_KIND, BORDER_PAINTER_PROPERTY, borderPainterChangeListeners, borderPainterPlugins, BUTTON_NO_MIN_SIZE_PROPERTY, BUTTON_OPEN_SIDE_PROPERTY, BUTTON_PAINT_NEVER_PROPERTY, BUTTON_SHAPER_PROPERTY, BUTTON_SIDE_PROPERTY, buttonShaperChangeListeners, COLORIZATION_FACTOR, COMBO_BOX_POPUP_FLYOUT_ORIENTATION, COMBO_POPUP_PROTOTYPE, componentPlugins, CONFIG_FILE, CORNER_RADIUS, currentKeyboardFocusManager, DEBUG_UI_MODE, ENABLE_INVERTED_THEMES, ENABLE_NEGATED_THEMES, FLAT_PROPERTY, FOCUS_KIND, focusOwnerChangeListener, GRADIENT_PAINTER_PROPERTY, gradientPainterChangeListeners, GRIP_PAINTER, HEAP_STATUS_PANEL, ignoreAnimationsSet, isDebugUiMode, localeChangeListeners, MENU_GUTTER_FILL_KIND, mixedThemes, NO_EXTRA_ELEMENTS, OVERLAY_PROPERTY, PAINT_ACTIVE_PROPERTY, painterPlugins, paramReader, PASSWORD_ECHO_PER_CHAR, PLUGIN_XML, SCROLL_PANE_BUTTONS_POLICY, shaperPlugins, skinChangeListeners, skinPlugins, SUBSTANCE_FONT_POLICY_KEY, TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION, TABBED_PANE_CLOSE_BUTTONS_PROPERTY, TABBED_PANE_CLOSE_CALLBACK, TABBED_PANE_CONTENT_BORDER_KIND, TABBED_PANE_TEXT_ALIGNMENT_KIND, TABBED_PANE_VERTICAL_ORIENTATION, TABBED_PANE_VERTICAL_ORIENTATION_ROTATE_ICONS, THEME_PROPERTY, themeChangeListeners, themePlugins, TITLE_PAINTER_PROPERTY, titlePainterPlugins, toBleedWatermark, toEnableInvertedThemes, toEnableNegatedThemes, toShowExtraElements, toUseConstantThemesOnDialogs, TRACE_FILE, TREE_DECORATIONS_ANIMATION_KIND, TREE_SMART_SCROLL_ANIMATION_KIND, USE_THEMED_DEFAULT_ICONS, WATERMARK_IGNORE, WATERMARK_IMAGE_KIND, WATERMARK_IMAGE_OPACITY, WATERMARK_IMAGE_PROPERTY, WATERMARK_PROPERTY, WATERMARK_TO_BLEED, watermarkChangeListeners, watermarkPlugins, WINDOW_MODIFIED
 
Constructor Summary
TSubstanceLookAndFeel()
           
 
Method Summary
 void configureTSubstanceLookAndFeel()
           
 String getDescription()
          Return a one line description of this look and feel implementation, e.g.
 String getID()
          Return a string that identifies this look and feel.
 String getName()
          Return a short string that identifies this look and feel, e.g.
static String getTSubstanceDescription()
           
static String getTSubstanceName()
           
protected  void initClassDefaults(UIDefaults table)
          overridden to install special TSubstance UI
 boolean isFocusAnimated()
          Retrievs the current setting for the focus animation.
 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.
 ImageIcon loadImageIcon(String name)
          Implements TentackleLookAndFeel.
static void setCurrentTheme(MetalTheme theme)
          Sets the current color theme.
 void setFocusAnimated(boolean flag)
          Configures the animated keyboard focus for non-text components that can grab the keyboard focus, such as comboboxes, radio buttons or check boxes.
 void uninitialize()
          UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel.
 
Methods inherited from class org.jvnet.substance.skin.SubstanceModerateLookAndFeel
initialize
 
Methods inherited from class org.jvnet.substance.SubstanceLookAndFeel
__org__jvnet__substance__SubstanceLookAndFeel__initClassDefaults, addMixedTheme, addMixedTheme, addMixedThemeBy, getActiveColorScheme, getAllBorderPainters, getAllButtonShapers, getAllGradientPainters, getAllSkins, getAllTabCloseListeners, getAllTabCloseListeners, getAllThemes, getAllWatermarks, getBackgroundComposite, getCurrentBorderPainter, getCurrentBorderPainterName, getCurrentButtonShaper, getCurrentButtonShaperName, getCurrentDecorationPainter, getCurrentGradientPainter, getCurrentGradientPainterName, getCurrentHighlightPainter, getCurrentTextPainter, getCurrentThemeName, getCurrentWatermark, getCurrentWatermarkName, getDefaultColorScheme, getDefaults, getDisabledColorScheme, getFontPolicy, getImageWatermarkKind, getImageWatermarkOpacity, getLabelBundle, getLabelBundle, getLocaleListeners, getParamReader, getPlugins, getSupportsWindowDecorations, getTheme, getTitlePaneComponent, hasMixedThemes, hideMenuSearchPanels, ignoreAnimationsOnClass, ignoreAnimationsOnClass, initComponentDefaults, isDebugUiMode, isToUseConstantThemesOnDialogs, permanentlyHideHeapStatusPanel, permanentlyShowHeapStatusPanel, registerBorderPainterChangeListener, registerButtonShaperChangeListener, registerGradientPainterChangeListener, registerLocaleChangeListener, registerSkinChangeListener, registerTabCloseChangeListener, registerTabCloseChangeListener, registerThemeChangeListener, registerWatermarkChangeListener, removeMixedTheme, removeMixedThemeBy, resetLabelBundle, setBackgroundComposite, setCurrentBorderPainter, setCurrentBorderPainter, setCurrentButtonShaper, setCurrentButtonShaper, setCurrentDecorationPainter, setCurrentGradientPainter, setCurrentGradientPainter, setCurrentHighlightPainter, setCurrentTextPainter, setCurrentTheme, setCurrentTheme, setCurrentTheme, setCurrentWatermark, setCurrentWatermark, setDecorationType, setFontPolicy, setImageWatermarkKind, setImageWatermarkOpacity, setLabelBundleClassLoader, setSkin, setSkin, setToUseConstantThemesOnDialogs, showMenuSearchPanels, stopThreads, toBleedWatermark, toEnableInvertedThemes, toEnableNegatedThemes, toIgnoreAnimation, toShowExtraElements, unregisterBorderPainterChangeListener, unregisterButtonShaperChangeListener, unregisterGradientPainterChangeListener, unregisterLocaleChangeListener, unregisterSkinChangeListener, unregisterTabCloseChangeListener, unregisterTabCloseChangeListener, unregisterThemeChangeListener, unregisterWatermarkChangeListener
 
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initSystemColorDefaults, loadSystemColors, playSound
 
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

currentTheme

protected static MetalTheme currentTheme
Constructor Detail

TSubstanceLookAndFeel

public TSubstanceLookAndFeel()
Method Detail

configureTSubstanceLookAndFeel

public void configureTSubstanceLookAndFeel()

getTSubstanceName

public static String getTSubstanceName()

getTSubstanceDescription

public static String getTSubstanceDescription()

getName

public String getName()
Description copied from class: javax.swing.LookAndFeel
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.

Overrides:
getName in class org.jvnet.substance.skin.SubstanceModerateLookAndFeel
Returns:
short identifier for the look and feel

getDescription

public String getDescription()
Description copied from class: javax.swing.LookAndFeel
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.

Overrides:
getDescription in class org.jvnet.substance.SubstanceLookAndFeel
Returns:
short description for the look and feel

getID

public String getID()
Description copied from class: javax.swing.LookAndFeel
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.

Overrides:
getID in class org.jvnet.substance.skin.SubstanceModerateLookAndFeel
Returns:
identifier for the look and feel

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
Description copied from class: javax.swing.LookAndFeel
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true. For example, when the underlying platform is Solaris running CDE a CDE/Motif look and feel implementation would return true.

Overrides:
isNativeLookAndFeel in class org.jvnet.substance.SubstanceLookAndFeel
Returns:
true if this look and feel represents the underlying platform look and feel

isSupportedLookAndFeel

public boolean isSupportedLookAndFeel()
Description copied from class: javax.swing.LookAndFeel
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.

Overrides:
isSupportedLookAndFeel in class org.jvnet.substance.SubstanceLookAndFeel
Returns:
true if this is a supported look and feel
See Also:
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

setCurrentTheme

public static void setCurrentTheme(MetalTheme theme)
Sets the current color theme.


uninitialize

public void uninitialize()
UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel. Subclasses may choose to free up some resources here.

Overrides:
uninitialize in class org.jvnet.substance.SubstanceLookAndFeel
See Also:
LookAndFeel.initialize(), UIManager.setLookAndFeel(javax.swing.LookAndFeel)

initClassDefaults

protected void initClassDefaults(UIDefaults table)
overridden to install special TSubstance UI

Overrides:
initClassDefaults in class org.jvnet.substance.SubstanceLookAndFeel
Parameters:
table - the UIDefaults instance the entries are added to
See Also:
LookAndFeel, BasicLookAndFeel.getDefaults()

loadImageIcon

public ImageIcon loadImageIcon(String name)
                        throws MissingResourceException
Implements TentackleLookAndFeel.

Specified by:
loadImageIcon in interface TentackleLookAndFeel
Parameters:
name - the icon's name (without extension like gif or png!)
Returns:
the loaded image icon
Throws:
MissingResourceException - if no such icon

setFocusAnimated

public void setFocusAnimated(boolean flag)
Configures the animated keyboard focus for non-text components that can grab the keyboard focus, such as comboboxes, radio buttons or check boxes. By default, the animation is enabled. For the substance plaf we simply enable/disable the focus loop.

Specified by:
setFocusAnimated in interface TentackleLookAndFeel
Parameters:
flag - the boolean value which is true to enable the animation, false to turn it off

isFocusAnimated

public boolean isFocusAnimated()
Retrievs the current setting for the focus animation.

Specified by:
isFocusAnimated in interface TentackleLookAndFeel
Returns:
true if focus is animated


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de