net.sf.jguiraffe.gui.builder.components.DefaultToolTipManager Maven / Gradle / Ivy
Show all versions of jguiraffe Show documentation
/*
* Copyright 2006-2010 The JGUIraffe Team.
*
* 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.
*/
package net.sf.jguiraffe.gui.builder.components;
import java.util.HashMap;
import java.util.Map;
import net.sf.jguiraffe.gui.builder.utils.GUIRuntimeException;
/**
*
* A default implementation of the {@code ToolTipManager} interface.
*
*
* This class provides fully functional implementations for all methods defined
* by the {@code ToolTipManager} interface. An instance is initialized with a
* reference to a {@link ComponentBuilderData} object. From this object the
* {@link WidgetHandler} objects associated with the components to manipulate
* are obtained. The instance also maintains data about the tool tips (both the
* static and the dynamic ones) of all components managed by the associated
* {@link ComponentBuilderData} object.
*
*
* Implementation note: This class is not thread-safe. It must only be accessed
* from the event dispatch thread. It can only be associated with a single
* {@link ComponentBuilderData} object.
*
*
* @author Oliver Heger
* @version $Id: DefaultToolTipManager.java 195 2010-08-30 19:54:41Z oheger $
*/
public class DefaultToolTipManager implements ToolTipManager
{
/** Constant for the default separator for the tip and the additional tip. */
private static final String TIP_SEPARATOR = "\n";
/** A map with the information about the tool tips for the known components. */
private final Map