Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
What Is jxl.jar 2.6.12
What is jxl.jar 2.6.12?
✍: fyicenter.com
jxl.jar 2.6.12 is the JAR file for Java Excel API 2.6.12,
which is a Java library for reading, writing and
modifying Microsoft Excel spreadsheet files.
JAR File Size and Download Location:
JAR name: jxl-2.6.12.jar Target JDK version: 1.6 Dependency: None File name: jxl.jar File size: 725735 bytes Release date: 24-Oct-2009 Download: Java Excel API Website.
Here are Java Source Code files for jxl-2.6.12.jar:
⏎ jxl/biff/Fonts.java
/*********************************************************************
*
* Copyright (C) 2002 Andrew Khan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import jxl.common.Assert;
import jxl.write.biff.File;
/**
* A container for the list of fonts used in this workbook
*/
public class Fonts
{
/**
* The list of fonts
*/
private ArrayList fonts;
/**
* The default number of fonts
*/
private static final int numDefaultFonts = 4;
/**
* Constructor
*/
public Fonts()
{
fonts = new ArrayList();
}
/**
* Adds a font record to this workbook. If the FontRecord passed in has not
* been initialized, then its font index is determined based upon the size
* of the fonts list. The FontRecord's initialized method is called, and
* it is added to the list of fonts.
*
* @param f the font to add
*/
public void addFont(FontRecord f)
{
if (!f.isInitialized())
{
int pos = fonts.size();
// Remember that the pos with index 4 is skipped
if (pos >= 4)
{
pos++;
}
f.initialize(pos);
fonts.add(f);
}
}
/**
* Used by FormattingRecord for retrieving the fonts for the
* hardcoded styles
*
* @param index the index of the font to return
* @return the font with the specified font index
*/
public FontRecord getFont(int index)
{
// remember to allow for the fact that font index 4 is not used
if (index > 4)
{
index--;
}
return (FontRecord) fonts.get(index);
}
/**
* Writes out the list of fonts
*
* @param outputFile the compound file to write the data to
* @exception IOException
*/
public void write(File outputFile) throws IOException
{
Iterator i = fonts.iterator();
FontRecord font = null;
while (i.hasNext())
{
font = (FontRecord) i.next();
outputFile.write(font);
}
}
/**
* Rationalizes all the fonts, removing any duplicates
*
* @return the mappings between new indexes and old ones
*/
IndexMapping rationalize()
{
IndexMapping mapping = new IndexMapping(fonts.size() + 1);
// allow for skipping record 4
ArrayList newfonts = new ArrayList();
FontRecord fr = null;
int numremoved = 0;
// Preserve the default fonts
for (int i = 0; i < numDefaultFonts; i++)
{
fr = (FontRecord) fonts.get(i);
newfonts.add(fr);
mapping.setMapping(fr.getFontIndex(), fr.getFontIndex());
}
// Now do the rest
Iterator it = null;
FontRecord fr2 = null;
boolean duplicate = false;
for (int i = numDefaultFonts; i < fonts.size(); i++)
{
fr = (FontRecord) fonts.get(i);
// Compare to all the fonts currently on the list
duplicate = false;
it = newfonts.iterator();
while (it.hasNext() && !duplicate)
{
fr2 = (FontRecord) it.next();
if (fr.equals(fr2))
{
duplicate = true;
mapping.setMapping(fr.getFontIndex(),
mapping.getNewIndex(fr2.getFontIndex()));
numremoved++;
}
}
if (!duplicate)
{
// Add to the new list
newfonts.add(fr);
int newindex = fr.getFontIndex() - numremoved;
Assert.verify(newindex > 4);
mapping.setMapping(fr.getFontIndex(), newindex);
}
}
// Iterate through the remaining fonts, updating all the font indices
it = newfonts.iterator();
while (it.hasNext())
{
fr = (FontRecord) it.next();
fr.initialize(mapping.getNewIndex(fr.getFontIndex()));
}
fonts = newfonts;
return mapping;
}
}
⏎ jxl/biff/Fonts.java
Or download all of them as a single archive file:
File name: jxl-2.6.12-src.zip File size: 824057 bytes Release date: 2009-10-24 Download
⇐ What Is jexcelapi_2_6_12.zip
2017-06-09, ≈200🔥, 6💬
Popular Posts:
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
JDK 17 java.compiler.jmod is the JMOD file for JDK 17 Compiler module. JDK 17 Compiler module compil...
xml-commons External Source Code Files are provided in the source package file, xml-commons-external...
What Is ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is the JAR files of ojdbc.jar, JD...
What Is poi-ooxml-3.5.jar? poi-ooxml-3.5.jar is one of the JAR files for Apache POI 3.5, which provi...