/** * Returns the stored representation of the given array of FontData objects. * The stored representation has the form FontData;FontData; * Only includes the non-null entries. * * @param fontData the array of FontData objects * @return the stored representation of the FontData objects * @since 1.0 */ public static String getStoredRepresentation(FontData[] fontData) { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < fontData.length; i++) { if (fontData[i] != null) { buffer.append(fontData[i].toString()); buffer.append(ENTRY_SEPARATOR); } } return buffer.toString(); }
/** * Returns the stored representation of the given array of FontData objects. * The stored representation has the form FontData;FontData; * Only includes the non-null entries. * * @param fontData the array of FontData objects * @return the stored representation of the FontData objects * @since 3.0 */ public static String getStoredRepresentation(FontData[] fontData) { StringBuilder buffer = new StringBuilder(); for (FontData element : fontData) { if (element != null) { buffer.append(element.toString()); buffer.append(ENTRY_SEPARATOR); } } return buffer.toString(); }
/** * Returns the stored representation of the given array of FontData objects. * The stored representation has the form FontData;FontData; * Only includes the non-null entries. * * @param fontData the array of FontData objects * @return the stored representation of the FontData objects * @since 3.0 */ public static String getStoredRepresentation(FontData[] fontData) { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < fontData.length; i++) { if (fontData[i] != null) { buffer.append(fontData[i].toString()); buffer.append(ENTRY_SEPARATOR); } } return buffer.toString(); }
/** * Use this method to get SWT fonts. A FontRegistry is used to manage * the FontData[]->Font mapping. * <p> * Note: Don't dispose the returned SWT Font. It is disposed * automatically when the plugin is stopped. * * @param fontData * the font data * @return The SWT Font */ public Font getFont( FontData[] fontData ) { if ( !fontRegistry.hasValueFor( fontData[0].toString() ) ) { fontRegistry.put( fontData[0].toString(), fontData ); } return fontRegistry.get( fontData[0].toString() ); }
private static void checkFontExists( FontData fontData ) { if( !ProbeResultStore.getInstance().containsProbeResult( fontData ) ) { String msg = "Font not probed yet: " + fontData.toString(); throw new IllegalStateException( msg ); } }
FontData [] fontDatas = JFaceResources.getDialogFont().getFontData(); if (fontDatas.length > 0) { String currentDialogFontData = fontDatas[0].toString(); useStoredBounds = currentDialogFontData.equalsIgnoreCase(previousDialogFontData);
FontData [] fontDatas = JFaceResources.getDialogFont().getFontData(); if (fontDatas.length > 0) { String currentDialogFontData = fontDatas[0].toString(); useStoredBounds = currentDialogFontData.equalsIgnoreCase(previousDialogFontData);
FontData [] fontDatas = JFaceResources.getDialogFont().getFontData(); if (fontDatas.length > 0) { String currentDialogFontData = fontDatas[0].toString(); useStoredBounds = currentDialogFontData.equalsIgnoreCase(previousDialogFontData);
if (drawTool == SelectToolAction.DRAW_TEXT) { FontData fontData = new FontData(drawTextToolbar.getStringCustom()); historyDrawFont.add(fontData.toString()); } else { historyDrawFont.add(""); //$NON-NLS-1$
public void invokeFontDialog() { FontData fontData = new FontData(stringCustom); FontDialog fontWindow = new FontDialog(parent.getShell()); fontWindow.setFontList(new FontData[] { fontData }); fontWindow.setRGB(int2rgb(intgerCustom)); fontData = fontWindow.open(); if (fontData != null) { intgerCustom = rgb2int(fontWindow.getRGB()); stringCustom = fontData.toString(); toolButton.setToolTipText(font2string(fontData)); clickBody(); } }
FontData [] fontDatas = JFaceResources.getDialogFont().getFontData(); if (fontDatas.length > 0) { settings.put(DIALOG_FONT_DATA, fontDatas[0].toString());
FontData [] fontDatas = JFaceResources.getDialogFont().getFontData(); if (fontDatas.length > 0) { settings.put(DIALOG_FONT_DATA, fontDatas[0].toString());
FontData [] fontDatas = JFaceResources.getDialogFont().getFontData(); if (fontDatas.length > 0) { settings.put(DIALOG_FONT_DATA, fontDatas[0].toString());
stringCustom = fontData.toString(); intgerCustom = rgb2int(255, 0, 0); selectedItemID = intgerCustom;