javax.swing.plaf.multi

Class MultiLookAndFeel


public class MultiLookAndFeel
extends LookAndFeel

A look and feel that provides the ability to use auxiliary look and feels in addition to the primary look and feel.

Constructor Summary

MultiLookAndFeel()
Creates a new instance of the look and feel.

Method Summary

static ComponentUI
createUIs(ComponentUI mui, Vector<T> uis, JComponent target)
Creates the UI delegates for the target component and returns a multiplexing UI delegate (mui) if there are multiple delegates.
UIDefaults
getDefaults()
Creates and returns the UI defaults for this look and feel.
String
getDescription()
Returns a description of the look and feel.
String
getID()
Returns an identifier for the look and feel.
String
getName()
Returns the name for the look and feel.
boolean
isNativeLookAndFeel()
Returns false to indicate that this look and feel is not native to any platform.
boolean
isSupportedLookAndFeel()
Returns true always, since this look and feel is supported on all platforms.
protected static ComponentUI[]
uisToArray(Vector<T> uis)
Returns an array containing the same ComponentUI instances as uis.

Methods inherited from class javax.swing.LookAndFeel

getDefaults, getDescription, getDesktopPropertyValue, getID, getName, getSupportsWindowDecorations, initialize, installBorder, installColors, installColorsAndFont, installProperty, isNativeLookAndFeel, isSupportedLookAndFeel, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninitialize, uninstallBorder

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

MultiLookAndFeel

public MultiLookAndFeel()
Creates a new instance of the look and feel.

Method Details

createUIs

public static ComponentUI createUIs(ComponentUI mui,
                                    Vector<T> uis,
                                    JComponent target)
Creates the UI delegates for the target component and returns a multiplexing UI delegate (mui) if there are multiple delegates.
Parameters:
mui - a multiplexing UI delegate appropriate for the component.
uis - a vector into which the UI delegates will be added.
target - the target component.
Returns:
A UI delegate.

getDefaults

public UIDefaults getDefaults()
Creates and returns the UI defaults for this look and feel.
Overrides:
getDefaults in interface LookAndFeel
Returns:
The UI defaults.

getDescription

public String getDescription()
Returns a description of the look and feel.
Overrides:
getDescription in interface LookAndFeel
Returns:
A description of the look and feel.

getID

public String getID()
Returns an identifier for the look and feel.
Overrides:
getID in interface LookAndFeel
Returns:
"Multiplex".

getName

public String getName()
Returns the name for the look and feel.
Overrides:
getName in interface LookAndFeel
Returns:
"Multiplexing Look and Feel".

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
Returns false to indicate that this look and feel is not native to any platform.
Overrides:
isNativeLookAndFeel in interface LookAndFeel
Returns:
false.

isSupportedLookAndFeel

public boolean isSupportedLookAndFeel()
Returns true always, since this look and feel is supported on all platforms.
Overrides:
isSupportedLookAndFeel in interface LookAndFeel
Returns:
true.

uisToArray

protected static ComponentUI[] uisToArray(Vector<T> uis)
Returns an array containing the same ComponentUI instances as uis. If uis is null, a zero-length array is returned.
Parameters:
uis - a list of ComponentUI references (null permitted).
Returns:
An array containing the same ComponentUI instances as uis, or null if uis is empty.

MultiLookAndFeel.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.