congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ModelsLibraryService
Code IndexAdd Tabnine to your IDE (free)

How to use
ModelsLibraryService
in
kendzi.kendzi3d.models.library.service

Best Java code snippets using kendzi.kendzi3d.models.library.service.ModelsLibraryService (Showing top 13 results out of 315)

origin: kendzi/kendzi3d

public List<NodeModel> findNodeModels(String fileKey) {
  if (GLOBAL.equals(fileKey)) {
    return findAllNodeModels();
  }
  return modelLibrary.get(fileKey).getNodeModel();
}
origin: kendzi/kendzi3d

/**
 * Initialize layer.
 */
public void init() {
  modelsLibraryService.removePointModelDataChangeListener(this);
  modelsLibraryService.addPointModelDataChangeListener(this);
  loadData();
}
origin: kendzi/kendzi3d

@Override
protected void onAddResourceFile() {
  final JFileChooser fc = new JFileChooser();
  fc.addChoosableFileFilter(new ModelLibraryFilter());
  fc.setAcceptAllFileFilterUsed(false);
  if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
    File selectedFile = fc.getSelectedFile();
    if (selectedFile != null) {
      String path = selectedFile.getAbsoluteFile().toURI().toString();
      this.modelsLibraryService.addResourcesPath(path);
      loadTableData();
    }
  }
}
origin: kendzi/kendzi3d

private void loadData() {
  List<NodeModelConf> nodeModelsList = new ArrayList<NodeModelConf>();
  for (String configurationFile : modelsLibraryService.findAllConfigurationFiles()) {
    List<NodeModel> nodeModels = modelsLibraryService.findAllNodeModels(configurationFile);
  for (String configurationFile : modelsLibraryService.findAllConfigurationFiles()) {
    List<WayNodeModel> wayNodeModels = modelsLibraryService.findAllWayNodeModels(configurationFile);
    for (WayNodeModel nodeModel : wayNodeModels) {
      try {
origin: kendzi/kendzi3d

  @Override
  public void run() {
    try {
      ResourceService urlReciverService = new UrlReciverServiceTest();
      ModelsLibraryService pms = new ModelsLibraryService(urlReciverService, new LibraryResourcesMemoryDao());
      pms.init();
      ModelLibraryResourcesListFrameAction frame = new ModelLibraryResourcesListFrameAction(pms);
      frame.loadTableData();
      frame.setVisible(true);
    } catch (Exception e) {
      log.error(e);
    }
  }
});
origin: kendzi/kendzi3d

  public void setDefaultResourcesPaths() {
    libraryResourcesDao.setDefaultResourcesPaths();

    firePointModelDataChange();
  }
}
origin: kendzi/kendzi3d

public void loadTableData() {
  List<NodeModel> all = this.modelsLibraryService.findNodeModels(fileKey);
  this.dataModel.setData(all);
}
origin: kendzi/kendzi3d

  @Override
  public void actionPerformed(ActionEvent pE) {

    modelsLibraryService.clear();

    textureLibraryStorageService.reload();

    textureCacheService.clear();

    modelCacheService.clear();

    modelsLibraryLayer.cleanUp();
  }
}
origin: kendzi/kendzi3d

@Override
protected void dictAction() {
  LocalModelsDictAction frame = new LocalModelsDictAction();
  frame.setUrlReciverService(modelsLibraryService.getUrlReciverService());
  frame.setModal(true);
  frame.initUi();
  frame.setVisible(true);
  if (frame.getModel() != null) {
    txtModel.setText(frame.getModel());
  }
}
origin: kendzi/kendzi3d

  @Override
  public void run() {
    try {
      NodeModelListFrameAction frame = new NodeModelListFrameAction();
      ResourceService urlReciverService = new UrlReciverServiceTest();
      ModelsLibraryService temp = new ModelsLibraryService(urlReciverService, new LibraryResourcesMemoryDao());
      temp.init();
      frame.setNodeModelService(temp);
      frame.loadTableData();
      frame.setVisible(true);
    } catch (Exception e) {
      log.error(e);
    }
  }
});
origin: kendzi/kendzi3d

public void removeResourcesPath(String path) {
  List<String> paths = libraryResourcesDao.loadResourcesPath();
  paths.remove(path);
  libraryResourcesDao.saveResourcesPath(paths);
  firePointModelDataChange();
}
origin: kendzi/kendzi3d

public void addResourcesPath(String path) {
  List<String> paths = libraryResourcesDao.loadResourcesPath();
  paths.add(path);
  libraryResourcesDao.saveResourcesPath(paths);
  firePointModelDataChange();
}
origin: kendzi/kendzi3d

@Override
protected void onAddResourceUrl() {
  String ret = (String) JOptionPane.showInputDialog(this, "Enter url for models library", "Add URL resource",
      JOptionPane.PLAIN_MESSAGE, null, null, "http://foo.com/modelLibrary.xml");
  if (!StringUtil.isBlankOrNull(ret)) {
    URL url;
    try {
      url = new URL(ret);
      this.modelsLibraryService.addResourcesPath(url.toString());
      loadTableData();
    } catch (MalformedURLException e) {
      throw new RuntimeException(e);
    }
  }
}
kendzi.kendzi3d.models.library.serviceModelsLibraryService

Most used methods

  • findAllNodeModels
  • <init>
    Constructor.
  • addPointModelDataChangeListener
  • addResourcesPath
  • clear
    Clear all cache data and reload configuration.
  • findAllConfigurationFiles
  • findAllWayNodeModels
  • findNodeModels
  • firePointModelDataChange
  • getUrlReciverService
  • init
    Initialize.
  • loadResourcesPath
  • init,
  • loadResourcesPath,
  • removePointModelDataChangeListener,
  • removeResourcesPath,
  • saveModelLibrary,
  • setDefaultResourcesPaths

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Best plugins for Eclipse
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