Tabnine Logo
RouteModel.getRoute
Code IndexAdd Tabnine to your IDE (free)

How to use
getRoute
method
in
slash.navigation.routes.impl.RouteModel

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

origin: cpesch/RouteConverter

public String getName() {
  try {
    return getRoute().getName();
  } catch (Exception e) {
    log.severe("Cannot get name: " + e);
    return "?";
  }
}
origin: cpesch/RouteConverter

public String getDescription() {
  try {
    return getRoute().getDescription();
  } catch (Exception e) {
    log.severe("Cannot get description: " + e);
    return "?";
  }
}
origin: cpesch/RouteConverter

public String getUrl() {
  try {
    return getRoute().getUrl();
  } catch (Exception e) {
    log.severe("Cannot get URL: " + e);
    return "?";
  }
}
origin: cpesch/RouteConverter

public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  RouteModel that = (RouteModel) o;
  return Objects.equals(getCategory(), that.getCategory()) &&
      Objects.equals(getRoute(), that.getRoute());
}
origin: cpesch/RouteConverter

  public void run() throws IOException {
    for (final RouteModel route : routes) {
      route.getRoute().delete();
      invokeLater(new Runnable() {
        public void run() {
          routesTableModel.deleteRoute(route);
        }
      });
    }
  }
});
origin: cpesch/RouteConverter

  public int hashCode() {
    return Objects.hash(getCategory(), getRoute());
  }
}
origin: cpesch/RouteConverter

public static void selectRoute(JTable table, RouteModel route) {
  // search for RouteModel with same Route (Category might be different due to move)
  RoutesTableModel model = (RoutesTableModel) table.getModel();
  for(int i = 0; i < model.getRowCount(); i++) {
    if(model.getRoute(i).getRoute().equals(route.getRoute())) {
      scrollToPosition(table, i);
      table.getSelectionModel().addSelectionInterval(i, i);
      break;
    }
  }
}
origin: cpesch/RouteConverter

public static String formatCreator(RouteModel route) {
  String creator;
  try {
    creator = route.getRoute().getCreator();
    if (creator == null)
      creator = RouteConverter.getBundle().getString("no-creator");
  } catch (Exception e) {
    creator = RouteConverter.getBundle().getString("loading");
  }
  return creator;
}
origin: cpesch/RouteConverter

public static String formatDescription(RouteModel route) {
  String description = "";
  try {
    description = route.getRoute().getDescription();
    if(description == null)
      formatName(route);
  } catch (Exception e) {
    // intentionally left empty
  }
  return description;
}
origin: cpesch/RouteConverter

public DeleteRoutes(UndoCatalogModel catalogModel, List<RouteModel> routes) {
  this.catalogModel = catalogModel;
  this.routes = routes;
  for (RouteModel route : routes) {
    categories.add(route.getCategory());
    descriptions.add(route.getDescription() != null ? route.getDescription() : route.getName());
    try {
      files.add(route.getRoute().getUrl());
    } catch (IOException e) {
      files.add(null);
    }
    urls.add(route.getRoute().getHref());
  }
}
origin: cpesch/RouteConverter

  public void run() throws IOException {
    route.getRoute().update(route.getCategory().getCategory(), name);
    invokeLater(new Runnable() {
      public void run() {
        routesTableModel.updateRoute(route);
        if (invokeLaterRunnable != null)
          invokeLaterRunnable.run();
      }
    });
  }
});
origin: cpesch/RouteConverter

private void openRoute() {
  int[] selectedRows = tableRoutes.getSelectedRows();
  if (selectedRows.length == 0)
    return;
  RouteModel route = getRoutesListModel().getRoute(selectedRows[0]);
  URL url;
  try {
    String urlString = route.getRoute().getUrl();
    if (urlString == null)
      return;
    url = new URL(urlString);
  } catch (Throwable t) {
    getOperator().handleServiceError(t);
    return;
  }
  RouteConverter.getInstance().openPositionList(singletonList(url), false);
}
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();
      }
    });
  }
});
slash.navigation.routes.implRouteModelgetRoute

Popular methods of RouteModel

  • getCategory
  • <init>
  • getDescription
  • getName
  • getUrl

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now