private void removeLinksAbove(final PathButton pathButton) { while (!buttonStack.peek().equals(pathButton)) { remove(buttonStack.pop()); } if (buttonStack.size() > 0) { PathButton button = buttonStack.get(buttonStack.size() - 1); button.setHyperlinkCursor(false); } revalidate(); repaint(); }
void addLink(final String title) { if (buttonStack.size() > 0) { PathButton button = buttonStack.get(buttonStack.size() - 1); button.setHyperlinkCursor(true); } // REMIND: should only be called from EDT? PathButton pathButton = new PathButton(title); add(buttonStack.push(pathButton)); revalidate(); repaint(); }