org.eclipse.emf.edit.provider.IItemFontProvider Maven / Gradle / Ivy
/**
* Copyright (c) 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* IBM - Initial API and implementation
*/
package org.eclipse.emf.edit.provider;
import org.eclipse.emf.common.util.URI;
/**
* This is the interface implemented to provide a font for an item;
* it receives delegated calls from IFontProvider.
* Fonts are expressed in a platform-independent way as a URI of the form:
*
* font://<font-family>/<size>/<style>
*
* If the authority is omitted, the viewer's current font family is specified.
* If the height, which is specified in points, is omitted, the viewer's current font height is specified;
* a size delta can be expressed as using + or - with the size,
* e.g., +2 specifies a point height two points larger than the viewer's current font height.
* The style can specify "normal"
, "bold"
, "italic"
, or "bold+italic"
variations;
* when omitted, the viewer's current font style is specified.
*/
public interface IItemFontProvider
{
/**
* An instance object used to specify a normal version of the viewer's font:
*
* font:////normal
*
*/
URI NORMAL_FONT = URI.createURI("font:////normal");
/**
* An instance object used to specify a bold version of the viewer's font:
*
* font:////bold
*
*/
URI BOLD_FONT = URI.createURI("font:////bold");
/**
* An instance object used to specify an italic version of the viwer's font:
*
* font:////italic
*
*/
URI ITALIC_FONT = URI.createURI("font:////italic");
/**
* An instance object used to specify an bold italic version of the viwer's font:
*
* font:////bold+italic
*
*/
URI BOLD_ITALIC_FONT = URI.createURI("font:////bold+italic");
/**
* This does the same thing as IFontProvider.getFont,
* it fetches the font specific to this object instance.
*/
public Object getFont(Object object);
}