本文整理汇总了Java中org.eclipse.jface.internal.text.html.HTMLPrinter.convertTopLevelFont方法的典型用法代码示例。如果您正苦于以下问题:Java HTMLPrinter.convertTopLevelFont方法的具体用法?Java HTMLPrinter.convertTopLevelFont怎么用?Java HTMLPrinter.convertTopLevelFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.internal.text.html.HTMLPrinter
的用法示例。
在下文中一共展示了HTMLPrinter.convertTopLevelFont方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
protected String getStyleSheet() {
if (fgStyleSheet == null)
fgStyleSheet = loadStyleSheet();
String css = fgStyleSheet;
if (css != null) {
FontData fontData = JFaceResources.getFontRegistry().getFontData(
fontSymbolicName)[0];
css = HTMLPrinter.convertTopLevelFont(css, fontData);
}
return css;
}
示例2: getStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Returns the Javadoc hover style sheet with the current Javadoc font from
* the preferences.
*
* @return the updated style sheet
* @since 3.4
*/
private static String getStyleSheet() {
if (fgStyleSheet == null) {
fgStyleSheet = loadStyleSheet("/css/TypeScriptHoverStyleSheet.css"); //$NON-NLS-1$
}
String css = fgStyleSheet;
if (css != null) {
FontData fontData = JFaceResources.getFontRegistry().getFontData(JFaceResources.DIALOG_FONT)[0];
css = HTMLPrinter.convertTopLevelFont(css, fontData);
}
return css;
}
示例3: loadStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Loads and returns the style sheet associated with either Javadoc hover or
* the view.
*
* @param styleSheetName
* the style sheet name of either the Javadoc hover or the view
* @return the style sheet, or <code>null</code> if unable to load
* @since 3.4
*/
private static String loadStyleSheet(String styleSheetName) {
Bundle bundle = Platform.getBundle(TypeScriptUIPlugin.PLUGIN_ID);
URL styleSheetURL = bundle.getEntry(styleSheetName);
if (styleSheetURL == null)
return null;
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(styleSheetURL.openStream()));
StringBuffer buffer = new StringBuffer(1500);
String line = reader.readLine();
while (line != null) {
buffer.append(line);
buffer.append('\n');
line = reader.readLine();
}
FontData fontData = JFaceResources.getFontRegistry().getFontData(JFaceResources.DIALOG_FONT)[0];
return HTMLPrinter.convertTopLevelFont(buffer.toString(), fontData);
} catch (IOException ex) {
TypeScriptUIPlugin.log("Error while loading style sheets", ex);
return ""; //$NON-NLS-1$
} finally {
try {
if (reader != null)
reader.close();
} catch (IOException e) {
// ignore
}
}
}
示例4: getStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Returns the Javadoc hover style sheet with the current JSON font from the
* preferences.
*
* @return the updated style sheet
*/
private static String getStyleSheet() {
if (fgStyleSheet == null) {
fgStyleSheet = loadStyleSheet("/JSONHoverStyleSheet.css"); //$NON-NLS-1$
}
String css = fgStyleSheet;
if (css != null) {
FontData fontData = JFaceResources.getFontRegistry().getFontData(
JFaceResources.DIALOG_FONT)[0];
css = HTMLPrinter.convertTopLevelFont(css, fontData);
}
return css;
}
示例5: loadStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Loads and returns the style sheet associated with either JSON hover or
* the view.
*
* @param styleSheetName
* the style sheet name of either the Javadoc hover or the view
* @return the style sheet, or <code>null</code> if unable to load
*/
private static String loadStyleSheet(String styleSheetName) {
Bundle bundle = Platform.getBundle(JSONUIPlugin.PLUGIN_ID);
URL styleSheetURL = bundle.getEntry(styleSheetName);
if (styleSheetURL == null)
return null;
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(
styleSheetURL.openStream()));
StringBuffer buffer = new StringBuffer(1500);
String line = reader.readLine();
while (line != null) {
buffer.append(line);
buffer.append('\n');
line = reader.readLine();
}
FontData fontData = JFaceResources.getFontRegistry().getFontData(
JFaceResources.DIALOG_FONT)[0];
return HTMLPrinter.convertTopLevelFont(buffer.toString(), fontData);
} catch (IOException ex) {
Logger.logException("Error while loading style sheets", ex);
return ""; //$NON-NLS-1$
} finally {
try {
if (reader != null)
reader.close();
} catch (IOException e) {
// ignore
}
}
}
示例6: getStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Returns the PHP hover style sheet
*/
private String getStyleSheet()
{
if (styleSheet == null)
{
styleSheet = loadStyleSheet(getCSSPath());
}
if (styleSheet != null)
{
FontData fontData = JFaceResources.getFontRegistry().getFontData("Dialog")[0]; //$NON-NLS-1$
return HTMLPrinter.convertTopLevelFont(styleSheet, fontData);
}
return null;
}
示例7: getCSSStyles
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Returns the style information for displaying HTML (Javadoc) content.
*
* @return the CSS styles
* @since 3.3
*/
protected String getCSSStyles() {
if (fgCSSStyles == null) {
Bundle bundle= Platform.getBundle(JavaPlugin.getPluginId());
URL url= bundle.getEntry("/JavadocHoverStyleSheet.css"); //$NON-NLS-1$
if (url != null) {
BufferedReader reader= null;
try {
url= FileLocator.toFileURL(url);
reader= new BufferedReader(new InputStreamReader(url.openStream()));
StringBuffer buffer= new StringBuffer(200);
String line= reader.readLine();
while (line != null) {
buffer.append(line);
buffer.append('\n');
line= reader.readLine();
}
fgCSSStyles= buffer.toString();
} catch (IOException ex) {
JavaPlugin.log(ex);
} finally {
try {
if (reader != null)
reader.close();
} catch (IOException e) {
}
}
}
}
String css= fgCSSStyles;
if (css != null) {
FontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];
css= HTMLPrinter.convertTopLevelFont(css, fontData);
}
return css;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:43,代码来源:AbstractJavaCompletionProposal.java
示例8: getStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Returns the Javadoc hover style sheet with the current Javadoc font from the preferences.
* @return the updated style sheet
* @since 3.4
*/
private static String getStyleSheet() {
if (fgStyleSheet == null) {
fgStyleSheet= loadStyleSheet("/JavadocHoverStyleSheet.css"); //$NON-NLS-1$
}
String css= fgStyleSheet;
if (css != null) {
FontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];
css= HTMLPrinter.convertTopLevelFont(css, fontData);
}
return css;
}
示例9: loadStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Loads and returns the style sheet associated with either Javadoc hover or the view.
*
* @param styleSheetName the style sheet name of either the Javadoc hover or the view
* @return the style sheet, or <code>null</code> if unable to load
* @since 3.4
*/
public static String loadStyleSheet(String styleSheetName) {
Bundle bundle= Platform.getBundle(JavaPlugin.getPluginId());
URL styleSheetURL= bundle.getEntry(styleSheetName);
if (styleSheetURL == null)
return null;
BufferedReader reader= null;
try {
reader= new BufferedReader(new InputStreamReader(styleSheetURL.openStream()));
StringBuffer buffer= new StringBuffer(1500);
String line= reader.readLine();
while (line != null) {
buffer.append(line);
buffer.append('\n');
line= reader.readLine();
}
FontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];
return HTMLPrinter.convertTopLevelFont(buffer.toString(), fontData);
} catch (IOException ex) {
JavaPlugin.log(ex);
return ""; //$NON-NLS-1$
} finally {
try {
if (reader != null)
reader.close();
} catch (IOException e) {
//ignore
}
}
}
示例10: getStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Returns the Javadoc hover style sheet with the current Javadoc font from
* the preferences.
*
* @return the updated style sheet
* @since 3.4
*/
private static String getStyleSheet() {
if (fgStyleSheet == null) {
fgStyleSheet = loadStyleSheet("/WebResourcesStyleSheet.css"); //$NON-NLS-1$
}
String css = fgStyleSheet;
if (css != null) {
FontData fontData = JFaceResources.getFontRegistry().getFontData(
JFaceResources.DIALOG_FONT)[0];
css = HTMLPrinter.convertTopLevelFont(css, fontData);
}
return css;
}
示例11: loadStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Loads and returns the style sheet associated with either Javadoc hover or
* the view.
*
* @param styleSheetName
* the style sheet name of either the Javadoc hover or the view
* @return the style sheet, or <code>null</code> if unable to load
* @since 3.4
*/
private static String loadStyleSheet(String styleSheetName) {
Bundle bundle = Platform.getBundle(WebResourcesUIPlugin.PLUGIN_ID);
URL styleSheetURL = bundle.getEntry(styleSheetName);
if (styleSheetURL == null)
return null;
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(
styleSheetURL.openStream()));
StringBuffer buffer = new StringBuffer(1500);
String line = reader.readLine();
while (line != null) {
buffer.append(line);
buffer.append('\n');
line = reader.readLine();
}
FontData fontData = JFaceResources.getFontRegistry().getFontData(
JFaceResources.DIALOG_FONT)[0];
return HTMLPrinter.convertTopLevelFont(buffer.toString(), fontData);
} catch (IOException ex) {
Trace.trace(Trace.SEVERE, "Error while loading style sheets", ex);
return ""; //$NON-NLS-1$
} finally {
try {
if (reader != null)
reader.close();
} catch (IOException e) {
// ignore
}
}
}
示例12: loadStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
private static String loadStyleSheet() {
Bundle bundle= Platform.getBundle(JavaPlugin.getPluginId());
URL styleSheetURL= bundle.getEntry("/JavadocViewStyleSheet.css"); //$NON-NLS-1$
if (styleSheetURL == null)
return null;
BufferedReader reader= null;
try {
reader= new BufferedReader(new InputStreamReader(styleSheetURL.openStream()));
StringBuffer buffer= new StringBuffer(1500);
String line= reader.readLine();
while (line != null) {
buffer.append(line);
buffer.append('\n');
line= reader.readLine();
}
FontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];
return HTMLPrinter.convertTopLevelFont(buffer.toString(), fontData);
} catch (IOException ex) {
JavaPlugin.log(ex);
return null;
} finally {
try {
if (reader != null)
reader.close();
} catch (IOException e) {
}
}
}
示例13: getStyleSheet
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* Returns the Javadoc hover style sheet with the current Javadoc font from the preferences.
* @return the updated style sheet
* @since 3.4
*/
private static String getStyleSheet() {
if (fgStyleSheet == null)
fgStyleSheet= loadStyleSheet();
String css= fgStyleSheet;
if (css != null) {
FontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];
css= HTMLPrinter.convertTopLevelFont(css, fontData);
}
return css;
}