📄 styles.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: Styles.java
package jxl.write.biff;
import common.Logger;
import jxl.biff.XFRecord;
import jxl.write.*;
// Referenced classes of package jxl.write.biff:
// DateRecord
class Styles
{
private static Logger logger;
private WritableFont arial10pt;
private WritableFont hyperlinkFont;
private WritableCellFormat normalStyle;
private WritableCellFormat hyperlinkStyle;
private WritableCellFormat hiddenStyle;
private WritableCellFormat defaultDateFormat;
static Class class$jxl$write$biff$Styles; /* synthetic field */
public Styles()
{
arial10pt = null;
hyperlinkFont = null;
normalStyle = null;
hyperlinkStyle = null;
hiddenStyle = null;
}
private synchronized void initNormalStyle()
{
normalStyle = new WritableCellFormat(getArial10Pt(), NumberFormats.DEFAULT);
normalStyle.setFont(getArial10Pt());
}
public WritableCellFormat getNormalStyle()
{
if(normalStyle == null)
initNormalStyle();
return normalStyle;
}
private synchronized void initHiddenStyle()
{
hiddenStyle = new WritableCellFormat(getArial10Pt(), new DateFormat(";;;"));
}
public WritableCellFormat getHiddenStyle()
{
if(hiddenStyle == null)
initHiddenStyle();
return hiddenStyle;
}
private synchronized void initHyperlinkStyle()
{
hyperlinkStyle = new WritableCellFormat(getHyperlinkFont(), NumberFormats.DEFAULT);
}
public WritableCellFormat getHyperlinkStyle()
{
if(hyperlinkStyle == null)
initHyperlinkStyle();
return hyperlinkStyle;
}
private synchronized void initArial10Pt()
{
arial10pt = new WritableFont(WritableWorkbook.ARIAL_10_PT);
}
public WritableFont getArial10Pt()
{
if(arial10pt == null)
initArial10Pt();
return arial10pt;
}
private synchronized void initHyperlinkFont()
{
hyperlinkFont = new WritableFont(WritableWorkbook.HYPERLINK_FONT);
}
public WritableFont getHyperlinkFont()
{
if(hyperlinkFont == null)
initHyperlinkFont();
return hyperlinkFont;
}
private synchronized void initDefaultDateFormat()
{
defaultDateFormat = new WritableCellFormat(DateFormats.DEFAULT);
}
public WritableCellFormat getDefaultDateFormat()
{
if(defaultDateFormat == null)
initDefaultDateFormat();
return defaultDateFormat;
}
public XFRecord getFormat(XFRecord wf)
{
XFRecord format = wf;
if(format == WritableWorkbook.NORMAL_STYLE)
format = getNormalStyle();
else
if(format == WritableWorkbook.HYPERLINK_STYLE)
format = getHyperlinkStyle();
else
if(format == WritableWorkbook.HIDDEN_STYLE)
format = getHiddenStyle();
else
if(format == DateRecord.defaultDateFormat)
format = getDefaultDateFormat();
if(format.getFont() == WritableWorkbook.ARIAL_10_PT)
format.setFont(getArial10Pt());
else
if(format.getFont() == WritableWorkbook.HYPERLINK_FONT)
format.setFont(getHyperlinkFont());
return format;
}
static Class class$(String x0)
{
return Class.forName(x0);
ClassNotFoundException x1;
x1;
throw new NoClassDefFoundError(x1.getMessage());
}
static
{
logger = Logger.getLogger(class$jxl$write$biff$Styles != null ? class$jxl$write$biff$Styles : (class$jxl$write$biff$Styles = class$("jxl.write.biff.Styles")));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -