![JAR search and dependency download from the Maven repository](/logo.png)
it.tidalwave.forceten.lookandfeel.LookAndFeel Maven / Gradle / Ivy
The newest version!
/***********************************************************************************************************************
*
* forceTen - open source geography
* Copyright (C) 2007-2012 by Tidalwave s.a.s. (http://www.tidalwave.it)
*
***********************************************************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
***********************************************************************************************************************
*
* WWW: http://forceten.tidalwave.it
* SCM: https://bitbucket.org/tidalwave/forceten-src
*
**********************************************************************************************************************/
package it.tidalwave.forceten.lookandfeel;
import java.awt.Component;
import javax.swing.JComponent;
import javax.swing.JPanel;
import org.openide.util.Lookup;
/*******************************************************************************
*
* A facility class with methods that contains some useful constants and can
* install UI properties for the blueMarine Look & Feel.
*
* @author Fabrizio Giudici
* @version $Id$
*
******************************************************************************/
public interface LookAndFeel
{
/** The UIManager
key for the Border
to be used with Explorers. */
public static final String BORDER_EXPLORER = "it.tidalwave.openide.explorer.border";
/** The UIManager
key for the Color
to be used for the window borders. */
public static final String COLOR_FRAME_FOREGROUND = "it.tidalwave.forceten.frame.foreground";
/** The UIManager
key for the Color
to be used for the desktop background. */
public static final String COLOR_DESKTOP_BACKGROUND = "it.tidalwave.forceten.desktop.background";
/** The UIManager
key for the Color
to be used for the background of Explorers. */
public static final String COLOR_EXPLORER_BACKGROUND = "it.tidalwave.forceten.explorer.background";
/** The UIManager
key for the Color
to be used for the foreground of Explorers. */
public static final String COLOR_EXPLORER_FOREGROUND = "it.tidalwave.forceten.explorer.foreground";
/** The UIManager
key for the Color
to be used for the foreground of selected items in Explorers. */
public static final String COLOR_EXPLORER_SELECTION_BACKGROUND = "it.tidalwave.forceten.explorer.selectionBackground";
/** The UIManager
key for the Color
to be used for the background of selected items in Explorers. */
public static final String COLOR_EXPLORER_SELECTION_FOREGROUND = "it.tidalwave.forceten.explorer.selectionForeground";
/** The UIManager
key for the Color
to be used for the background of headers. */
public static final String COLOR_HEADER_BACKGROUND = "it.tidalwave.forceten.header.background";
/** The UIManager
key for the Color
to be used for the foreground of headers. */
public static final String COLOR_HEADER_FOREGROUND = "it.tidalwave.forceten.header.foreground";
/** The UIManager
key for the Color
to be used for the background of headers (dark variant). */
public static final String COLOR_HEADER_DARK_BACKGROUND = "it.tidalwave.forceten.darkheader.background";
/** The UIManager
key for the Color
to be used for the foreground of headers (dark variant). */
public static final String COLOR_HEADER_DARK_FOREGROUND = "it.tidalwave.forceten.darkheader.foreground";
public static final String COLOR_HEADER_DARK_FOREGROUND2 = "it.tidalwave.forceten.darkheader.foreground2";
/** The UIManager
key for the Font
to be used with Explorers. */
public static final String FONT_EXPLORER = "it.tidalwave.openide.explorer.font";
/** The UIManager
key for the Font
to be used with headers. */
public static final String FONT_HEADER = "it.tidalwave.forceten.header.font";
/** The UIManager
key for the Font
to be used with headers (smnall variant). */
public static final String FONT_HEADER_SMALL = "it.tidalwave.forceten.header.smallfont";
public static final String FONT_SMALL = "it.tidalwave.forceten.smallfont";
public static final String UI_HEADER_PANEL = "it.tidalwave.forceten.headerpanelui";
public static final String UI_DARK_VIEW_PANEL = "it.tidalwave.forceten.darkviewpanelui";
/***************************************************************************
*
* Sets the properties for a View that lies in the main window.
*
**************************************************************************/
public void installDarkViewLAF (final JComponent parent);
/***************************************************************************
*
*
**************************************************************************/
public void installHeaderUI (final JPanel pnHeader);
/***************************************************************************
*
*
**************************************************************************/
public void installDarkLAF (final Component c);
/***************************************************************************
*
*
**************************************************************************/
public static class Locator
{
public static final LookAndFeel findLookAndFeel()
{
final Lookup lookup = Lookup.getDefault();
final LookAndFeel lookAndFeel = lookup.lookup(LookAndFeel.class);
if (lookAndFeel == null)
{
throw new RuntimeException("Cannot lookup LookAndFeel");
}
return lookAndFeel;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy