本文整理了Java中java.util.Stack.setElementAt()
方法的一些代码示例,展示了Stack.setElementAt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Stack.setElementAt()
方法的具体详情如下:
包路径:java.util.Stack
类名称:Stack
方法名:setElementAt
暂无
代码示例来源:origin: org.apache.pdfbox/pdfbox
private void setNonStrokingColorSpaceStack(PDColorSpace colorSpace)
{
if (nonStrokingColorSpaceStack.isEmpty())
{
nonStrokingColorSpaceStack.add(colorSpace);
}
else
{
nonStrokingColorSpaceStack.setElementAt(colorSpace, nonStrokingColorSpaceStack.size() - 1);
}
}
代码示例来源:origin: org.apache.pdfbox/pdfbox
private void setStrokingColorSpaceStack(PDColorSpace colorSpace)
{
if (strokingColorSpaceStack.isEmpty())
{
strokingColorSpaceStack.add(colorSpace);
}
else
{
strokingColorSpaceStack.setElementAt(colorSpace, strokingColorSpaceStack.size() - 1);
}
}
代码示例来源:origin: com.github.lafa.pdfbox/pdfbox
protected void setStrokingColorSpaceStack(PDColorSpace colorSpace)
{
if (strokingColorSpaceStack.isEmpty())
{
strokingColorSpaceStack.add(colorSpace);
}
else
{
strokingColorSpaceStack.setElementAt(colorSpace, strokingColorSpaceStack.size() - 1);
}
}
代码示例来源:origin: com.github.lafa.pdfbox/pdfbox
protected void setNonStrokingColorSpaceStack(PDColorSpace colorSpace)
{
if (nonStrokingColorSpaceStack.isEmpty())
{
nonStrokingColorSpaceStack.add(colorSpace);
}
else
{
nonStrokingColorSpaceStack.setElementAt(colorSpace, nonStrokingColorSpaceStack.size() - 1);
}
}
代码示例来源:origin: org.wikimodel/org.wikimodel.wem
public void setStackParameter(String name, Object data) {
Stack<Object> set = (Stack<Object>) getStackParameters().get(name);
if (set == null || set.isEmpty()) {
pushStackParameter(name, data);
} else {
set.setElementAt(data, set.size() - 1);
}
}
代码示例来源:origin: apache/fop
/**
* In some cases an RtfContainer must be replaced by another one on the
* stack. This happens when handling nested fo:blocks for example: after
* handling a nested block the enclosing block must switch to a new
* paragraph container to handle what follows the nested block.
* TODO: what happens to elements that are "more on top" than oldC on the
* stack? shouldn't they be closed or something?
* @param oldC old container
* @param newC new container
* @throws Exception if not caught
*/
public void replaceContainer(RtfContainer oldC, RtfContainer newC)
throws Exception {
// treating the Stack as a Vector allows such manipulations (yes, I hear you screaming ;-)
final int index = containers.indexOf(oldC);
if (index < 0) {
throw new Exception("container to replace not found:" + oldC);
}
containers.setElementAt(newC, index);
}
代码示例来源:origin: org.apache.uima/jVinci
public void add(Service S) {
makeConsistent(S);
// Get the actual vector index
int mylevel = S.actualLevel;
// Grow the stack if need be
expand(mylevel);
ArrayList v;
if (stack.get(mylevel) == null) {
v = new ArrayList();
v.add(S);
stack.setElementAt(v, mylevel);
} else {
v = (ArrayList) stack.get(mylevel);
v.add(S);
}
pr("Added " + S.toString());
}
代码示例来源:origin: TomRoush/PdfBox-Android
/**
* Set the stroking color space. This will add the colorspace to the PDResources
* if necessary.
*
* @param colorSpace The colorspace to write.
* @throws IOException If there is an error writing the colorspace.
* @deprecated Use {@link #setNonStrokingColor} instead.
*/
@Deprecated
public void setNonStrokingColorSpace(PDColorSpace colorSpace) throws IOException
{
if (nonStrokingColorSpaceStack.isEmpty())
{
nonStrokingColorSpaceStack.add(colorSpace);
}
else
{
nonStrokingColorSpaceStack.setElementAt(colorSpace, nonStrokingColorSpaceStack.size() - 1);
}
writeOperand(getName(colorSpace));
writeOperator("cs");
}
代码示例来源:origin: apache/uima-uimaj
public void add(Service S) {
makeConsistent(S);
// Get the actual vector index
int mylevel = S.actualLevel;
// Grow the stack if need be
expand(mylevel);
ArrayList v;
if (stack.get(mylevel) == null) {
v = new ArrayList();
v.add(S);
stack.setElementAt(v, mylevel);
} else {
v = (ArrayList) stack.get(mylevel);
v.add(S);
}
pr("Added " + S.toString());
}
代码示例来源:origin: TomRoush/PdfBox-Android
/**
* Set the stroking color space. This will add the colorspace to the PDResources
* if necessary.
*
* @param colorSpace The colorspace to write.
* @throws IOException If there is an error writing the colorspace.
* @deprecated Use {@link #setStrokingColor} instead.
*/
@Deprecated
public void setStrokingColorSpace(PDColorSpace colorSpace) throws IOException
{
if (strokingColorSpaceStack.isEmpty())
{
strokingColorSpaceStack.add(colorSpace);
}
else
{
strokingColorSpaceStack.setElementAt(colorSpace, nonStrokingColorSpaceStack.size() - 1);
}
writeOperand(getName(colorSpace));
writeOperator("CS");
}
代码示例来源:origin: com.github.lafa.pdfbox/pdfbox
/**
* Set the font and font size to draw text with.
*
* @param font The font to use.
* @param fontSize The font size to draw the text.
* @throws IOException If there is an error writing the font information.
*/
public void setFont(PDFont font, float fontSize) throws IOException
{
if (fontStack.isEmpty())
{
fontStack.add(font);
}
else
{
fontStack.setElementAt(font, fontStack.size() - 1);
}
writeOperand(resources.add(font));
writeOperand(fontSize);
writeOperator("Tf");
}
代码示例来源:origin: org.apache.pdfbox/pdfbox
/**
* Set the font and font size to draw text with.
*
* @param font The font to use.
* @param fontSize The font size to draw the text.
* @throws IOException If there is an error writing the font information.
*/
public void setFont(PDFont font, float fontSize) throws IOException
{
if (fontStack.isEmpty())
{
fontStack.add(font);
}
else
{
fontStack.setElementAt(font, fontStack.size() - 1);
}
if (font.willBeSubset())
{
document.getFontsToSubset().add(font);
}
writeOperand(resources.add(font));
writeOperand(fontSize);
writeOperator("Tf");
}
代码示例来源:origin: org.apache.uima/jVinci
toplevel--;
} else {
stack.setElementAt(newlist, mylevel);
代码示例来源:origin: TomRoush/PdfBox-Android
/**
* Set the font to draw text with.
*
* @param font The font to use.
* @param fontSize The font size to draw the text.
* @throws IOException If there is an error writing the font information.
*/
public void setFont(PDFont font, float fontSize) throws IOException
{
if (fontStack.isEmpty())
{
fontStack.add(font);
}
else
{
fontStack.setElementAt(font, fontStack.size() - 1);
}
if (font.willBeSubset() && !document.getFontsToSubset().contains(font))
{
document.getFontsToSubset().add(font);
}
writeOperand(resources.add(font));
writeOperand(fontSize);
writeOperator("Tf");
}
代码示例来源:origin: apache/uima-uimaj
toplevel--;
} else {
stack.setElementAt(newlist, mylevel);
代码示例来源:origin: com.github.lafa.pdfbox/pdfbox
/**
* Set the font and font size to draw text with.
*
* @param font The font to use.
* @param fontSize The font size to draw the text.
* @throws IOException If there is an error writing the font information.
*/
@Override
public void setFont(PDFont font, float fontSize) throws IOException
{
if (fontStack.isEmpty())
{
fontStack.add(font);
}
else
{
fontStack.setElementAt(font, fontStack.size() - 1);
}
if (font.willBeSubset())
{
document.getFontsToSubset().add(font);
}
writeOperand(getResources().add(font));
writeOperand(fontSize);
writeOperator("Tf");
}
代码示例来源:origin: TomRoush/PdfBox-Android
strokingColorSpaceStack.setElementAt(color.getColorSpace(),
nonStrokingColorSpaceStack.size() - 1);
代码示例来源:origin: TomRoush/PdfBox-Android
nonStrokingColorSpaceStack.setElementAt(color.getColorSpace(),
nonStrokingColorSpaceStack.size() - 1);
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
fix_itm.propagate_items().setElementAt(existing ,l);
代码示例来源:origin: com.ximpleware/vtd-xml
fix_itm.propagate_items().setElementAt(existing ,l);
内容来源于网络,如有侵权,请联系作者删除!