protected ActionGoToTime() { /* empty */ }
public void actionPerformed( ActionEvent e )
{
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 );