Examples of IStorage


Examples of ch.sahits.game.openpatrician.model.building.IStorage

      ICity cityModel = city.getCity();
      y += (int)Math.rint(positions.titleHeigth*2/3);
     
     
      ITradingOffice office = city.getPlayer().findTradingOffice(cityModel);
      IStorage storage = office.getStorage();
     
      drawRow(g2d, y, positions.xNumbers, String.valueOf(office.getStored()/10));
      y += positions.lineHeight;

      drawRow(g2d, y, positions.xNumbers, String.valueOf(office.getCapacity()/10));
      y += positions.lineHeight;
     
      int additional = office.getStored()-office.getCapacity();
      if (additional<0) additional = 0;
      drawRow(g2d, y, positions.xNumbers, String.valueOf(additional/10));
      y += positions.lineHeight;
     
      drawRow(g2d, y, positions.xNumbers, String.valueOf(storage.getRentOutStorage()));
      y += positions.lineHeight;

      drawRow(g2d, y, positions.xNumbers, String.valueOf(storage.getCostsPerDay()));
      y += positions.lineHeight;
      y += positions.lineHeight;

      y += positions.lineHeight;
      y += positions.lineHeight;
     
      drawRow(g2d, y, positions.xNumbers, String.valueOf(storage.getNumberGuards()));
      y += positions.lineHeight;

      drawRow(g2d, y, positions.xNumbers, String.valueOf(storage.getGuardCostsPerDay()));
      y += positions.lineHeight;
     
      ELevel security = storage.getSecurityLevel(); // TODO externalize
      drawRow(g2d, y, positions.xNumbers, security.name());

    } catch (FontFormatException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here

Examples of ch.sahits.game.openpatrician.model.building.IStorage

    }


    @Override
    public void run() {
      IStorage storage = city.getPlayer().findTradingOffice(city.getCity()).getStorage();
      storage.updateGuardsNumber(guardNumberChange);
    }
View Full Code Here

Examples of com.semagia.atomico.server.storage.IStorage

     *
     * @return A {@link IModifiableStorage}.
     * @throws WebApplicationException If the storage is not modifiable.
     */
    protected IModifiableStorage getModifiableStorage() throws WebApplicationException {
        final IStorage storage = getStorage();
        if (!storage.isModifiable()) {
            throw new WebApplicationException(ResponseUtils.methodNotAllowed());
        }
        return (IModifiableStorage) storage;
    }
View Full Code Here

Examples of lupos.distributed.storage.IStorage

      return this.localStorage;
    }
    /*
     * new local storage
     */
    return (this.localStorage = new IStorage() {

      private BindingsFactory bindings = BindingsFactory.createBindingsFactory();

      @Override
      public void setBindingsFactory(final BindingsFactory bindingsFactory) {
View Full Code Here

Examples of lupos.distributed.storage.IStorage

        debugString += (String.format("Query Client: %s without subgraph submission \n",queryClientInstance));
      queryClientInstance.setUseSubgraphSubmission(useSubgraphSubmission);
      /*
       * if a local storage is supported, use this for subgraph executer
       */
      IStorage localStorage = (p2pInstance.hasLocalStorage()) ? p2pInstance.getLocalStorage(distribution) : storageInstance;
      sgExecuter.setStorage(localStorage);
      sgExecuter.setP2PNetwork(p2pInstance);
      /*
       * create an query evaluator for the local storage, which is evaluated in local storage
       */
 
View Full Code Here

Examples of org.eclipse.core.resources.IStorage

        String resourceName;
        if (resource != null) {
            resource.getWorkspace().addResourceChangeListener(this);
            resourceName = resource.getName();
        } else {
            IStorage storage = (IStorage) input.getAdapter(IStorage.class);
            if (storage != null) {
                resourceName = storage.getName();
            } else {
                resourceName = input.getName();
            }
        }
View Full Code Here

Examples of org.eclipse.core.resources.IStorage

        String resourceName;
        if (resource != null) {
            resource.getWorkspace().addResourceChangeListener(this);
            resourceName = resource.getName();
        } else {
            IStorage storage = (IStorage) input.getAdapter(IStorage.class);
            if (storage != null) {
                resourceName = storage.getName();
            } else {
                resourceName = input.getName();
            }
        }
View Full Code Here

Examples of org.eclipse.core.resources.IStorage

    private static String getPathForInput(final IEditorInput editorInput) {
        if (editorInput instanceof IStorageEditorInput) {
            final IStorageEditorInput sei = (IStorageEditorInput) editorInput;
            try {
                final IStorage storage = sei.getStorage();
                final IPath p = storage.getFullPath();
                return p.toPortableString();
            } catch (final CoreException e) {
            }
        }
        if (editorInput instanceof IURIEditorInput) {
View Full Code Here

Examples of org.eclipse.core.resources.IStorage

    private static String getEncodingForInput(final IEditorInput editorInput) {
        if (editorInput instanceof IStorageEditorInput) {
            final IStorageEditorInput sei = (IStorageEditorInput) editorInput;
            try {
                final IStorage storage = sei.getStorage();
                if (storage instanceof IEncodedStorage) {
                    final IEncodedStorage encodedStorage = (IEncodedStorage) storage;
                    return encodedStorage.getCharset();
                }
            } catch (final CoreException e) {
View Full Code Here

Examples of org.eclipse.core.resources.IStorage

            } catch (Throwable t) {
                DroolsEclipsePlugin.log(t);
            }
        } else if (input instanceof IStorageEditorInput) {
            try {
                IStorage storage = ((IStorageEditorInput) input).getStorage();
                setPartName(storage.getName());
                InputStream is = storage.getContents();
                createModel(is);
            } catch (Throwable t) {
                DroolsEclipsePlugin.log(t);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.