All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jive3.NavManager Maven / Gradle / Ivy

The newest version!
package jive3;

import javax.swing.*;
import javax.swing.tree.TreePath;
import java.util.Vector;

/**
 * Navigation manager
 */

class NavItem {

  TreePath    path;
  JTree       selectedTree;

  public String toString() {

    StringBuffer str = new StringBuffer();

    str.append(selectedTree.getName());
    str.append(":");
    if(path==null) {
      str.append("null");
    } else {
      for(int i=0;i items;
  int position;

  public NavManager(MainPanel invoker) {

    this.invoker = invoker;
    items = new Vector();
    position = 0;

  }

  public void reset() {

    items = new Vector();
    position = 0;

  }

  public void recordPath(JTree selectedTree) {
    NavItem item = new NavItem();
    item.selectedTree = selectedTree;
    item.path = selectedTree.getSelectionPath();
    for(int i=position+1;i0;
  }

  public boolean canGoForward() {
    return position" + items.get(i));
      } else {
        System.out.println("   " + items.get(i));
      }
    }
  }



}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy