Instrumentation updates ... work in progress

This commit is contained in:
denny
2015-09-19 12:26:04 -04:00
parent 8c2207e37c
commit ba41022853
8 changed files with 92 additions and 47 deletions

View File

@@ -19,7 +19,7 @@ public class DecoderSelectionFrame extends JInternalFrame
{
private static final long serialVersionUID = 1L;
private DecodeComponentEditor mDecodeEditor = new DecodeComponentEditor();
private DecodeComponentEditor mDecodeEditor = new DecodeComponentEditor( null );
private ResourceManager mResourceManager = new ResourceManager();
private IControllableFileSource mSource;
@@ -36,16 +36,21 @@ public class DecoderSelectionFrame extends JInternalFrame
private void initGUI()
{
setLayout( new MigLayout( "", "[grow,fill]", "[][][grow,fill]" ) );
setTitle( "Decoders" );
setPreferredSize( new Dimension( 700, 150 ) );
setSize( 700, 150 );
setPreferredSize( new Dimension( 700, 450 ) );
setSize( 700, 450 );
setResizable( true );
setClosable( true );
setIconifiable( true );
setMaximizable( false );
add( mDecodeEditor );
add( mDecodeEditor, "wrap" );
add( new AddDecoderButton(), "span" );
}
public class AddDecoderButton extends JButton

View File

@@ -117,6 +117,8 @@ public class DecoderViewFrame extends JInternalFrame
mProcessingChain.setSource( (Source)mSource );
mProcessingChain.start();
initGui();
}
@@ -184,19 +186,7 @@ public class DecoderViewFrame extends JInternalFrame
for( TapGroup group: groups )
{
List<Tap> taps = group.getTaps();
if( !taps.isEmpty() )
{
JMenu groupMenu = new JMenu( group.getName() );
for( Tap tap: taps )
{
groupMenu.add( new TapSelectionItem( tap ) );
}
menu.add( groupMenu );
}
menu.add( new TapGroupMenu( group ) );
}
}
}
@@ -346,4 +336,26 @@ public class DecoderViewFrame extends JInternalFrame
{
mLog.info( message.toString() );
}
public class TapGroupMenu extends JMenu
{
private static final long serialVersionUID = 1L;
private TapGroup mTapGroup;
public TapGroupMenu( TapGroup tapGroup )
{
super( tapGroup.getName() );
mTapGroup = tapGroup;
add( new AddAllTapsItem( mTapGroup.getTaps() ) );
add( new JSeparator() );
for( Tap tap: mTapGroup.getTaps() )
{
add( new TapSelectionItem( tap ) );
}
}
}
}