本文整理汇总了Java中jxl.format.Orientation类的典型用法代码示例。如果您正苦于以下问题:Java Orientation类的具体用法?Java Orientation怎么用?Java Orientation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Orientation类属于jxl.format包,在下文中一共展示了Orientation类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOrientation
import jxl.format.Orientation; //导入依赖的package包/类
/**
* Gets the orientation
*
* @return the orientation
*/
public Orientation getOrientation()
{
if (!formatInfoInitialized)
{
initializeFormatInformation();
}
return orientation;
}
示例2: setOrientation
import jxl.format.Orientation; //导入依赖的package包/类
/**
* Sets the text orientation for cells with this style
*
* @exception WriteException
* @param o the orientation
*/
public void setOrientation(Orientation o)
throws WriteException
{
if (isInitialized())
{
throw new JxlWriteException(JxlWriteException.formatInitialized);
}
super.setXFOrientation(o);
}
示例3: textVertical
import jxl.format.Orientation; //导入依赖的package包/类
private WritableCell textVertical(WritableCell cell) throws WriteException {
WritableCellFormat format = new WritableCellFormat(cell.getCellFormat());
format.setOrientation(Orientation.PLUS_90);
cell.setCellFormat(format);
return cell;
}
示例4: setParam
import jxl.format.Orientation; //导入依赖的package包/类
private WritableCellFormat setParam(WritableCellFormat wcf, int map) throws WriteException {
if ( (map&CENTRE)!=0 ) wcf.setAlignment(Alignment.CENTRE);
if ( (map&RIGHT)!=0 ) wcf.setAlignment(Alignment.RIGHT);
if ( (map&LEFT)!=0 ) wcf.setAlignment(Alignment.LEFT);
if ( (map&VCENTRE)!=0 ) wcf.setVerticalAlignment(VerticalAlignment.CENTRE);
if ( (map&B_TOP_MED)!=0 ) wcf.setBorder(Border.TOP, BorderLineStyle.MEDIUM);
if ( (map&B_BOTTOM_MED)!=0 ) wcf.setBorder(Border.BOTTOM, BorderLineStyle.MEDIUM);
if ( (map&B_LEFT_MED)!=0 ) wcf.setBorder(Border.LEFT, BorderLineStyle.MEDIUM);
if ( (map&B_RIGHT_MED)!=0 ) wcf.setBorder(Border.RIGHT, BorderLineStyle.MEDIUM);
if ( (map&B_ALL_MED)!=0 ) {
wcf.setBorder(Border.RIGHT, BorderLineStyle.MEDIUM);
wcf.setBorder(Border.LEFT, BorderLineStyle.MEDIUM);
wcf.setBorder(Border.TOP, BorderLineStyle.MEDIUM);
wcf.setBorder(Border.BOTTOM, BorderLineStyle.MEDIUM);
}
if ( (map&B_TOP_LOW)!=0 ) wcf.setBorder(Border.TOP, BorderLineStyle.THIN);
if ( (map&B_BOTTOM_LOW)!=0 ) wcf.setBorder(Border.BOTTOM, BorderLineStyle.THIN);
if ( (map&B_LEFT_LOW)!=0 ) wcf.setBorder(Border.LEFT, BorderLineStyle.THIN);
if ( (map&B_RIGHT_LOW)!=0 ) wcf.setBorder(Border.RIGHT, BorderLineStyle.THIN);
if ( (map&B_ALL_LOW)!=0 ) {
wcf.setBorder(Border.RIGHT, BorderLineStyle.THIN);
wcf.setBorder(Border.LEFT, BorderLineStyle.THIN);
wcf.setBorder(Border.TOP, BorderLineStyle.THIN);
wcf.setBorder(Border.BOTTOM, BorderLineStyle.THIN);
}
if ( (map&GRAY_25)!=0 ) wcf.setBackground(Colour.GRAY_25);
if ( (map&GREEN)!=0 ) wcf.setBackground(Colour.LIGHT_GREEN);
if ( (map&BLACK)!=0 ) wcf.setBackground(Colour.BLACK);
if ( (map&YELLOW)!=0 ) wcf.setBackground(Colour.YELLOW);
if ( (map&RED)!=0 ) wcf.setBackground(Colour.RED);
if ( (map&WRAP)!=0 ) wcf.setWrap(true);
if ( (map&DIAG45)!=0 ) wcf.setOrientation(Orientation.PLUS_45);
return wcf;
}
示例5: XFRecord
import jxl.format.Orientation; //导入依赖的package包/类
/**
* A constructor used when creating a writable record
*
* @param fnt the font
* @param form the format
*/
public XFRecord(FontRecord fnt, DisplayFormat form)
{
super(Type.XF);
initialized = false;
locked = true;
hidden = false;
align = Alignment.GENERAL;
valign = VerticalAlignment.BOTTOM;
orientation = Orientation.HORIZONTAL;
wrap = false;
leftBorder = BorderLineStyle.NONE;
rightBorder = BorderLineStyle.NONE;
topBorder = BorderLineStyle.NONE;
bottomBorder = BorderLineStyle.NONE;
leftBorderColour = Colour.AUTOMATIC;
rightBorderColour = Colour.AUTOMATIC;
topBorderColour = Colour.AUTOMATIC;
bottomBorderColour = Colour.AUTOMATIC;
pattern = Pattern.NONE;
backgroundColour = Colour.DEFAULT_BACKGROUND;
indentation = 0;
shrinkToFit = false;
usedAttributes = (byte) (USE_FONT | USE_FORMAT |
USE_BACKGROUND | USE_ALIGNMENT | USE_BORDER);
// This will be set by the initialize method and the subclass respectively
parentFormat = 0;
xfFormatType = null;
font = fnt;
format = form;
biffType = biff8;
read = false;
copied = false;
formatInfoInitialized = true;
Assert.verify(font != null);
Assert.verify(format != null);
}
示例6: setXFOrientation
import jxl.format.Orientation; //导入依赖的package包/类
/**
* Sets the vertical alignment for the data in this cell
* This method should only be called from its writable subclass
* CellXFRecord
*
* @param o the orientation
*/
protected void setXFOrientation(Orientation o)
{
Assert.verify(!initialized);
orientation = o;
usedAttributes |= USE_ALIGNMENT;
}
示例7: setOrientation
import jxl.format.Orientation; //导入依赖的package包/类
/**
* Sets the text orientation for this format
*
* @param o the orientation
* @exception WriteException
*/
public void setOrientation(Orientation o) throws WriteException
{
super.setOrientation(o);
}