站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Java(TM) 2 Platform, Standard Edition, v1.2.2 API Specification: Class MultiLookAndFeel - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

JavaTM 2 Platform
Standard Edition

javax.swing.plaf.multi
Class MultiLookAndFeel

java.lang.Object
  |
  +--javax.swing.LookAndFeel
        |
        +--javax.swing.plaf.multi.MultiLookAndFeel

public class MultiLookAndFeel
extends LookAndFeel

A Multiplexing UI Look and Feel that allows more than one UI to be associated with a component at the same time.

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.


Constructor Summary
MultiLookAndFeel()
           
 
Method Summary
static ComponentUI createUIs(ComponentUI mui, Vector uis, JComponent target)
          Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.
 UIDefaults getDefaults()
          This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table.
 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 static ComponentUI[] uisToArray(Vector uis)
          Turn the Vector of UI's into an array.
 
Methods inherited from class javax.swing.LookAndFeel
initialize, installBorder, installColors, installColorsAndFont, makeIcon, makeKeyBindings, toString, uninitialize, uninstallBorder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiLookAndFeel

public MultiLookAndFeel()
Method Detail

getName

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

getID

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

getDescription

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

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
Description copied from class: LookAndFeel
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.
Overrides:
isNativeLookAndFeel in class LookAndFeel

isSupportedLookAndFeel

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

getDefaults

public UIDefaults getDefaults()
Description copied from class: LookAndFeel
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. Other applications, for example an application builder, may also call this method.
Overrides:
getDefaults in class LookAndFeel
Tags copied from class: LookAndFeel
See Also:
LookAndFeel.initialize(), LookAndFeel.uninitialize(), UIManager.setLookAndFeel(javax.swing.LookAndFeel)

createUIs

public static ComponentUI createUIs(ComponentUI mui,
                                    Vector uis,
                                    JComponent target)
Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.
Returns:
the ComponentUI for the component.

uisToArray

protected static ComponentUI[] uisToArray(Vector uis)
Turn the Vector of UI's into an array.

JavaTM 2 Platform
Standard Edition

Submit a bug or feature
Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.