public class

MotifLookAndFeel

extends BasicLookAndFeel
java.lang.Object
   ↳ javax.swing.LookAndFeel
     ↳ javax.swing.plaf.basic.BasicLookAndFeel
       ↳ com.sun.java.swing.plaf.motif.MotifLookAndFeel

Class Overview

Implements the Motif Look and Feel. UI classes not implemented specifically for Motif will default to those implemented in Basic.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Summary

Public Constructors
MotifLookAndFeel()
Public Methods
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.
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.
Protected Methods
void initClassDefaults(UIDefaults table)
Populates table with mappings from uiClassID to the fully qualified name of the ui class.
void initComponentDefaults(UIDefaults table)
Populates table with the defaults for the basic look and feel.
void initSystemColorDefaults(UIDefaults table)
Load the SystemColors into the defaults table.
[Expand]
Inherited Methods
From class javax.swing.plaf.basic.BasicLookAndFeel
From class javax.swing.LookAndFeel
From class java.lang.Object

Public Constructors

public MotifLookAndFeel ()

Public Methods

public 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.

Returns
  • short description for the look and feel

public 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.

Returns
  • identifier for the look and feel

public 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.

Returns
  • short identifier for the look and feel

public boolean isNativeLookAndFeel ()

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.

Returns
  • true if this look and feel represents the underlying platform look and feel

public 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.

Returns
  • true if this is a supported look and feel

Protected Methods

protected void initClassDefaults (UIDefaults table)

Populates table with mappings from uiClassID to the fully qualified name of the ui class. The value for a particular uiClassID is "javax.swing.plaf.basic.Basic + uiClassID". For example, the value for the uiClassID TreeUI is "javax.swing.plaf.basic.BasicTreeUI".

Parameters
table the UIDefaults instance the entries are added to

protected void initComponentDefaults (UIDefaults table)

Populates table with the defaults for the basic look and feel.

Parameters
table the UIDefaults to add the values to

protected void initSystemColorDefaults (UIDefaults table)

Load the SystemColors into the defaults table. The keys for SystemColor defaults are the same as the names of the public fields in SystemColor. If the table is being created on a native Motif platform we use the SystemColor values, otherwise we create color objects whose values match the default CDE/Motif colors.

Parameters
table the UIDefaults object the values are added to