}
if (!quit) {
// If the current tag equals the last tag on either our color stack or
// our bgcolor stack, we may need to pop
Tag current = null;
if (activeBGColorTagStack != null && activeBGColorTagStack.size() > 0) {
current = (Tag) activeBGColorTagStack.peek();
if (current != null && current.toString().equalsIgnoreCase(t.toString())) {
if (inertBGColorTagCount > 0) {
inertBGColorTagCount--;
} else {
// We have to remove the current color from the stack
activeBGColorTagStack.pop();
activeBGColorStack.pop();
if (activeBGColorTagStack.size() > 0) {
currentBGColor = Integer.parseInt((String) activeBGColorStack.peek());
} else {
currentBGColor = DEFAULT_BGCOLOR;
}
}
}
} else {
// Set to default
currentBGColor = DEFAULT_BGCOLOR;
}
if (activeColorTagStack != null && activeColorTagStack.size() > 0) {
current = (Tag) activeColorTagStack.peek();
if (current != null && current.toString().equalsIgnoreCase(t.toString())) {
if (inertColorTagCount > 0) {
inertColorTagCount--;
} else {
// We have to remove the current color from the stack