📄 list.java
字号:
}
}
// setters
/**
* @param numbered the numbered to set
*/
public void setNumbered(boolean numbered) {
this.numbered = numbered;
}
/**
* @param lettered the lettered to set
*/
public void setLettered(boolean lettered) {
this.lettered = lettered;
}
/**
* @param uppercase the uppercase to set
*/
public void setLowercase(boolean uppercase) {
this.lowercase = uppercase;
}
/**
* @param autoindent the autoindent to set
*/
public void setAutoindent(boolean autoindent) {
this.autoindent = autoindent;
}
/**
* @param alignindent the alignindent to set
*/
public void setAlignindent(boolean alignindent) {
this.alignindent = alignindent;
}
/**
* Sets the number that has to come first in the list.
*
* @param first a number
*/
public void setFirst(int first) {
this.first = first;
}
/**
* Sets the listsymbol.
*
* @param symbol a <CODE>Chunk</CODE>
*/
public void setListSymbol(Chunk symbol) {
this.symbol = symbol;
}
/**
* Sets the listsymbol.
* <P>
* This is a shortcut for <CODE>setListSymbol(Chunk symbol)</CODE>.
*
* @param symbol a <CODE>String</CODE>
*/
public void setListSymbol(String symbol) {
this.symbol = new Chunk(symbol);
}
/**
* Sets the indentation of this paragraph on the left side.
*
* @param indentation the new indentation
*/
public void setIndentationLeft(float indentation) {
this.indentationLeft = indentation;
}
/**
* Sets the indentation of this paragraph on the right side.
*
* @param indentation the new indentation
*/
public void setIndentationRight(float indentation) {
this.indentationRight = indentation;
}
/**
* @param symbolIndent the symbolIndent to set
*/
public void setSymbolIndent(float symbolIndent) {
this.symbolIndent = symbolIndent;
}
// methods to retrieve information
/**
* Gets all the items in the list.
*
* @return an <CODE>ArrayList</CODE> containing <CODE>ListItem</CODE>s.
*/
public ArrayList getItems() {
return list;
}
/**
* Gets the size of the list.
*
* @return a <CODE>size</CODE>
*/
public int size() {
return list.size();
}
/**
* Returns <CODE>true</CODE> if the list is empty.
*
* @return <CODE>true</CODE> if the list is empty
*/
public boolean isEmpty() {
return list.isEmpty();
}
/**
* Gets the leading of the first listitem.
*
* @return a <CODE>leading</CODE>
*/
public float getTotalLeading() {
if (list.size() < 1) {
return -1;
}
ListItem item = (ListItem) list.get(0);
return item.getTotalLeading();
}
// getters
/**
* Checks if the list is numbered.
* @return <CODE>true</CODE> if the list is numbered, <CODE>false</CODE> otherwise.
*/
public boolean isNumbered() {
return numbered;
}
/**
* Checks if the list is lettered.
* @return <CODE>true</CODE> if the list is lettered, <CODE>false</CODE> otherwise.
*/
public boolean isLettered() {
return lettered;
}
/**
* Checks if the list lettering is lowercase.
* @return <CODE>true</CODE> if it is lowercase, <CODE>false</CODE> otherwise.
*/
public boolean isLowercase() {
return lowercase;
}
/**
* Checks if the indentation of list items is done automatically.
* @return the autoindent
*/
public boolean isAutoindent() {
return autoindent;
}
/**
* Checks if all the listitems should be aligned.
* @return the alignindent
*/
public boolean isAlignindent() {
return alignindent;
}
/**
* Gets the first number .
* @return a number
*/
public int getFirst() {
return first;
}
/**
* Gets the Chunk containing the symbol.
* @return a Chunk with a symbol
*/
public Chunk getSymbol() {
return symbol;
}
/**
* Gets the indentation of this paragraph on the left side.
* @return the indentation
*/
public float getIndentationLeft() {
return indentationLeft;
}
/**
* Gets the indentation of this paragraph on the right side.
* @return the indentation
*/
public float getIndentationRight() {
return indentationRight;
}
/**
* Gets the symbol indentation.
* @return the symbol indentation
*/
public float getSymbolIndent() {
return symbolIndent;
}
// deprecated constructor and methods
/**
* Returns a <CODE>List</CODE> that has been constructed taking in account
* the value of some <VAR>attributes</VAR>.
*
* @param attributes Some attributes
* @deprecated use ElementFactory.getList(attributes);
*/
public List(java.util.Properties attributes) {
this();
List l = com.lowagie.text.factories.ElementFactory.getList(attributes);
this.list = l.list;
this.numbered = l.numbered;
this.lettered = l.lettered;
this.lowercase = l.lowercase;
this.autoindent = l.autoindent;
this.alignindent = l.alignindent;
this.first = l.first;
this.symbol = l.symbol;
this.indentationLeft = l.indentationLeft;
this.indentationRight = l.indentationRight;
this.symbolIndent = l.symbolIndent;
}
/**
* Checks if the list lettering is lowercase.
* @return <CODE>true</CODE> if it is lowercase, <CODE>false</CODE> otherwise.
* @deprecated use isLowercase();
*/
public boolean isLowerCase() {
return isLowercase();
}
/**
* Gets the first number .
* @return a number
* @deprecated use getFirst();
*/
public int first() {
return getFirst();
}
/**
* Gets the Chunk containing the symbol.
* @return a Chunk with a symbol
* @deprecated use getSymbol();
*/
public Chunk symbol() {
return getSymbol();
}
/**
* Gets the indentation of this paragraph on the left side.
* @return the indentation
* @deprecated use getIndentationLeft();
*/
public float indentationLeft() {
return indentationLeft;
}
/**
* Gets the indentation of this paragraph on the right side.
* @return the indentation
* @deprecated use getIndentationRight();
*/
public float indentationRight() {
return getIndentationRight();
}
/**
* Gets the symbol indentation.
* @return the symbol indentation
* @deprecated use getSymbolIndent();
*/
public float symbolIndent() {
return getSymbolIndent();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -