Package java.util

Examples of java.util.Stack.push()


    synchronized(_context) {
      Stack stack = (Stack)_context.get(thread);
      if (stack == null) {
        _context.put(thread, stack = new Stack());
      }
      stack.push(context);
    }
  }


  public static final void destroyInstance(Thread thread)
View Full Code Here


  /**
   * the draw method actually does the drawing
   */
  public void draw(TreeDrawerNode startNode) {
    Stack remaining = new Stack();
    remaining.push(startNode);
    while (remaining.empty() == false) {
      TreeDrawerNode node = (TreeDrawerNode) remaining.pop();

      // just return if no subkids visible.
      if ((node.getMaxIndex() < minInd) ||
View Full Code Here

      // handle selection...
      if (node == selected) {
        if (isSelected == false) {
          isSelected = true;
          // push onto stack, so we know when we're finished with the selected subtree..
          remaining.push(selected);
        } else {
          // isSelected is true, so we're pulling the selected node off the second time.
          isSelected = false;
          continue;
        }
View Full Code Here

        }
      }
      // lots of stack allocation...
      TreeDrawerNode left = node.getLeft();
      TreeDrawerNode right = node.getRight();
      if (left.isLeaf() == false) remaining.push(left);
      if (right.isLeaf() == false) remaining.push(right);
      // finally draw
      drawSingle(node);
    }
  }
View Full Code Here

      }
      // lots of stack allocation...
      TreeDrawerNode left = node.getLeft();
      TreeDrawerNode right = node.getRight();
      if (left.isLeaf() == false) remaining.push(left);
      if (right.isLeaf() == false) remaining.push(right);
      // finally draw
      drawSingle(node);
    }
  }
/*
 
View Full Code Here

            if (!blankline) {
                next = (Task) nextTreeNode.getUserObject();
                while (!nestingStack.isEmpty()) {
                  DefaultMutableTreeNode topStackNode = (DefaultMutableTreeNode) nestingStack.pop();
                  if (nextTreeNode.getParent()==topStackNode) {
                    nestingStack.push(topStackNode);
                    break;
                  }
                }
            nestingStack.push(nextTreeNode);
            }
View Full Code Here

                  if (nextTreeNode.getParent()==topStackNode) {
                    nestingStack.push(topStackNode);
                    break;
                  }
                }
            nestingStack.push(nextTreeNode);
            }
            if (blankline || isVisible(next)) {
                if (rowCount % 2 == 1) {
                    g.setColor(new Color((float) 0.933, (float) 0.933,
                            (float) 0.933));
View Full Code Here

  /**
   * the draw method actually does the drawing
   */
  public void draw(TreeDrawerNode startNode) {
    Stack remaining = new Stack();
    remaining.push(startNode);
    while (remaining.empty() == false) {
      TreeDrawerNode node = (TreeDrawerNode) remaining.pop();
      // just return if no subkids visible.
      if ((node.getMaxIndex() < minInd) ||
          (node.getMinIndex() > maxInd))
View Full Code Here

      // handle selection...
      if (node == selected) {
        if (isSelected == false) {
          isSelected = true;
          // push onto stack, so we know when we're finished with the selected subtree..
          remaining.push(selected);
        } else {
          // isSelected is true, so we're pulling the selected node off the second time.
          isSelected = false;
          continue;
        }
View Full Code Here

        }
      }
      // lots of stack allocation...
      TreeDrawerNode left = node.getLeft();
      TreeDrawerNode right = node.getRight();
      if (left.isLeaf() == false) remaining.push(left);
      if (right.isLeaf() == false) remaining.push(right);
      // finally draw
      drawSingle(node);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.