本文整理匯總了Java中org.eclipse.wb.swt.SWTResourceManager.getFont方法的典型用法代碼示例。如果您正苦於以下問題:Java SWTResourceManager.getFont方法的具體用法?Java SWTResourceManager.getFont怎麽用?Java SWTResourceManager.getFont使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.wb.swt.SWTResourceManager
的用法示例。
在下文中一共展示了SWTResourceManager.getFont方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getBMessageBox
import org.eclipse.wb.swt.SWTResourceManager; //導入方法依賴的package包/類
public void getBMessageBox(String title, String text, int fontstyle, int fontsize) {
bMessageBox bmb = new bMessageBox(b, SWT.None, false) {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void saveAction() {
// TODO Auto-generated method stub
}
};
bmb.setTitle(title);
bmb.setText(text);
Font font = SWTResourceManager.getFont(bmb.text.getFont().getFontData()[0].getName(), fontsize, fontstyle);
bmb.text.setFont(font);
bmb.open();
}
示例2: showUpdateinof
import org.eclipse.wb.swt.SWTResourceManager; //導入方法依賴的package包/類
public void showUpdateinof() {
bMessageBox bme = new bMessageBox(b, SWT.NONE, false) {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void saveAction() {
// TODO Auto-generated method stub
}
};
bme.setTextFontinfo(12, SWT.None);
bme.setText(b.updateinfo);
bme.setTitle("���°汾");
// bme.text.setLineAlignment(0, 1, SWT.CENTER);
StyleRange sr = new StyleRange();
sr.start = 1;
sr.length = bme.text.getLine(1).length();
sr.font = SWTResourceManager.getFont("����", 20, SWT.NONE, false, true);
bme.text.setStyleRange(sr);
// bme.text.set
bme.open();
}
示例3: setEditorFont
import org.eclipse.wb.swt.SWTResourceManager; //導入方法依賴的package包/類
/**
* ���ñ༭������
*
*/
public void setEditorFont(String fontname) {
if (text != null) {
Font f = SWTResourceManager.getFont(fontname, getZoomedFontSize(ba.getEditerDefaultFontSize()), SWT.None);
text.setFont(f);
}
appProperties.setProperty("EditorDefaultFont", String.valueOf(fontname));
}
示例4: getStylesFromProperties
import org.eclipse.wb.swt.SWTResourceManager; //導入方法依賴的package包/類
/**
* �������ļ���ԭ������ʽ��text
*
* @param p����������ʽ�������ļ�
* @param text
* ҪӦ��������ʽ��StyledText���
*/
public void getStylesFromProperties(Properties p, StyledText text) {
String start, length, font, fontstyle, strikeout, underline, fontheight;
for (int i = 0; i > -1; i++) {
start = p.getProperty(i + "start");
if (start != null) {
length = p.getProperty(i + "length");
font = p.getProperty(i + "font");
fontheight = p.getProperty(i + "fontheight");
fontstyle = p.getProperty(i + "fontstyle");
strikeout = p.getProperty(i + "strikeout");
underline = p.getProperty(i + "underline");
if (Integer.valueOf(fontheight) >= 0) {
Font f = SWTResourceManager.getFont(font, b.getZoomedFontSize(Integer.valueOf(fontheight)),
Integer.valueOf(fontstyle));
TextStyle ts = new TextStyle(f, null, null);
ts.strikeout = Boolean.valueOf(strikeout);
ts.underline = Boolean.valueOf(underline);
StyleRange sr = new StyleRange(ts);
sr.start = Integer.valueOf(start);
sr.length = Integer.valueOf(length);
if (sr.start >= 0 && sr.length + sr.start <= text.getCharCount())
text.setStyleRange(sr);
} else
getMessageBox("��ȡ�ļ�ʱ����", "black�ļ��е���ʽ��������������߶Ȳ���Ϊ��ֵ��");
} else
break;
}
for (int a = 0; a > -1; ++a) {
String startline = p.getProperty(a + "alignmentstartline");
if (startline != null) {
text.setLineAlignment(Integer.valueOf(startline), 1, Integer.valueOf(p.getProperty(a + "alignment")));
} else
break;
}
}
示例5: getFont
import org.eclipse.wb.swt.SWTResourceManager; //導入方法依賴的package包/類
@Override
public Font getFont(Object element){
if(element != null && element instanceof Konsultationsbeleg) {
Konsultationsbeleg kb = (Konsultationsbeleg) element;
int status = Integer.parseInt(kb.getStatus());
// WINDOWSONLY ARGHG
if(status == StatusKonsultation.STORNIERT) return SWTResourceManager.getFont("Lucida Grande", 11, SWT.None, true, false);
}
return null;
}
示例6: setTextFontinfo
import org.eclipse.wb.swt.SWTResourceManager; //導入方法依賴的package包/類
public void setTextFontinfo(int fontsize,int fontstyle){
Font font = SWTResourceManager.getFont(text.getFont().getFontData()[0].getName(),fontsize,fontstyle);
text.setFont(font);
}
示例7: getThisFontInNewSize
import org.eclipse.wb.swt.SWTResourceManager; //導入方法依賴的package包/類
public static Font getThisFontInNewSize(Font font, int size, int style) {
FontData[] fontdata = font.getFontData();
return SWTResourceManager.getFont(fontdata[0].getName(), size, style);
}