congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • BoxLayout (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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