Tabnine Logo
ResourceUtils.getStream
Code IndexAdd Tabnine to your IDE (free)

How to use
getStream
method
in
com.nexitia.emaginplatform.jfx.core.api.ResourceUtils

Best Java code snippets using com.nexitia.emaginplatform.jfx.core.api.ResourceUtils.getStream (Showing top 6 results out of 315)

origin: com.nexitia.emaginplatform/emagin-core-api

 private static InputStream getFromStringContext(String path) {
  if(path.startsWith("classpath:")) {
   return getStream(path.split("classpath:")[1]);
  }
  return null;
 }
}
origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * Get the single instance of icon reolver. When first time loading, it will search for spring bean
 * nammed 'IconDefinitionFiles", and will load all files inside it.
 */
public static ModelIconUtils instance() {
 if (instance == null) {
  instance = (ModelIconUtils) Services.getBean("ModelIconUtils");
  List<String> iconDefinitionFiles = (List<String>) Services.getBean("IconDefinitionFiles");
  for (String definition : iconDefinitionFiles) {
   Properties definitionMapping = new Properties();
   try (InputStream is = ResourceUtils.getStream(ModelIconUtils.class, definition)) {
    definitionMapping.load(is);
    instance.iconMapping.putAll(definitionMapping);
   } catch (Exception ex) {
    ex.printStackTrace();
   }
  }
 }
 return instance;
}
origin: com.nexitia.emaginplatform/emagin-jfxcore-mobile-integration

 /**
  * Merge views definitions corresponding to this view. View must define at least one
  * wizardConfiguration.
  */
 @Override
 public VLViewConfigXML getConfigurationFile(final IEmaginController controller) {
  VLViewConfigXML finalResult = null;

  if(debug) {
   System.out.println("Searching for wiew : " + controller.getViewDefinitions().get(0));
  }

  String file = controller.getViewDefinitions().get(0);
  if(file.endsWith(".xml")) {
   throw new RuntimeException("Only Json configurration file is supported, given" + file);
  }

  if(debug) {
   System.out.println("### Searching for wiew : " + file);
  }

  Gson gson = new Gson();
  InputStream io = ResourceUtils.getStream(controller.getClass(), file);
  finalResult = gson.fromJson(new InputStreamReader(io), VLViewConfigXML.class);

  return finalResult;
 }
}
origin: com.nexitia.emaginplatform/emagin-jfxcore-mobile-integration

try(InputStream io = ResourceUtils.getStream(getClass(), coreAttributes)){
 Gson gson1 = new Gson();
 VLViewConfigXML c  = gson1.fromJson(new InputStreamReader(io), VLViewConfigXML.class);
try(InputStream io = ResourceUtils.getStream(getClass(), coreComp)){
 Gson gson = new Gson();
 VLViewConfigXML c = gson.fromJson(new InputStreamReader(io), VLViewConfigXML.class);
try(InputStream io = ResourceUtils.getStream(getClass(), coreActions)){
 Gson gson = new Gson();
 VLViewConfigXML c = gson.fromJson(new InputStreamReader(io), VLViewConfigXML.class);
try(InputStream io = ResourceUtils.getStream(getClass(), coreActionsModel)){
 Gson gson = new Gson();
 VLViewConfigXML c = gson.fromJson(new InputStreamReader(io), VLViewConfigXML.class);
origin: com.nexitia.emaginplatform/emagin-jfxcore-demoapp-components

/**
 * @{inheritedDoc}
 */
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
 NodeHelper.styleClassAddAll(this, configuration);
 try (InputStream is = ResourceUtils.getStream("/images/logo/EMAGIN_FX_WHITE.png")) {
  if(is != null) {
   final Image img = new Image(is, 200, 102, true, true);
   final ImageView imgView = new ImageView(img);
   // getChildren().add(imgView);
  }
 } catch (IOException e) {
  // e.printStackTrace();
 }
}
origin: com.nexitia.emaginplatform/emagin-jfxcore-demoapp-components

try (InputStream is = ResourceUtils.getStream("/images/logo/EMAGIN_FX_DEMOAPP_DARK.png")) {
 final Image img = new Image(is, 180, 180, true, true);
 final ImageView imgView = new ImageView(img);
com.nexitia.emaginplatform.jfx.core.apiResourceUtilsgetStream

Javadoc

Uses all possible methods to find out this resource.

Popular methods of ResourceUtils

  • getURL
    Get classpath url associated to resource with given path.
  • <init>
  • getFromStringContext

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JLabel (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • From CI to AI: The AI layer in your organization
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