Package de.sciss.meloncillo.util

Examples of de.sciss.meloncillo.util.MapManager$Listener


  {
    super.init();
   
//    final NumberSpace  spcCoord  = new NumberSpace( 0.0, 1.0, 0.0001, 0.5, 0.1 );
    final NumberSpace  spcCoord  = new NumberSpace( 0.0, 2.0, 0.0, 0, 4, 0.5 );
    final MapManager  map      = getMap();

    map.putContext( null, MAP_KEY_WIDTH, new MapManager.ContextMapManager.Context.FLAG_OBSERVER_DISPLAY |
                                    MapManager.Context.FLAG_VISUAL,
                                    MapManager.Context.TYPE_DOUBLE, spcCoord, "labelW",
                                    null, new Double( 1.0 )));
    map.putContext( null, MAP_KEY_HEIGHT, new MapManager.Context( MapManager.Context.FLAG_OBSERVER_DISPLAY |
                                    MapManager.Context.FLAG_VISUAL,
                                    MapManager.Context.TYPE_DOUBLE, spcCoord, "labelH",
                                    null, new Double( 1.0 )));
  }
View Full Code Here


   
//    final NumberSpace  spcDiam    = new NumberSpace( 0.0, 1.0, 0.0001, 0.5, 0.1 );
    final NumberSpace  spcDiam    = new NumberSpace( 0.0, 2.0, 0, 0, 4, 0.5 );
//    final NumberSpace  spcArc    = new NumberSpace( -360.0, 360.0, 0.0001, 0.0, 0.1 );
    final NumberSpace  spcArc    = new NumberSpace( -360.0, 360.0, 0.0, 0, 4, 0.1 );
    final MapManager  map      = getMap();

    map.putContext( null, MAP_KEY_INNERDIAM, new MapManager.ContextMapManager.Context.FLAG_OBSERVER_DISPLAY |
                                      MapManager.Context.FLAG_VISUAL,
                                      MapManager.Context.TYPE_DOUBLE, spcDiam,
                                      "labelInnerDiam", null, new Double( 0.5 )));
    map.putContext( null, MAP_KEY_OUTERDIAM, new MapManager.ContextMapManager.Context.FLAG_OBSERVER_DISPLAY |
                                      MapManager.Context.FLAG_VISUAL,
                                      MapManager.Context.TYPE_DOUBLE, spcDiam,
                                      "labelOuterDiam", null, new Double( 1.5 )));
    map.putContext( null, MAP_KEY_ANGLESTART, new MapManager.Context( MapManager.Context.FLAG_OBSERVER_DISPLAY |
                                      MapManager.Context.FLAG_VISUAL,
                                      MapManager.Context.TYPE_DOUBLE, spcArc,
                                      "labelAngleStart", null, new Double( 0.0 )));
    map.putContext( null, MAP_KEY_ANGLEEXTENT, new MapManager.Context(MapManager.Context.FLAG_OBSERVER_DISPLAY |
                                      MapManager.Context.FLAG_VISUAL,
                                      MapManager.Context.TYPE_DOUBLE, spcArc,
                                      "labelAngleExtent", null, new Double( 90.0 )));
  }
View Full Code Here

  {
    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

 
  // 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

      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

    }
  }

  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

  {
    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

         private final boolean hidePrivate = vizState.hidePrivate(), hideMeta = vizState.hideMeta();
         {
            do_start();
            setRootVisible(false);
            setShowsRootHandles(false);
            listeners.add(new Listener() {
               public Object do_action(Object sender, Event event) { return null; }
               public Object do_action(Object sender, Event event, Object arg) { zoom(arg); return null; }
            });
         }
         @Override public String convertValueToText(Object value, boolean sel, boolean expand, boolean leaf, int i, boolean focus) {
View Full Code Here

        final XMLBeansModel model = new XMLBeansModel(Factory.parse(is).getJbossesb());
       
        final List<Listener> awareListeners = model.getESBAwareListeners() ;
        assertEquals("Listener count", 1, awareListeners.size()) ;
       
        final Listener listener = awareListeners.get(0) ;
        assertTrue("JmsListener", listener instanceof JmsListener) ;
       
        final Document doc = YADOMUtil.createDocument() ;
        final Element root = doc.createElement("root") ;
        final Element listenerElement = JmsListenerMapper.map(root, (JmsListener)listener, model) ;
View Full Code Here

    JmsMessageFilter listenerDestination = awareListener.getJmsMessageFilter();
    assertEquals("queue/B", listenerDestination.getDestName());
    assertEquals(JmsMessageFilter.DestType.TOPIC, listenerDestination.getDestType());
    assertEquals("service='Reconciliation'", listenerDestination.getSelector());

    Listener untypedAwareListener = awareListeners.get(1);
    assertEquals("Bank-Listener-Generic", untypedAwareListener.getName());
    assertEquals("my-generic-bus", untypedAwareListener.getBusidref());
    assertTrue(!untypedAwareListener.getIsGateway());

    Service gatewayService = model.getService(gatewayListener);
    Service awareService = model.getService(awareListener);
    assertSame(gatewayService, awareService);
    assertEquals("Bank", awareService.getCategory());
View Full Code Here

TOP

Related Classes of de.sciss.meloncillo.util.MapManager$Listener

Copyright © 2018 www.massapicom. 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.