diff options
author | Grant Gayed <ggayed> | 2003-05-09 15:21:44 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2003-05-09 15:21:44 +0000 |
commit | 1fcc6002f915e4fe8f13c07b66dc5bee5a4eb023 (patch) | |
tree | f782ef1641e86a271afcb69e66b93af98e0be7a4 | |
parent | 8534b6e59c88b6275d5dfcb25440ffa07f85b020 (diff) | |
download | eclipse.platform.swt-1fcc6002f915e4fe8f13c07b66dc5bee5a4eb023.tar.gz eclipse.platform.swt-1fcc6002f915e4fe8f13c07b66dc5bee5a4eb023.tar.xz eclipse.platform.swt-1fcc6002f915e4fe8f13c07b66dc5bee5a4eb023.zip |
*** empty log message ***
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/FontDialog.java | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/FontDialog.java index 54bb67c79d..0f547b639b 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/FontDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/FontDialog.java @@ -91,11 +91,25 @@ public FontDialog (Shell parent, int style) { * selected in the dialog, or null if none is available. * * @return the FontData for the selected font, or null + * @deprecated use #getFontSet () */ -public FontData getFontData() { +public FontData getFontData () { return fontData; } /** + * Returns a FontData set describing the font that was + * selected in the dialog, or null if none is available. + * + * @return the FontData for the selected font, or null + * @since 2.1.1 + */ +public FontData [] getFontSet () { + if (fontData == null) return null; + FontData [] result = new FontData [1]; + result [0] = fontData; + return result; +} +/** * Returns the currently selected color in the receiver. * * @return the RGB value for the selected color, may be null @@ -159,11 +173,27 @@ public FontData open () { * the platform choose one. * * @param fontData the FontData to use initially, or null + * @deprecated use #setFontSet (FontData []) */ public void setFontData (FontData fontData) { this.fontData = fontData; } /** + * Sets a set of FontData objects describing the font to + * be selected by default in the dialog, or null to let + * the platform choose one. + * + * @param fontData the set of FontData objects to use initially, or null + * @since 2.1.1 + */ +public void setFontSet (FontData [] fontData) { + if (fontData != null && fontData.length > 0) { + this.fontData = fontData [0]; + } else { + this.fontData = null; + } +} +/** * Sets the receiver's selected color to be the argument. * * @param rgb the new RGB value for the selected color, may be |