Package de.sciss.gui

Examples of de.sciss.gui.ParamField$Event


      Event[] events = history.getLatestPage();

      System.out.println("Events In the latestPage are : ");
      for (int i = 0; i < events.length; i++)
      {
        Event anEvent = events[i];
        System.out.println("Event: " + anEvent.getClass().getName()
            + "  FullFormattedMessage: "
            + anEvent.getFullFormattedMessage());
      }
    } catch (Exception e)
    {
      System.out.println("Caught Exception : " + " Name : "
          + e.getClass().getName() + " Message : " + e.getMessage()
View Full Code Here


                {
                    ArrayOfEvent aoe = (ArrayOfEvent) value;
                    Event[] evts = aoe.getEvent();
                    for (int evtID = 0; evtID < evts.length; ++evtID)
                    {
                        Event anEvent = evts[evtID];
                        System.out.println("\n----------" + "\n Event ID: "
                                + anEvent.getKey() + "\n Event: "
                                + anEvent.getClass().getName()
                                + "\n FullFormattedMessage: "
                                + anEvent.getFullFormattedMessage()
                                + "\n VM Reference: "
                                + anEvent.getVm().getVm().get_value()
                                + "\n----------\n");
                    }
                } else if (value instanceof VmEvent)
                {
                    VmEvent anEvent = (VmEvent) value;
                    System.out.println("\n----------" + "\n Event ID: "
                            + anEvent.getKey() + "\n Event: "
                            + anEvent.getClass().getName()
                            + "\n FullFormattedMessage: "
                            + anEvent.getFullFormattedMessage()
                            + "\n VM Reference: "
                            + anEvent.getVm().getVm().get_value()
                            + "\n----------\n");
                }
                System.out.println("===============");
            }
        }
View Full Code Here

        evtMgr.createCollectorForEvents(eventFilter);
      Event[] events = ehc.getLatestPage();

      for (int i = 0; i < events.length; i++)
      {
        Event anEvent = events[i];
        System.out.println("Event: " +
            anEvent.getClass().getName());
      }
    }
    si.getServerConnection().logout();
  }
View Full Code Here

    ServiceInstance si = new ServiceInstance(
        new URL(args[0]), args[1], args[2], true);

    // get the latest event and print it out
    EventManager evtMgr = si.getEventManager();
    Event latestEvent = evtMgr.getLatestEvent();
    printEvent(latestEvent);

    // create a filter spec for querying events
    EventFilterSpec efs = new EventFilterSpec();
    // limit to only error and warning
View Full Code Here

    p3.gridAdd( new JLabel( getResourceString( "labelName" )), 0, 0 );
    lbName    = new JLabel();
    p3.gridAdd( lbName, 1, 0 );
   
    p3.gridAdd( new JLabel( getResourceString( "labelSampleRate" )), 0, 1 );
    ggRate    = new ParamField();
    ggRate.addSpace( ParamSpace.spcFreqHertz.reshape( 0.01, Double.POSITIVE_INFINITY, 44100.0 ));
    ggRate.addListener( this );
    p3.gridAdd( ggRate, 1, 1 );
   
    ggComment  = new JTextArea( 4, 24 );
