Examples of MapManager


Examples of de.sciss.meloncillo.util.MapManager

  {
    super.init();
   
//    final NumberSpace    spcCoord  = new NumberSpace( 0.0, 1.0, 0.0001, 0.5, 0.1 );
    final NumberSpace    spcCoord  = new NumberSpace( -1.0, 1.0, 0.0, 0, 4, 0.5 );
    final MapManager    map      = getMap();
   
    map.putContext( null, MAP_KEY_X, new MapManager.Context( MapManager.Context.FLAG_OBSERVER_DISPLAY |
                                 MapManager.Context.FLAG_VISUAL,
                                 MapManager.Context.TYPE_DOUBLE, spcCoord, "labelX",
                                 null, new Double( 0.0 )));
    map.putContext( null, MAP_KEY_Y, new MapManager.Context( MapManager.Context.FLAG_OBSERVER_DISPLAY |
                                 MapManager.Context.FLAG_VISUAL,
                                 MapManager.Context.TYPE_DOUBLE, spcCoord, "labelY",
                                 null, new Double( 0.0 )));
  }
View Full Code Here

Examples of de.sciss.meloncillo.util.MapManager

 
  // sync: to be called with sync on 'sync' and on doors
  // this method invokes model.fireTableDataChanged()
  private void updateKeysAndContexts()
  {
    MapManager      map;
    Object        o;
    MapManager.Context  c;
    SessionObject    so;

    if( isEditing() ) editor.cancelCellEditing();

    keys.clear();
    contexts.clear();
    if( !collObjects.isEmpty() ) {
      so  = (SessionObject) collObjects.get( 0 );
      map  = so.getMap();
      keys.addAll( map.keySet( MapManager.Context.FLAG_OBSERVER_DISPLAY,
                   MapManager.Context.NONE_EXCLUSIVE ));

      for( int i = keys.size() - 1; i >= 0 ; i-- ) {
        o  = keys.get( i );
        c  = map.getContext( o.toString() );
        contexts.put( o, c );
        // remove fields that belong to inactive plug-ins
        if( (c.dynamic != null) &&
          (PlugInManager.getInstance().getValue( c.dynamic.toString() ) == null) ) {
          keys.remove( o );
        }
      }
    }
    for( int i = 1; i < collObjects.size(); i++ ) {
      so  = (SessionObject) collObjects.get( i )// only common fields are displayed
      map  = so.getMap();
      keys.retainAll( map.keySet( MapManager.Context.FLAG_OBSERVER_DISPLAY,
                    MapManager.Context.NONE_EXCLUSIVE ));
    }
    model.fireTableDataChanged();
  }
View Full Code Here

Examples of de.sciss.meloncillo.util.MapManager

      if( (doc == null) || (col != 1) || (value == null) ) return;
   
      if( row >= keys.size() ) return;

      SessionObject      so;
      MapManager        map;
      final String      key    = keys.get( row ).toString();
      boolean          addEdit  = false;
      AbstractCompoundEdit  edit  = new BasicCompoundEdit();

      for( int i = 0; i < collObjects.size(); i++ ) {
        so  = (SessionObject) collObjects.get( i );
        map = so.getMap();
        if( map.containsKey( key )) {
          edit.addPerform( new EditPutMapValue( SessionObjectTable.this, map, key, value ));
          addEdit = true;
        }
      }
      if( addEdit ) {
View Full Code Here

Examples of de.sciss.meloncillo.util.MapManager

    }
  }

  private void sessionObjectToLispHash( SessionObject so, LispHashTable h )
  {
    MapManager      m    = so.getMap();
    Iterator      iter  = m.keySet( MapManager.Context.ALL_INCLUSIVE, MapManager.Context.NONE_EXCLUSIVE ).iterator();
    String        key;
    Object        value;
    MapManager.Context  c;
    LispValue      lispValue;
 
    h.setf_gethash( jatha.makeString( "NAME" ), jatha.makeString( so.getName() ));
    while( iter.hasNext() ) {
      key    = iter.next().toString();
      c    = m.getContext( key );
      if( c == null ) continue;
      value  = m.getValue( key );
      switch( c.type ) {
      case MapManager.Context.TYPE_INTEGER:
        lispValue  = jatha.makeInteger( ((Number) value).intValue() );
        break;
      case MapManager.Context.TYPE_LONG:
View Full Code Here

Examples of de.sciss.meloncillo.util.MapManager

  {
    super();

    this.doc    = doc;
   
    final MapManager map = getMap();

    map.putContext( this, MAP_KEY_RATE, new MapManager.Context( 0, MapManager.Context.TYPE_DOUBLE, null, null, null,
                                  new Double( 1000 )));
    map.putContext( this, MAP_KEY_LENGTH, new MapManager.Context( 0, MapManager.Context.TYPE_LONG, null, null, null,
                                    new Long( 0 )));
    map.putContext( this, MAP_KEY_POSITION, new MapManager.Context( 0, MapManager.Context.TYPE_LONG, null, null, null,
                                    new Long( 0 )));

//    osc  = new OSCRouterWrapper( doc, this );

    clear( this );
View Full Code Here

Examples of manager.MapManager

    super();
    this.playerManager = new PlayerManager();
    this.baseManager = new BaseManager();
    this.agentManager = new AgentManager();
    this.towerManager = new TowerManager();
    this.mapManager = new MapManager();
    this.running = true;
  }
View Full Code Here

Examples of manager.MapManager

      case 9:
      case 2:
        // Je veux poser une tour sur une de mes zones : je regarde et retiens tous les endroits disponibles
       
        LinkedList<Integer[]> availableAreas = new LinkedList<Integer[]>();
        MapManager mapManager = Game.getInstance().getMapManager();
       
        for(int j=0; j < mapManager.getHeightMap(); ++j) {
          for(int i=0; i < mapManager.getHeightMap(); ++i) {
           
            int numArea = mapManager.getMap()[i][j];
           
            if(numArea >= 0 && numArea < Game.getInstance().getBaseManager().getBases().size()) {
              Base baseArea = Game.getInstance().getBaseManager().getBases().get(numArea);
              // si la zone est disponible pour moi je l'ajoute à la liste
              if (this.equals(baseArea.getPlayer())) {
                Integer[] position = {i, j};
                availableAreas.add(position);
              }
            }
          }
        }
       
        // si on a trouvé au moins une zone disponible on en prend une au hasard et on construit la base dessus (si l'argent le permet)
        if (availableAreas.size() != 0) {
          int randIndex = rand.nextInt(availableAreas.size());
          int randX = (availableAreas.get(randIndex)[0] * AppliWindow.getInstance().getWidth()) / mapManager.getWidthMap();
          int randY = (availableAreas.get(randIndex)[1] * AppliWindow.getInstance().getHeight()) / mapManager.getHeightMap();
         
          this.buyTower(this, "GunTower", randX, randY);
        }
       
        break;
View Full Code Here

Examples of net.ftb.tools.MapManager

        mapInstall.setVisible(false);
        mapInstall.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed (ActionEvent arg0) {
                if (mapsPane.mapPanels.size() > 0 && getSelectedMapIndex() >= 0) {
                    MapManager man = new MapManager(new JFrame(), true);
                    man.setVisible(true);
                    MapManager.cleanUp();
                }
            }
        });

        mapInstallLocation = new JComboBox();
        mapInstallLocation.setBounds(480, 20, 160, 30);
        mapInstallLocation.setToolTipText("Install to...");
        mapInstallLocation.setVisible(false);

        serverMap.setBounds(480, 20, 330, 30);
        serverMap.setText(I18N.getLocaleString("DOWNLOAD_MAP_SERVER"));
        serverMap.setVisible(false);
        serverMap.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed (ActionEvent event) {
                if (mapsPane.mapPanels.size() > 0 && getSelectedMapIndex() >= 0) {
                    OSUtils.browse(DownloadUtils.getCreeperhostLink("maps/" + Map.getMap(LaunchFrame.getSelectedMapIndex()).getMapName() + "/"
                            + Map.getMap(LaunchFrame.getSelectedMapIndex()).getVersion() + "/" + Map.getMap(LaunchFrame.getSelectedMapIndex()).getUrl()));
                }
            }
        });

        tpInstall.setBounds(650, 20, 160, 30);
        tpInstall.setText(I18N.getLocaleString("INSTALL_TEXTUREPACK"));
        tpInstall.setVisible(false);
        tpInstall.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed (ActionEvent arg0) {
                if (tpPane.texturePackPanels.size() > 0 && getSelectedTexturePackIndex() >= 0) {
                    TextureManager man = new TextureManager(new JFrame(), true);
                    man.setVisible(true);
                }
            }
        });

        tpInstallLocation = new JComboBox();
View Full Code Here

Examples of org.apache.tools.moo.jsp.MapManager

    //maps is a hashtable from client test (key) to server test (value)
    private static MapManager map = null;
   
    public static MapManager getMapManager() {
  if (map == null)
      map = new MapManager();
  return map;
    }
View Full Code Here

Examples of org.apache.tools.moo.jsp.MapManager

    //maps is a hashtable from client test (key) to server test (value)
    private static MapManager map = null;
   
    public static MapManager getMapManager() {
  if (map == null)
      map = new MapManager();
  return map;
    }
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.