Codota Logo
CategoryTreeNode.getName
Code IndexAdd Codota to your IDE (free)

How to use
getName
method
in
slash.navigation.routes.impl.CategoryTreeNode

Best Java code snippets using slash.navigation.routes.impl.CategoryTreeNode.getName (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: cpesch/RouteConverter

public static List<String> asNames(List<CategoryTreeNode> categories) {
  List<String> names = new ArrayList<>(categories.size());
  for (CategoryTreeNode categoryTreeNode : categories) {
    names.add(categoryTreeNode.getName());
  }
  return names;
}
origin: cpesch/RouteConverter

  public CategoryTreeNode getChild(CategoryTreeNode parent, String name) {
    for (int i = 0; i < getChildCount(parent); i++) {
      CategoryTreeNode category = (CategoryTreeNode) getChild(parent, i);
      if (category.getName().equals(name))
        return category;
    }
    return null;
  }
}
origin: cpesch/RouteConverter

public static String toString(TreePath treePath) {
  StringBuilder buffer = new StringBuilder();
  for (Object pathElement : treePath.getPath()) {
    CategoryTreeNode treeNode = (CategoryTreeNode) pathElement;
    String nodeName = treeNode.getName();
    if (treeNode.isLocalRoot())
      buffer.append(LOCAL);
    else if (treeNode.isRemoteRoot())
      buffer.append(REMOTE);
    else if (nodeName != null)
      buffer.append("/").append(nodeName);
  }
  return buffer.toString();
}
origin: cpesch/RouteConverter

private static CategoryTreeNode getSubCategory(CategoryTreeNode node, String name) {
  for (int i = 0; i < node.getChildCount(); i++) {
    CategoryTreeNode child = (CategoryTreeNode) node.getChildAt(i);
    if (child.getName().equals(name) ||
        child.isLocalRoot() && LOCAL.equals(name) ||
        child.isRemoteRoot() && REMOTE.equals(name))
      return child;
  }
  return null;
}
origin: cpesch/RouteConverter

  public void run() throws IOException {
    for (int i = 0; i < categories.size(); i++) {
      CategoryTreeNode category = categories.get(i);
      CategoryTreeNode parent = parents.get(i);
      if (category.isLocal() && parent.isRemote())
        throw new IOException("cannot move local category " + category.getName() + " to remote parent " + parent.getName());
      if (category.isRemote() && parent.isLocal())
        throw new IOException("cannot move remote category " + category.getName() + " to local parent " + parent.getName());
      category.getCategory().update(parent.getCategory(), category.getCategory().getName());
    }
    invokeLater(new Runnable() {
      public void run() {
        for (int i = 0; i < categories.size(); i++) {
          CategoryTreeNode category = categories.get(i);
          CategoryTreeNode parent = parents.get(i);
          categoryTreeModel.removeNodeFromParent(category);
          categoryTreeModel.insertNodeInto(category, parent, 0);
        }
        if (invokeLaterRunnable != null)
          invokeLaterRunnable.run();
      }
    });
  }
});
origin: cpesch/RouteConverter

void renameCategory(CategoryTreeNode category, String newName, boolean trackUndo) {
  String oldName = category.getName();
  delegate.renameCategory(category, newName);
  if (trackUndo)
    undoManager.addEdit(new RenameCategory(this, category, oldName, newName));
}
origin: cpesch/RouteConverter

  public void run() {
    final CategoryTreeNode category = getSelectedCategoryTreeNode(tree);
    if (category == null)
      return;

    final String name = showInputDialog(WindowHelper.getFrame(),
        format(getBundle().getString("add-category-label"), category.getName()),
        WindowHelper.getFrame().getTitle(), QUESTION_MESSAGE);
    if (trim(name) == null)
      return;

    catalogModel.addCategories(singletonList(category), singletonList(name),
        new Runnable() {
          public void run() {
            selectCategory(tree, catalogModel.getCategoryTreeModel().getChild(category, name));
          }
        });
  }
}
origin: cpesch/RouteConverter

  public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
    JLabel label = (JLabel) super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
    if (value instanceof CategoryTreeNode) {
      CategoryTreeNode categoryTreeNode = (CategoryTreeNode) value;
      String name = categoryTreeNode.getName();
      if (name == null)
        name = RouteConverter.getBundle().getString("no-name");
      else if (categoryTreeNode.isRemoteRoot())
        name = RouteConverter.getBundle().getString("remote-catalog");

      label.setText(name);

      if (categoryTreeNode.isLocal())
        setClosedIcon(OPEN_ICON);
      else
        setClosedIcon(OPEN_REMOTE_ICON);
      setLeafIcon(getClosedIcon());

    } else
      label.setText(RouteConverter.getBundle().getString("loading"));
    return label;
  }
}
origin: cpesch/RouteConverter

  public void run() {
    CategoryTreeNode category = getSelectedCategoryTreeNode(tree);
    if(category == null)
      return;

    if(category.isLocalRoot() || category.isRemoteRoot()) {
      showMessageDialog(WindowHelper.getFrame(),
          getBundle().getString("rename-category-cannot-rename-root"), WindowHelper.getFrame().getTitle(),
          ERROR_MESSAGE);
      return;
    }

    String name = (String) showInputDialog(WindowHelper.getFrame(),
        format(getBundle().getString("rename-category-label"), category.getName()),
        WindowHelper.getFrame().getTitle(), QUESTION_MESSAGE, null, null, category.getName());
    if (trim(name) == null)
      return;

    catalogModel.renameCategory(category, name);
  }
}
origin: cpesch/RouteConverter

  public void run() throws IOException {
    for (int i = 0; i < routes.size(); i++) {
      RouteModel route = routes.get(i);
      CategoryTreeNode parent = parents.get(i);
      CategoryTreeNode category = route.getCategory();
      if (category.isLocal() && parent.isRemote())
        throw new IOException("cannot move local route " + route.getName() + " to remote parent " + parent.getName());
      if (category.isRemote() && parent.isLocal())
        throw new IOException("cannot move remote route " + route.getName() + " to local parent " + parent.getName());
      route.getRoute().update(parent.getCategory(), route.getDescription() != null ? route.getDescription() : route.getName());
    }
    invokeLater(new Runnable() {
      public void run() {
        for (CategoryTreeNode parent : parents) {
          setCurrentCategory(parent);
        }
        if (invokeLaterRunnable != null)
          invokeLaterRunnable.run();
      }
    });
  }
});
origin: cpesch/RouteConverter

categoryNames.append(category.getName());
if (i < categories.size() - 1)
  categoryNames.append(", ");
origin: cpesch/RouteConverter

getRootPane().setDefaultButton(buttonAdd);
labelLabel.setText(format(RouteConverter.getBundle().getString("add-url-label"), category.getName()));
textFieldDescription.setText(description);
textFieldUrl.setText(url);
origin: cpesch/RouteConverter

labelLabel.setText(format(RouteConverter.getBundle().getString("add-file-label"), categoryTreeNode.getName()));
textFieldFile.setText(createReadablePath(file));
if (length != null)
slash.navigation.routes.implCategoryTreeNodegetName

Popular methods of CategoryTreeNode

  • isLocal
  • isRemote
  • getCategory
  • getChildAt
  • getChildCount
  • getParent
  • getRoutes
  • isLocalRoot
  • isRemoteRoot

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • startActivity (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now