View Full Code Here

    {
      final int          result;
      final Param          positionSmps;
      final Box          msgPane;
      final DefaultUnitTranslator  timeTrans;
      final ParamField      ggPosition;
//      final JComboBox        ggPosCombo;
      final Application      app  = AbstractApplication.getApplication();
     
      msgPane      = Box.createVerticalBox();
      // XXX sync
      timeTrans    = new DefaultUnitTranslator();
      ggPosition    = new ParamField( timeTrans );
      ggPosition.addSpace( ParamSpace.spcTimeHHMMSS );
      ggPosition.addSpace( ParamSpace.spcTimeSmps );
      ggPosition.addSpace( ParamSpace.spcTimeMillis );
      ggPosition.addSpace( ParamSpace.spcTimePercentF );
      timeTrans.setLengthAndRate( doc.timeline.getLength(), doc.timeline.getRate() )// XXX sync
      if( value != null ) {
        ggPosition.setSpace( space );
        ggPosition.setValue( value );
      }
//      ggPosition.setValue( position );
//      lbCurrentTime  = new TimeLabel( new Color( 0xE0, 0xE0, 0xE0 ));

//      ggPosition.setBorder( new ComboBoxEditorBorder() );
//      ggPosCombo = new JComboBox();
//      ggPosCombo.setEditor( ggPosition );
//      ggPosCombo.setEditable( true );

//      msgPane.gridAdd( ggPosCombo, 0, 1, -1, 1 );
      msgPane.add( Box.createVerticalGlue() );
//      msgPane.add( ggPosCombo );
JButton ggCurrent = new JButton( app.getResourceString( "buttonSetCurrent" ))// "Current"
ggCurrent.setFocusable( false );
//JLabel lbArrow = new JLabel( "\u2193" );  // "\u2939"
//Box b = Box.createHorizontalBox();
//b.add( lbArrow );
//b.add( ggCurrent );
ggCurrent.addActionListener( new ActionListener() {
  public void actionPerformed( ActionEvent ae )
  {
    final long pos = transport.isRunning() ? transport.getCurrentFrame() : doc.timeline.getPosition();
    ggPosition.setValue( new Param( pos, ParamSpace.TIME | ParamSpace.SMPS ))// XXX sync
    ggPosition.requestFocusInWindow();
  }
});
//msgPane.add( b );
msgPane.add( ggCurrent );
      msgPane.add( ggPosition );
      msgPane.add( Box.createVerticalGlue() );
     
      GUIUtil.setInitialDialogFocus( ggPosition );
     
//      ggPosCombo.removeAllItems();
//      // XXX sync
//      ggPosCombo.addItem( new StringItem( new Param( doc.timeline.getPosition() / doc.timeline.getRate(), ParamSpace.TIME | ParamSpace.SECS | ParamSpace.HHMMSS ).toString(), "Current" ));

      final JOptionPane op = new JOptionPane( msgPane, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION );
//      result = JOptionPane.showOptionDialog( BasicWindowHandler.getWindowAncestor( lbTime ), msgPane,
//        app.getResourceString( "inputDlgGoToTime" ),
//        JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null );
      result = BasicWindowHandler.showDialog( op, BasicWindowHandler.getWindowAncestor( lbTime ), app.getResourceString( "inputDlgGoToTime" ));
     
      if( result == JOptionPane.OK_OPTION ) {
        value      = ggPosition.getValue();
        space      = ggPosition.getSpace();
        positionSmps  = timeTrans.translate( value, ParamSpace.spcTimeSmps );
        doc.timeline.editPosition( this,
          Math.max( 0, Math.min( doc.timeline.getLength(),
          (long) positionSmps.val )));
      }
View Full Code Here

    timeTrans    = new DefaultUnitTranslator();
   
    p        = new SpringPanel( 4, 2, 4, 2 );
    lb        = new JLabel( app.getResourceString( "observerStart" ), RIGHT );
    p.gridAdd( lb, 1, 0 );
    ggTimelineStart  = new ParamField( timeTrans );
    ggTimelineStart.addSpace( ParamSpace.spcTimeHHMMSS );
    ggTimelineStart.addSpace( ParamSpace.spcTimeSmps );
    ggTimelineStart.addSpace( ParamSpace.spcTimeMillis );
    ggTimelineStart.addSpace( ParamSpace.spcTimePercentR );
    ggTimelineStart.addListener( this );
    p.gridAdd( ggTimelineStart, 2, 0 );
    lb.setLabelFor( ggTimelineStart );
   
    ggLockStop    = new LockButton( true );
    ggLockStop.addActionListener( this );
    p.gridAdd( ggLockStop, 0, 1 );
    lb        = new JLabel( app.getResourceString( "observerStop" ), RIGHT );
    p.gridAdd( lb, 1, 1 );
    ggTimelineStop  = new ParamField( timeTrans );
    ggTimelineStop.addSpace( ParamSpace.spcTimeHHMMSS );
    ggTimelineStop.addSpace( ParamSpace.spcTimeSmps );
    ggTimelineStop.addSpace( ParamSpace.spcTimeMillis );
    ggTimelineStop.addSpace( ParamSpace.spcTimePercentR );
    ggTimelineStop.addListener( this );
    p.gridAdd( ggTimelineStop, 2, 1 );
    lb.setLabelFor( ggTimelineStop );

    ggLockLen    = new LockButton( true );
    ggLockLen.addActionListener( this );
    p.gridAdd( ggLockLen, 0, 2 );
    lb        = new JLabel( app.getResourceString( "observerLen" ), RIGHT );
    p.gridAdd( lb, 1, 2 );
    ggTimelineLen  = new ParamField( timeTrans );
    ggTimelineLen.addSpace( ParamSpace.spcTimeHHMMSS );
    ggTimelineLen.addSpace( ParamSpace.spcTimeSmps );
    ggTimelineLen.addSpace( ParamSpace.spcTimeMillis );
    ggTimelineLen.addSpace( ParamSpace.spcTimePercentR );
    ggTimelineLen.addListener( this );
View Full Code Here

   
    private void perform()
    {
      final SpringPanel      msgPane;
      final int          result;
      final ParamField      ggDuration;
      final Param          durationSmps;
      final DefaultUnitTranslator  timeTrans;
     
      msgPane      = new SpringPanel( 4, 2, 4, 2 );
      timeTrans    = new DefaultUnitTranslator();
      ggDuration    = new ParamField( timeTrans );
      ggDuration.addSpace( ParamSpace.spcTimeHHMMSS );
      ggDuration.addSpace( ParamSpace.spcTimeSmps );
      ggDuration.addSpace( ParamSpace.spcTimeMillis );
      ggDuration.addSpace( ParamSpace.spcTimePercentF );
      msgPane.gridAdd( ggDuration, 0, 0 );
      msgPane.makeCompactGrid();
      GUIUtil.setInitialDialogFocus( ggDuration );

      timeTrans.setLengthAndRate( timeline.getLength(), timeline.getRate() );

      if( value == null ) {
        ggDuration.setValue( new Param( 1.0, ParamSpace.TIME | ParamSpace.SECS ));
      } else {
        ggDuration.setSpace( space );
        ggDuration.setValue( value );
      }

      final JOptionPane op = new JOptionPane( msgPane, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION );
//      result = JOptionPane.showOptionDialog( getFrame() == null ? null : getFrame().getWindow(), msgPane, getValue( NAME ).toString(),
//        JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null );
      result = BasicWindowHandler.showDialog( op, getFrame() == null ? null : getFrame().getWindow(), getValue( NAME ).toString() );

      if( result == JOptionPane.OK_OPTION ) {
        value      = ggDuration.getValue();
        space      = ggDuration.getSpace();
        durationSmps  = timeTrans.translate( value, ParamSpace.spcTimeSmps );
        if( durationSmps.val > 0.0 ) {
          final ProcessingThread proc;
         
          proc = initiate( timeline.getPosition(), (long) durationSmps.val );
View Full Code Here

        }
      });

      // XXX sync
      timeTrans    = new DefaultUnitTranslator();
      ggMarkPos    = new ParamField( timeTrans );
      ggMarkPos.addSpace( ParamSpace.spcTimeHHMMSS );
      ggMarkPos.addSpace( ParamSpace.spcTimeSmps );
      ggMarkPos.addSpace( ParamSpace.spcTimeMillis );
      ggMarkPos.addSpace( ParamSpace.spcTimePercentF );
View Full Code Here

    timeTrans    = new DefaultUnitTranslator();
   
    p        = new SpringPanel( 4, 2, 4, 2 );
    lb        = new JLabel( app.getResourceString( "observerStart" ), RIGHT );
    p.gridAdd( lb, 1, 0 );
    ggTimelineStart  = new ParamField( timeTrans );
    ggTimelineStart.addSpace( ParamSpace.spcTimeHHMMSS );
    ggTimelineStart.addSpace( ParamSpace.spcTimeSmps );
    ggTimelineStart.addSpace( ParamSpace.spcTimeMillis );
    ggTimelineStart.addSpace( ParamSpace.spcTimePercentR );
    ggTimelineStart.addListener( this );
    p.gridAdd( ggTimelineStart, 2, 0 );
    lb.setLabelFor( ggTimelineStart );
   
    ggLockStop    = new LockButton( true );
    ggLockStop.addActionListener( this );
    p.gridAdd( ggLockStop, 0, 1 );
    lb        = new JLabel( app.getResourceString( "observerStop" ), RIGHT );
    p.gridAdd( lb, 1, 1 );
    ggTimelineStop  = new ParamField( timeTrans );
    ggTimelineStop.addSpace( ParamSpace.spcTimeHHMMSS );
    ggTimelineStop.addSpace( ParamSpace.spcTimeSmps );
    ggTimelineStop.addSpace( ParamSpace.spcTimeMillis );
    ggTimelineStop.addSpace( ParamSpace.spcTimePercentR );
    ggTimelineStop.addListener( this );
    p.gridAdd( ggTimelineStop, 2, 1 );
    lb.setLabelFor( ggTimelineStop );

    ggLockLen    = new LockButton( true );
    ggLockLen.addActionListener( this );
    p.gridAdd( ggLockLen, 0, 2 );
    lb        = new JLabel( app.getResourceString( "observerLen" ), RIGHT );
    p.gridAdd( lb, 1, 2 );
    ggTimelineLen  = new ParamField( timeTrans );
    ggTimelineLen.addSpace( ParamSpace.spcTimeHHMMSS );
    ggTimelineLen.addSpace( ParamSpace.spcTimeSmps );
    ggTimelineLen.addSpace( ParamSpace.spcTimeMillis );
    ggTimelineLen.addSpace( ParamSpace.spcTimePercentR );
    ggTimelineLen.addListener( this );
View Full Code Here

TOP

Related Classes of de.sciss.gui.ParamField$Event

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.